users@jax-rpc.java.net

Re: WsCompile generates Exception Class, builds faulty classes

From: Jitendra Kotamraju <Jitendra.Kotamraju_at_Sun.COM>
Date: Tue, 17 Feb 2009 10:56:37 -0800

There isn't much development going on JAX-RPC. I would like you to use
JAX-WS since you are using rpc/lit wsdl.
The JAX-WS RI can be downloaded from http://jax-ws.dev.java.net. Also it
is part of JDK 6.

thanks,
jitu

Schmidt_Schiffl wrote:
> Dear members of this forum,
>
> I have a problem executing the Wscompile ant task. When executed against the
> wsdl file posted below, the task generates exception classes and serializer
> for Exceptions which aer part of the java API: Exception, IOException and
> RemoteException. Also, the task does not let these classes inherit from the
> Exception class, but it does enter them into catch phrases. since this is
> not allowed, the generated classes can not be compiled, the task fails
> generating the Serializer registry and thus fails overall.
>
> This is the wsdl file:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema" name="jxMobileSVCLibrary"
> targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:ro="urn:jxMobileSVCLibrary">
> <types>
> <xs:schema targetNamespace="urn:jxMobileSVCLibrary"
> xmlns="urn:jxMobileSVCLibrary" elementFormDefault="qualified">
> <xs:complexType name="jxCase">
> <xs:sequence>
> <xs:element name="jxCaseId" type="xs:int"/>
> <xs:element name="jxCaseNo" type="xs:string"/>
> <xs:element name="jxCaseDescription" type="xs:string"/>
> <xs:element name="jxCaseDateCreated" type="xs:dateTime"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="jxService">
> <xs:sequence>
> <xs:element name="jxSvcType" type="xs:int"/>
> <xs:element name="jxSvcSubType" type="xs:int"/>
> <xs:element name="jxSvcShort" type="xs:string"/>
> <xs:element name="jxSvcDescription" type="xs:string"/>
> <xs:element name="jxSvcUserTypeId" type="xs:int"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="jxDisbursement">
> <xs:sequence>
> <xs:element name="jxDisbShortText" type="xs:string"/>
> <xs:element name="jxDisbText" type="xs:string"/>
> <xs:element name="jxDisbTax" type="xs:int"/>
> <xs:element name="jxDisbQuantity" type="xs:int"/>
> <xs:element name="jxDisbValue" type="xs:double"/>
> <xs:element name="jxDisbValue1" type="xs:double"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="jxServiceTask">
> <xs:sequence>
> <xs:element name="jxSTId" type="xs:int"/>
> <xs:element name="jxSTEmployee" type="xs:int"/>
> <xs:element name="jxSTImported" type="xs:int"/>
> <xs:element name="jxSTIsGroup" type="xs:int"/>
> <xs:element name="jxSTPartofGroup" type="xs:int"/>
> <xs:element name="jxSTInfo_AB" type="xs:string"/>
> <xs:element name="jxSTInfo_LK" type="xs:string"/>
> <xs:element name="jxSTINfo_BZ" type="xs:string"/>
> <xs:element name="jxSTInfo_BEG" type="xs:dateTime"/>
> <xs:element name="jxSTInfo_END" type="xs:dateTime"/>
> <xs:element name="jxSTInfo_INT" type="xs:int"/>
> <xs:element name="jxSTInfo_DE" type="xs:int"/>
> <xs:element name="jxSTInfo_DV" type="xs:int"/>
> <xs:element name="jxSTInfo_STS" type="xs:double"/>
> <xs:element name="jxSTCaseNo" type="xs:string"/>
> <xs:element name="jxSTClientOneName" type="xs:string"/>
> <xs:element name="jxSTOponentOneName" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="jxListOfCase">
> <xs:complexContent>
> <xs:restriction base="soapenc:Array">
> <xs:sequence />
> <xs:attribute ref="soapenc:arrayType" n1:arrayType="ro:jxCase[]"
> xmlns:n1="http://schemas.xmlsoap.org/wsdl/" />
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
> <xs:complexType name="jxListOfServices">
> <xs:complexContent>
> <xs:restriction base="soapenc:Array">
> <xs:sequence />
> <xs:attribute ref="soapenc:arrayType"
> n1:arrayType="ro:jxService[]" xmlns:n1="http://schemas.xmlsoap.org/wsdl/" />
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
> <xs:complexType name="jxListOfDisbursement">
> <xs:complexContent>
> <xs:restriction base="soapenc:Array">
> <xs:sequence />
> <xs:attribute ref="soapenc:arrayType"
> n1:arrayType="ro:jxDisbursement[]"
> xmlns:n1="http://schemas.xmlsoap.org/wsdl/" />
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
> <xs:complexType name="jxListOfServiceTasks">
> <xs:complexContent>
> <xs:restriction base="soapenc:Array">
> <xs:sequence />
> <xs:attribute ref="soapenc:arrayType"
> n1:arrayType="ro:jxServiceTask[]"
> xmlns:n1="http://schemas.xmlsoap.org/wsdl/" />
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
> </xs:schema>
> </types>
> <message name="JxMobileClientService___GetServerTimeRequest">
> </message>
> <message name="JxMobileClientService___GetServerTimeResponse">
> <part name="Result" type="xs:dateTime" />
> </message>
> <message name="JxMobileClientService___GetListOfCaseRequest">
> <part name="pCaseId" type="xs:int" />
> <part name="pCaseNo" type="xs:string" />
> <part name="pCaseDescription" type="xs:string" />
> </message>
> <message name="JxMobileClientService___GetListOfCaseResponse">
> <part name="Result" type="ro:jxListOfCase" />
> </message>
> <message name="JxMobileClientService___GetListOfDisbursementRequest">
> <part name="pFilter" type="xs:string" />
> </message>
> <message name="JxMobileClientService___GetListOfDisbursementResponse">
> <part name="Result" type="ro:jxListOfDisbursement" />
> </message>
> <message name="JxMobileClientService___GetListOfServicesRequest">
> <part name="pFilter" type="xs:string" />
> </message>
> <message name="JxMobileClientService___GetListOfServicesResponse">
> <part name="Result" type="ro:jxListOfServices" />
> </message>
> <message name="JxMobileClientService___GetListOfServiceTasksRequest">
> <part name="pSTId" type="xs:int" />
> <part name="pSTCaseNo" type="xs:string" />
> <part name="pStartOfDate" type="xs:dateTime" />
> <part name="pEndOfDate" type="xs:dateTime" />
> </message>
> <message name="JxMobileClientService___GetListOfServiceTasksResponse">
> <part name="Result" type="ro:jxListOfServiceTasks" />
> </message>
> <message name="JxMobileClientService___SendServiceTaskRequest">
> </message>
> <message name="JxMobileClientService___SendServiceTaskResponse">
> <part name="Result" type="xs:boolean" />
> <part name="jxSTSave" type="ro:jxServiceTask" />
> </message>
> <portType name="JxMobileClientService">
> <operation name="GetServerTime">
> <input message="tns:JxMobileClientService___GetServerTimeRequest" />
> <output message="tns:JxMobileClientService___GetServerTimeResponse" />
> </operation>
> <operation name="GetListOfCase">
> <input message="tns:JxMobileClientService___GetListOfCaseRequest" />
> <output message="tns:JxMobileClientService___GetListOfCaseResponse" />
> </operation>
> <operation name="GetListOfDisbursement">
> <input
> message="tns:JxMobileClientService___GetListOfDisbursementRequest" />
> <output
> message="tns:JxMobileClientService___GetListOfDisbursementResponse" />
> </operation>
> <operation name="GetListOfServices">
> <input message="tns:JxMobileClientService___GetListOfServicesRequest"
> />
> <output
> message="tns:JxMobileClientService___GetListOfServicesResponse" />
> </operation>
> <operation name="GetListOfServiceTasks">
> <input
> message="tns:JxMobileClientService___GetListOfServiceTasksRequest" />
> <output
> message="tns:JxMobileClientService___GetListOfServiceTasksResponse" />
> </operation>
> <operation name="SendServiceTask">
> <input message="tns:JxMobileClientService___SendServiceTaskRequest" />
> <output message="tns:JxMobileClientService___SendServiceTaskResponse"
> />
> </operation>
> </portType>
> <binding name="JxMobileClientServiceBinding"
> type="tns:JxMobileClientService">
> <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http" />
> <operation name="GetServerTime">
> <soap:operation
> soapAction="urn:jxMobileSVCLibrary-JxMobileClientService#GetServerTime"
> style="rpc" />
> <input>
> <soap:body use="literal" />
> </input>
> <output>
> <soap:body use="literal" />
> </output>
> </operation>
> <operation name="GetListOfCase">
> <soap:operation
> soapAction="urn:jxMobileSVCLibrary-JxMobileClientService#GetListOfCase"
> style="rpc" />
> <input>
> <soap:body use="literal" />
> </input>
> <output>
> <soap:body use="literal" />
> </output>
> </operation>
> <operation name="GetListOfDisbursement">
> <soap:operation
> soapAction="urn:jxMobileSVCLibrary-JxMobileClientService#GetListOfDisbursement"
> style="rpc" />
> <input>
> <soap:body use="literal" />
> </input>
> <output>
> <soap:body use="literal" />
> </output>
> </operation>
> <operation name="GetListOfServices">
> <soap:operation
> soapAction="urn:jxMobileSVCLibrary-JxMobileClientService#GetListOfServices"
> style="rpc" />
> <input>
> <soap:body use="literal" />
> </input>
> <output>
> <soap:body use="literal" />
> </output>
> </operation>
> <operation name="GetListOfServiceTasks">
> <soap:operation
> soapAction="urn:jxMobileSVCLibrary-JxMobileClientService#GetListOfServiceTasks"
> style="rpc" />
> <input>
> <soap:body use="literal" />
> </input>
> <output>
> <soap:body use="literal" />
> </output>
> </operation>
> <operation name="SendServiceTask">
> <soap:operation
> soapAction="urn:jxMobileSVCLibrary-JxMobileClientService#SendServiceTask"
> style="rpc" />
> <input>
> <soap:body use="literal" />
> </input>
> <output>
> <soap:body use="literal" />
> </output>
> </operation>
> </binding>
> <service name="JxMobileClientServiceService">
> <documentation>Service JxMobileClientService. This service has been
> automatically generated using the RODL template you can find in the
> Templates directory.</documentation>
> <port name="JxMobileClientServicePort"
> binding="tns:JxMobileClientServiceBinding">
> <soap:address location="XXX" />
> </port>
> </service>
> </definitions>
>
> and these the ant definitions:
>
> <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
> <classpath refid="jwsdplib.classpath" />
> </taskdef>
>
> <target name="generateJXpertWrapper">
> <!-- clear sourcefolder -->
> <delete dir="${dir.src.wrapper}/com" />
> <wscompile
> keep="true"
> client="true"
> base="${dir.src.wrapper}"
> xPrintStackTrace="true"
> verbose="true"
> config="${file.config.jxpert}">
> <classpath refid="jwsdplib.classpath" />
> </wscompile>
> </target>
>
>
> I would appreciate any hint you can give me.
>