users@jax-rpc.java.net

Re: xrpcc: Generate stub from WSDL

From: Su Zhang <su_ba_ru_at_HOTMAIL.COM>
Date: Thu, 18 Apr 2002 07:08:56 -0600

Hi Hrishikesh,

According to the SOAP specification:
URL: http://www.w3.org/TR/SOAP/#_Toc478383497
Section: 4.2 (SOAP Header)
bullet #: 2 "The SOAP encodingStyle attribute MAY be used to indicate
the encoding style used for the header entries."

Following is the SOAP message received from the Axis server:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
      <ns1:getPriceResponse
         SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
         xmlns:ns1="http://flatbug:8080/axis/services/AxisBookStore">
         <getPriceResult href="#id0"/>
      </ns1:getPriceResponse>
      <multiRef id="id0" SOAP-ENC:root="0"
         xsi:type="ns2:PriceQuote"
         xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
         xmlns:ns2="http://localhost:8080/axis/services/AxisBookStore">
         <price xsi:type="xsd:double">9.99</price>
         <ISBN xsi:type="xsd:string">9999999ISBN</ISBN>
         <storeID xsi:type="xsd:int">9999</storeID>
         <storeDescription xsi:type="xsd:string">
            99999Description
         </storeDescription>
      </multiRef>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Thanks,
Su

>hi Su,
>
>problem is that the SOAP response your client receives from the server,
>either does not have the 'encodingStyle' attribute in the SOAP-ENV:Body
>element
>or has the value of that attribute set to "".
>
>Since i dont really know what Axis is i m unable to tell you
>how to resolve the issue.... i guess Axis must be having some
>Configuration file where u can specify the value of encodingStyle
>that you want Axis to use while sending out SOAP Messages.
>
>Hrishikesh
>
>
>-----Original Message-----
>From: Su Zhang [mailto:su_ba_ru_at_HOTMAIL.COM]
>Sent: Thursday, April 18, 2002 2:14 AM
>To: JAXRPC-INTEREST_at_JAVA.SUN.COM
>Subject: Re: xrpcc: Generate stub from WSDL
>
>
>Hi,
>
>I got another problem:
>On the service side: a service is deployed on Axis, and Axis generates the
>wsdl document for that service. The service has a simple method that takes a
>string and returns a JavaBean type class.
>
>On the client side: I used the xrpcc tool to generate the client-side
>classes by feeding it with the service wsdl document. When the client is
>executed, got the following exception:
>***************************************************************************
>java.rmi.RemoteException: deserialization error: deserialization error:
>deserialization error: deserialization error: unexpected encoding style:
>expected=http://schemas.xmlsoap.org/soap/encoding/, actual=; nested
>exception is:
> deserialization error: deserialization error: deserialization error:
>deserialization error: unexpected encoding style:
>expected=http://schemas.xmlsoap.org/soap/encoding/, actual=
>deserialization error: deserialization error: deserialization error:
>deserialization error: unexpected encoding style:
>expected=http://schemas.xmlsoap.org/soap/encoding/, actual=
> at
>com.sun.xml.rpc.encoding.SOAPDeserializationContext.deserializeMultiR
>efObjects(SOAPDeserializationContext.java:107)
>
>Thanks,
>Su