• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

selecting encoding style of soapenc vs xsd

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Axis 1.4. I want to understand how encoding style is chosen for a schema of a service (WSDL) and any instance of that schema (SOAP request/response). Here is the nature of the problem. The clients to the service are strongly typed and can only interprete response with encoding style "soapenc". So in the WSDD, all the request/response object typemapping includes encodingStyle attribute (green) as below:

<typeMapping
qname="x:Status"
xmlns:x="http://stuff.service.xyz.com"
type="java:com.xyz.service.stuff.Status"
serializer="com.xyz.service.stuff.utility.axis.ClaimsBeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />

The generated WSDL on a server also reflects the "soapenc" style:
Wsdl (example snippet):

<complexType name="Status">
<sequence>
<element name="message" nillable="true" type="soapenc:string"/>
<element name="code" nillable="true" type="soapenc:string"/>
<element name="ID" nillable="true" type="soapenc:string"/>
<element name="source" nillable="true" type="soapenc:string"/>
</sequence>

However, when a client sends a request, the response packet goes back with "xsd" econding style. Hence client fails to interpret it.
<serviceStatus xsi:type="ns5:ServiceStatus">
<code xsi:type="xsd:string">xxyy</code>
<message xsi:type="xsd:string"> blah blah</message>
<ID xsi:type="xsd:string">OAA</ID>
<source xsi:type="xsd:string">Abc</source>
</serviceStatus>

Can someone please explain how & why encoding style could be different from WSDL to actual response? How to enforce an encoding style for request/resposne? If I understand correctly, this is RPC/Encoded style. Just to clarify: based on some of the other threads I tried using RPC/Literal but the exisitng clients (no liberty to regenerate new clients) failed to deserialize. So pl keep this in mind when suggesting solutions/answers. Thanks in advance.

Axis version used details:
Name: org/apache/axis
Implementation-Title: Apache Axis
Implementation-Version: 1.4 1855 April 22 2006
Implementation-Vendor: Apache Web Services


 
reply
    Bookmark Topic Watch Topic
  • New Topic