RPC ではエンドポイント操作に名前を付けるラッパー要素があります。 親 RPC の子要素は個別のパラメーターです。 SOAP ボディーは次のような簡単なルールによって構築されます。
TPC は SOAP バインディングのスタイル属性によって定義されます。
<binding name='EndpointInterfaceBinding' type='tns:EndpointInterface'>
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='echo'>
<soap:operation soapAction=''/>
<input>
<soap:body namespace='http://org.jboss.ws/samples/jsr181pojo' use='literal'/>
</input>
<output>
<soap:body namespace='http://org.jboss.ws/samples/jsr181pojo' use='literal'/>
</output>
</operation>
</binding>
<binding name='EndpointInterfaceBinding' type='tns:EndpointInterface'>
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='echo'>
<soap:operation soapAction=''/>
<input>
<soap:body namespace='http://org.jboss.ws/samples/jsr181pojo' use='literal'/>
</input>
<output>
<soap:body namespace='http://org.jboss.ws/samples/jsr181pojo' use='literal'/>
</output>
</operation>
</binding>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
<portType name='EndpointInterface'>
<operation name='echo' parameterOrder='String_1'>
<input message='tns:EndpointInterface_echo'/>
<output message='tns:EndpointInterface_echoResponse'/>
</operation>
</portType>
<portType name='EndpointInterface'>
<operation name='echo' parameterOrder='String_1'>
<input message='tns:EndpointInterface_echo'/>
<output message='tns:EndpointInterface_echoResponse'/>
</operation>
</portType>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
<message name='EndpointInterface_echo'>
<part name='String_1' type='xsd:string'/>
</message>
<message name='EndpointInterface_echoResponse'>
<part name='result' type='xsd:string'/>
</message>
<message name='EndpointInterface_echo'>
<part name='String_1' type='xsd:string'/>
</message>
<message name='EndpointInterface_echoResponse'>
<part name='result' type='xsd:string'/>
</message>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
@WebService
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class JSEBean01
{
@WebMethod
@WebResult(name="result")
public String echo(@WebParam(name="String_1") String input)
{
...
}
}
@WebService
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class JSEBean01
{
@WebMethod
@WebResult(name="result")
public String echo(@WebParam(name="String_1") String input)
{
...
}
}
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
RPC パラメーターの要素名は JAX-WS Annotations#javax.jws.WebParam、 RPC 戻り値の要素名は JAX-WS Annotations#javax.jws.WebResult を使用して定義することができます。