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