• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

selecting encoding style of soapenc vs xsd

Posts: 10
  • Mark post as helpful
  • send pies
  • 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:

encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />

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

<complexType name="Status">
<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"/>

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>

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

Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic