Hi,
we're facing two problems that seems different but also related, with typeMapping and beanMapping in a WSDD file.
The second one will be in another mail ;)
We're trying to expose, in RPC/Literal style, the following java class :
public class BusinessStructImpl { public SimpleBean echoSimpleBean(SimpleBean param) { return param; } }
SimpleBean has only two attributes : intData (an int) and stringData (a String) with associated getters and setters.
At first, the following was in the automatically generated WSDD (by WSDL2Java, from Java2WSDL's WSDL):
<typeMapping xmlns:ns="http://bean.com" qname="ns:SimpleBean" type="java:com.bean.SimpleBean" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
With this WSDD, the WSDL generated from the servlet seems to be correct :
<complexType name="SimpleBean"> <sequence> <element name="intData" type="xsd:int"/> <element name="stringData" nillable="true" type="xsd:string"/> </sequence> </complexType>
But then, we get the following server-side exception, when trying to call the service (Weblogic client):
for echoSimpleBean :
javax.xml.rpc.soap.SOAPFaultException: org.xml.sax.SAXException: Deserializing parameter 'in0': could not find deserializer for type {http://bean.ws2.clara.francetelecom.com}SimpleBean
Then, we tried to modify the WSDD to :
<beanMapping xmlns:ns="http://bean.com" qname="ns:SimpleBean" languageSpecificType="java:com.bean.SimpleBean" />
to re-expose the service.
Now, the echoSimpleBean method works
So, after this long introduction, here's the question :
After the documentation, beanMapping should be a shortcut to typeMapping => why is there such a difference ? And why isn't the working code not automatically generated instead of the non-working? Is it a bug ? ;)
(doc : http://ws.apache.org/axis/java/user-guide.html)
Kind regards, -- Julien Wajsberg