users@jax-rpc.java.net

Re: xrpcc: Generate stub from WSDL

From: Su Zhang <su_ba_ru_at_HOTMAIL.COM>
Date: Tue, 16 Apr 2002 11:56:57 -0600

Hrishikesh,

I appreciate your help.

It still doesn't work. The entire wsdl is attached at the end.

I guess the reason that causes the problem is that I used the xrpcc tool to generate the wsdl on the service side (i.e., pass the xrpcc with service interface and implementation) and then used the modified wsdl to generate the client-side classes.

Then, I tried to use the modified wsdl to generate the service-side classes and implement the service. So that both service and client pass same wsdl document to the xrpcc tool to generate service-side and client-side classes respectively.

The service was deployed successfully. And when the client aceessing the service, I got another type of error:
java.rmi.RemoteException: deserialization error: deserialization error: deserialization error: deserialization error: unexpected XML reader state. expected: END but found: START; nested exception is:
        deserialization error: deserialization error: deserialization error: deserialization error: unexpected XML reader state. expected: END but found: START
deserialization error: deserialization error: deserialization error: deserialization error: unexpected XML reader state. expected: END but found: START

Here is the wsdl document:
<?xml version="1.0" encoding="UTF-8"?>

<definitions name="TestService"
   targetNamespace="http://www.deitel.com/test.wsdl"
   xmlns:tns="http://www.deitel.com/test.wsdl"
   xmlns="http://schemas.xmlsoap.org/wsdl/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsd1="http://www.deitel.com/schema"
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  <types>
   <schema
         targetNamespace="http://www.deitel.com/schema"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <complexType name="PriceQuote">
            <sequence>
               <element name="price" type="double"/>
               <element name="ISBN" type="string"/>
               <element name="storeID" type="int"/>
               <element name="description" type="string"/>
            </sequence>
         </complexType>
      </schema>
  </types>

  <message name="getPrice">
    <part name="String_1" type="xsd:string"/></message>
  <message name="getPriceResponse">
    <part name="result" type="xsd1:PriceQuote"/></message>
  <portType name="Test">
    <operation name="getPrice">
      <input message="tns:getPrice"/>
      <output message="tns:getPriceResponse"/></operation></portType>
  <binding name="TestBinding" type="tns:Test">
    <operation name="getPrice">
      <input>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    use="encoded" namespace="http://www.deitel.com/test.wsdl"/></input>
      <output>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    use="encoded" namespace="http://www.deitel.com/test.wsdl"/></output>
      <soap:operation soapAction=""/></operation>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
       style="rpc"/></binding>
  <service name="TestService">
    <port name="TestPort" binding="tns:TestBinding">
      <soap:address location="http://zhang:8080/jaxrpc-test/test/endpoint/Test"/>
    </port></service></definitions>

Thank you very much,
Su