0

私は Java で JAX WS Web サービスを持っており、次の行でタイプDocumentからRPCに変更します。

@SOAPBinding(style = Style.RPC)

問題は、JDK 1.8.0_91 から wsgen.exe (バージョン 2.2.9) を使用しようとしたときです。

"C:\Program Files\Java\jdk1.8.0_91\bin\wsgen.exe" -verbose -cp . com.ws.ServiceImpl -wsdl -inlineSchemas

メソッドinsertDevolutionsに対して生成される WSDLは次のとおりです。

<xs:schema version="1.0" targetNamespace="..." xmlns:xs="http://www.w3.org/2001/XMLSchema">      
    <xs:complexType name="arrayList">
        <xs:complexContent>
            <xs:extension base="tns:abstractList">
                <xs:sequence/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="abstractList" abstract="true">
        <xs:complexContent>
            <xs:extension base="tns:abstractCollection">
                <xs:sequence/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="abstractCollection" abstract="true">
        <xs:sequence/>
    </xs:complexType>
</xs:schema>
 ...
<message name="insertDevolutions">
    <part name="arg0" type="xsd:string"/>
    <part name="arg1" type="tns:arrayList"/>
    <part name="arg2" type="xsd:string"/>
    <part name="arg3" type="xsd:string"/>
    <part name="arg4" type="xsd:string"/>
    <part name="arg5" type="xsd:string"/>
    <part name="arg6" type="xsd:boolean"/>
</message>

ただし、URL http://localhost:8080/TestWS/ServiceImpl?wsdlを使用してサービスによって生成される WSDL は、オブジェクトデボルブが正しく生成されるため、まったく異なります。

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="..." attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="...">
    <xs:complexType name="devolution">
        <xs:sequence>
            <xs:element name="company" type="xs:string"/>
            <xs:element name="currency" type="xs:string"/>
            <xs:element name="registerDate" type="xs:dateTime"/>>
            <xs:element name="total" type="xs:double"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType final="#all" name="devolutionArray">
        <xs:sequence>
            <xs:element maxOccurs="unbounded" minOccurs="0" name="item" nillable="true" type="tns:devolution"/>
        </xs:sequence>
    </xs:complexType>
</xs:schema>
...
<wsdl:message name="insertDevolutions">
    <wsdl:part name="arg0" type="xsd:string"/>
    <wsdl:part name="arg1" type="tns:devolutionArray"/>
    <wsdl:part name="arg2" type="xsd:string"/>
    <wsdl:part name="arg3" type="xsd:string"/>
    <wsdl:part name="arg4" type="xsd:string"/>
    <wsdl:part name="arg5" type="xsd:string"/>
    <wsdl:part name="arg6" type="xsd:boolean"/>
</wsdl:message>

JAX WSはwsgenと同じツールを使用していると思ったので、URLにwsdlオプションを含むWSDLがどのように生成されるかを知りたいです。サービスによって提供されるような WSDL を生成する別のツールはありますか?

4

1 に答える 1