クラス XsdSchemaHandlerAdapter
java.lang.ObjectSE
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.transport.http.LocationTransformerObjectSupport
org.springframework.ws.transport.http.XsdSchemaHandlerAdapter
- 実装済みのインターフェース一覧:
org.springframework.beans.factory.InitializingBean, org.springframework.web.servlet.HandlerAdapter
public class XsdSchemaHandlerAdapter
extends LocationTransformerObjectSupport
implements org.springframework.web.servlet.HandlerAdapter, org.springframework.beans.factory.InitializingBean
汎用
DispatcherServlet で XsdSchema インターフェースを使用するためのアダプター。 マップされた XsdSchema 実装からソースを読み取り、その結果として HttpServletResponse に書き込みます。サブクラスでスキーマを後処理できます。
- 導入:
- 1.5.3
- 関連事項:
フィールド概要
フィールドコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明voidprotected SourceSEgetSchemaSource(XsdSchema schema) 指定されたスキーマのSourceSE を返します。@Nullable org.springframework.web.servlet.ModelAndViewhandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, ObjectSE handler) voidsetSchemaLocationExpression(StringSE schemaLocationExpression) WSDL 1.1 定義からschemaLocation属性を抽出するために使用される XPath 式を設定します。voidsetTransformSchemaLocations(boolean transformSchemaLocations) 受信HttpServletRequestのリクエスト URI を使用して WSDL 内の相対アドレススキーマの場所を変換するかどうかを設定します。booleanprotected voidtransformSchemaLocations(DocumentSE definitionDocument, jakarta.servlet.http.HttpServletRequest request) HttpServletRequestで指定されたサーバー名を反映するように、すべてのschemaLocation属性を変換します。クラス LocationTransformerObjectSupport から継承されたメソッド
transformLocation, transformLocations
フィールドの詳細
DEFAULT_SCHEMA_LOCATION_EXPRESSION
WSDL 定義からすべてのschemaLocation属性を抽出するために使用されるデフォルトの XPath 式。- 関連事項:
コンストラクターの詳細
XsdSchemaHandlerAdapter
public XsdSchemaHandlerAdapter()
方法の詳細
setSchemaLocationExpression
WSDL 1.1 定義からschemaLocation属性を抽出するために使用される XPath 式を設定します。デフォルトは
DEFAULT_SCHEMA_LOCATION_EXPRESSIONです。setTransformSchemaLocations
public void setTransformSchemaLocations(boolean transformSchemaLocations) 受信HttpServletRequestのリクエスト URI を使用して WSDL 内の相対アドレススキーマの場所を変換するかどうかを設定します。デフォルトはfalseです。handle
public @Nullable org.springframework.web.servlet.ModelAndView handle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, ObjectSE handler) throws ExceptionSE - 次で指定:
- インターフェース
org.springframework.web.servlet.HandlerAdapter内のhandle - 例外:
ExceptionSE
supports
- 次で指定:
- インターフェース
org.springframework.web.servlet.HandlerAdapter内のsupports
afterPropertiesSet
- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBean内のafterPropertiesSet - 例外:
ExceptionSE
getSchemaSource
指定されたスキーマのSourceSE を返します。サブクラスのスキーマの後処理と変換を可能にします。デフォルトの実装は単に
XsdSchema.getSource()を返します。- パラメーター:
schema- スキーマ- 戻り値:
- 指定されたスキーマのソース
- 例外:
ExceptionSE- エラーの場合
transformSchemaLocations
protected void transformSchemaLocations(DocumentSE definitionDocument, jakarta.servlet.http.HttpServletRequest request) throws ExceptionSE HttpServletRequestで指定されたサーバー名を反映するように、すべてのschemaLocation属性を変換します。定義された XPath 式を評価して適切な属性を決定し、transformLocationに委譲して、一致するすべての属性の変換を実行します。このメソッドは、
transformSchemaLocationsプロパティが true の場合にのみ呼び出されます。- 例外:
ExceptionSE- 関連事項: