JAX-WS

2016-08-04 4 views
0

Request descriptionJAX-WS

に、必要に応じて、XSDと設定フィールドを生成する以下は、上記の絵で概説仕様の実装です。

@WebService 
@SOAPBinding(style = Style.DOCUMENT) 
public interface WithdrawService { 

    @WebMethod 
    public Response withdraw(
      @WebParam(name="CORPCODE") String corpcode, 
      @WebParam(name="SERVCODE") String servcode, 
      @WebParam(name="AMOUNT") double amount, 
      @WebParam(name="CCYID") String ccyid, 
      @WebParam(name="ACCTNO") String acctno, 
      @WebParam(name="REFVAL1") String refvel1, 
      @WebParam(name="REFVAL2") String refval2, 
      @WebParam(name="TRANREF") String tranref, 
      @WebParam(name="DESC") String desc, 
      @WebParam(name="LICENSEID") String licenseid, 
      @WebParam(name="LICENSEKEY") String licensekey 
      ); 

} 

ユーザーが?wsdlリンクにアクセスすると、次のWSDLが生成されます。

<!-- Published by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.10 svn-revision#919b322c92f13ad085a933e8dd6dd35d4947364b. 
--> 
<!-- Generated by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.10 svn-revision#919b322c92f13ad085a933e8dd6dd35d4947364b. 
--> 
<definitions targetNamespace="http://withdraw.kbz.nirvasoft.com/" name="WithdrawServiceImplService"> 
    <types> 
     <xsd:schema> 
      <xsd:import namespace="http://withdraw.kbz.nirvasoft.com/" schemaLocation="http://localhost:8080/WithdrawService/withdraw?xsd=1"/> 
     </xsd:schema> 
    </types> 
    <message name="withdraw"> 
     <part name="parameters" element="tns:withdraw"/> 
    </message> 
    <message name="withdrawResponse"> 
     <part name="parameters" element="tns:withdrawResponse"/> 
    </message> 
    <portType name="WithdrawService"> 
     <operation name="withdraw"> 
      <input wsam:Action="http://withdraw.kbz.nirvasoft.com/WithdrawService/withdrawRequest" message="tns:withdraw"/> 
      <output wsam:Action="http://withdraw.kbz.nirvasoft.com/WithdrawService/withdrawResponse" message="tns:withdrawResponse"/> 
     </operation> 
    </portType> 
    <binding name="WithdrawServiceImplPortBinding" type="tns:WithdrawService"> 
     <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> 
     <operation name="withdraw"> 
      <soap:operation soapAction=""/> 
      <input> 
       <soap:body use="literal"/> 
      </input> 
      <output> 
       <soap:body use="literal"/> 
      </output> 
     </operation> 
    </binding> 
    <service name="WithdrawServiceImplService"> 
     <port name="WithdrawServiceImplPort" binding="tns:WithdrawServiceImplPortBinding"> 
      <soap:address location="http://localhost:8080/WithdrawService/withdraw"/> 
     </port> 
    </service> 
</definitions> 

私たちは2つのことに不満です。

  1. 使用するタイプのxsdドキュメントはありません。
  2. フィールドが生成されたwsdlで必要かどうかはわかりません。

コードを使用してどのように達成することができたかを知りたいと思います。

答えて

0

あなたは、あなたが埋め込まれたXSDファイルを生成するために、JAX-WSを求めることができます使用するサーバーによっては http://localhost:8080/WithdrawService/withdraw?xsd=1

からあなたのXSDを取得することができます。また、JAX-WSに独自のWSDLを使用するように依頼することもできます。

関連する問題