2017-09-14 5 views
-1

は、私たちがApacje軸は、Apache CXF 1.0 またはwsimportのを使用してWebサービス・クライアント・コードを生成する場合、私は wsdlが異なるメソッドを使用してWebサービスクライアントを生成すると、異なるコードが生成されるでしょうか?

以下
<definitions name="HelloService" 
    targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl" 
    xmlns="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    xmlns:tns="http://www.examples.com/wsdl/HelloService.wsdl" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 

    <message name="SayHelloRequest"> 
     <part name="firstName" type="xsd:string"/> 
    </message> 

    <message name="SayHelloResponse"> 
     <part name="greeting" type="xsd:string"/> 
    </message> 

    <portType name="Hello_PortType"> 
     <operation name="sayHello"> 
     <input message="tns:SayHelloRequest"/> 
     <output message="tns:SayHelloResponse"/> 
     </operation> 
    </portType> 

    <binding name="Hello_Binding" type="tns:Hello_PortType"> 
     <soap:binding style="rpc" 
     transport="http://schemas.xmlsoap.org/soap/http"/> 
     <operation name="sayHello"> 
     <soap:operation soapAction="sayHello"/> 
     <input> 
      <soap:body 
       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
       namespace="urn:examples:helloservice" 
       use="encoded"/> 
     </input> 

     <output> 
      <soap:body 
       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
       namespace="urn:examples:helloservice" 
       use="encoded"/> 
     </output> 
     </operation> 
    </binding> 

    <service name="Hello_Service"> 
     <documentation>WSDL File for HelloService</documentation> 
     <port binding="tns:Hello_Binding" name="Hello_Port"> 
     <soap:address 
      location="http://www.examples.com/SayHello/" /> 
     </port> 
    </service> 
</definitions> 

としてWSDLファイルがあるとします。生成されたコードは異なるでしょうか(コメントは含まれません)?生成されたクラス構造またはクラス数。

答えて

0

はい、生成されるコードは異なります。 CXF und wsimportはJAXB XJCを共通の部分として共有しますが、全体的に1対1の代替として使用することはできません。

関連する問題