web services - Java JAX WS generated WSDL vs wsgen -


i have jax ws web service in java, , change type document rpc following line:

@soapbinding(style = style.rpc) 

the problem when try use wsgen.exe (version 2.2.9) jdk 1.8.0_91:

"c:\program files\java\jdk1.8.0_91\bin\wsgen.exe" -verbose -cp . com.ws.serviceimpl -wsdl -inlineschemas 

the wsdl generated method insertdevolutions following:

<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> 

but wsdl generated service url http://localhost:8080/testws/serviceimpl?wsdl totally different because object devolution generated correctly:

<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> 

so want know how wsdl wsdl option in url generated because thought jax ws uses same tool wsgen. there tool generates wsdl 1 provided service?

finally found wsdl generated cxf, because tool wsgen uses default jaxb implementation , 1 not convert interfaces list<> , classes arraylist<> converted mentioned before in following way:

<xs:complextype name="arraylist">     <xs:complexcontent>         <xs:extension base="tns:abstractlist">             <xs:sequence/>         </xs:extension>     </xs:complexcontent> </xs:complextype> 

so when use tools provided cxf follwing command:

"c:\apache-cxf-3.1.6\bin\java2ws" -wsdl -d . com.ws.serviceimpl 

the wsdl rpc style generated correctly.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -