please help; could not find deserializer
omatzura Jan 28, 2005 5:06 AMok.. this is another one of these problems, i've tried everything in other posts without success... maybe someone has some advice;
I have created a -nodatabinding client with wscompile and want to use it to invoke its corresponding web service. I can invoke the webservice from my ejb (i've created all the webservices.xml and service-ref entries) and the correct deserializer is being used when sending the request, but jbossws fails to find the serializer for the response;
org.xml.sax.SAXException: Deserializing parameter 'publishPDLUpdateResponse': could not find deserializer for type {urn:schema:v1:publishpdlupdate:integrations:bis.bonnier.se}PublishPDLUpdateResponse at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:325)
wscompile generated the following jaxrpc-mapping-file;
<?xml version="1.0" encoding="UTF-8"?> <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"> <package-mapping> <package-type>se.bonnier.bis.integrations.publishpdlupdate.v1</package-type> <namespaceURI>urn:v1:publishpdlupdate:integrations:bis.bonnier.se</namespaceURI> </package-mapping> <package-mapping> <package-type>javax.xml.soap</package-type> <namespaceURI>urn:schema:v1:publishpdlupdate:integrations:bis.bonnier.se</namespaceURI> </package-mapping> <exception-mapping> <exception-type>se.bonnier.bis.integrations.publishpdlupdate.v1.PublishPDLUpdateFaultMessage</exception-type> <wsdl-message xmlns:exMsgNS="urn:v1:publishpdlupdate:integrations:bis.bonnier.se">exMsgNS:PublishPDLUpdateFaultMessage</wsdl-message> </exception-mapping> <service-interface-mapping> <service-interface>se.bonnier.bis.integrations.publishpdlupdate.v1.PublishPDLUpdateServiceImpl</service-interface> <wsdl-service-name xmlns:serviceNS="urn:v1:publishpdlupdate:integrations:bis.bonnier.se">serviceNS:PublishPDLUpdateServiceImpl</wsdl-service-name> <port-mapping> <port-name>PublishPDLUpdateServicePort</port-name> <java-port-name>PublishPDLUpdateServicePort</java-port-name> </port-mapping> </service-interface-mapping> <service-endpoint-interface-mapping> <service-endpoint-interface>se.bonnier.bis.integrations.publishpdlupdate.v1.PublishPDLUpdateService</service-endpoint-interface> <wsdl-port-type xmlns:portTypeNS="urn:v1:publishpdlupdate:integrations:bis.bonnier.se">portTypeNS:PublishPDLUpdateService</wsdl-port-type> <wsdl-binding xmlns:bindingNS="urn:v1:publishpdlupdate:integrations:bis.bonnier.se">bindingNS:PublishPDLUpdateServiceSoapBinding</wsdl-binding> <service-endpoint-method-mapping> <java-method-name>publishPDLUpdate</java-method-name> <wsdl-operation>publishPDLUpdate</wsdl-operation> <method-param-parts-mapping> <param-position>0</param-position> <param-type>javax.xml.soap.SOAPElement</param-type> <wsdl-message-mapping> <wsdl-message xmlns:wsdlMsgNS="urn:v1:publishpdlupdate:integrations:bis.bonnier.se">wsdlMsgNS:PublishPDLUpdateInputMessage</wsdl-message> <wsdl-message-part-name>publishPDLUpdateRequestPart</wsdl-message-part-name> <parameter-mode>IN</parameter-mode> </wsdl-message-mapping> </method-param-parts-mapping> <wsdl-return-value-mapping> <method-return-value>javax.xml.soap.SOAPElement</method-return-value> <wsdl-message xmlns:wsdlMsgNS="urn:v1:publishpdlupdate:integrations:bis.bonnier.se">wsdlMsgNS:PublishPDLUpdateOutputMessage</wsdl-message> <wsdl-message-part-name>publishPDLUpdateResponsePart</wsdl-message-part-name> </wsdl-return-value-mapping> </service-endpoint-method-mapping> </service-endpoint-interface-mapping> </java-wsdl-mapping>
I've added the typeMappings for SOAPElement -> ElementSerializer/DeserializerFactory to ws4ee-deployment.xml;
<typeMapping xmlns:schema="urn:schema:v1:publishpdlupdate:integrations:bis.bonnier.se" deserializer="org.apache.axis.encoding.ser.ElementDeserializerFactory" encodingStyle="" qname="schema:publishPDLUpdateRequest" serializer="org.apache.axis.encoding.ser.ElementSerializerFactory" type="java:javax.xml.soap.SOAPElement"/> <typeMapping xmlns:schema="urn:schema:v1:publishpdlupdate:integrations:bis.bonnier.se" deserializer="org.apache.axis.encoding.ser.ElementDeserializerFactory" encodingStyle="" qname="schema:publishPDLUpdateResponse" serializer="org.apache.axis.encoding.ser.ElementSerializerFactory" type="java:javax.xml.soap.SOAPElement"/> <typeMapping xmlns:schema="urn:schema:v1:publishpdlupdate:integrations:bis.bonnier.se" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" qname="schema:publishPDLUpdateFault" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:se.bonnier.bis.integrations.publishpdlupdate.v1.PublishPDLUpdateFaultMessage"/>
The response soap message is the following;
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns:publishPDLUpdateResponse xmlns:ns="urn:schema:v1:publishpdlupdate:integrations:bis.bonnier.se"> <ns:status>1</ns:status> </ns:publishPDLUpdateResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
The WSDL being used is
<definitions name="PublishPDLUpdateService" targetNamespace="urn:v1:publishpdlupdate:integrations:bis.bonnier.se" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:schema="urn:schema:v1:publishpdlupdate:integrations:bis.bonnier.se" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:v1:publishpdlupdate:integrations:bis.bonnier.se" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <types> <xsd:schema> <xsd:import namespace="urn:schema:v1:publishpdlupdate:integrations:bis.bonnier.se" schemaLocation="publishPDLUpdate-SNAPSHOT.xsd"/> </xsd:schema> </types> <message name="PublishPDLUpdateInputMessage"> <part element="schema:publishPDLUpdateRequest" name="requestBody"/> </message> <message name="PublishPDLUpdateOutputMessage"> <part element="schema:publishPDLUpdateResponse" name="responseBody"/> </message> <message name="PublishPDLUpdateFaultMessage"> <part element="schema:publishPDLUpdateFault" name="faultBody"/> </message> <portType name="PublishPDLUpdateService"> <operation name="publishPDLUpdate"> <input message="tns:PublishPDLUpdateInputMessage" name="PublishPDLUpdateInput"/> <output message="tns:PublishPDLUpdateOutputMessage" name="PublishPDLUpdateOutput"/> <fault message="tns:PublishPDLUpdateFaultMessage" name="PublishPDLUpdateFault"/> </operation> </portType> <!-- Generated Binding for operation [PublishPDLUpdateService]--> <binding name="PublishPDLUpdateServiceSoapBinding" type="tns:PublishPDLUpdateService"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="publishPDLUpdate"> <soap:operation soapAction="publishPDLUpdate"/> <input name="PublishPDLUpdateInput"> <soap:body use="literal"/> </input> <output name="PublishPDLUpdateOutput"> <soap:body use="literal"/> </output> <fault name="PublishPDLUpdateFault"> <soap:fault name="PublishPDLUpdateFault" use="literal"/> </fault> </operation> </binding> </definitions>
and its corresponding XSD is
<?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="urn:schema:v1:publishpdlupdate:integrations:bis.bonnier.se" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:schema:v1:publishpdlupdate:integrations:bis.bonnier.se" elementFormDefault="qualified" xmlns:common="urn:updatedata:common:bis.bonnier.se"> <import schemaLocation="updatedata-SNAPSHOT.xsd" namespace="urn:updatedata:common:bis.bonnier.se"/> <!-- Elements used in the wsdl files --> <element name="publishPDLUpdateRequest" type="tns:PublishPDLUpdateRequest"/> <element name="publishPDLUpdateResponse" type="tns:PublishPDLUpdateResponse"/> <element name="publishPDLUpdateFault" type="tns:PublishPDLUpdateFault"/> <!-- Request type includes either an add, an update of a delete subelement --> <complexType name="PublishPDLUpdateRequest"> <sequence> <element name="add" type="common:Add" minOccurs="0" maxOccurs="1" /> <element name="update" type="common:Update" minOccurs="0" maxOccurs="1" /> <element name="delete" type="common:Delete" minOccurs="0" maxOccurs="1" /> </sequence> </complexType> <!-- Response, including status --> <complexType name="PublishPDLUpdateResponse"> <sequence> <element name="status" type="int"/> </sequence> </complexType> <!-- Fault including error code and message --> <complexType name="PublishPDLUpdateFault"> <sequence> <element name="code" type="int"/> <element name="message" type="string"/> </sequence> </complexType> </schema>
What really boggles me is that we have the exact same setup with another web-service (ie a nodatabinding client) and it works just fine!
I've probably just stared at it too long to see the obvious.. a star in heaven for he/she that can help!
regards,
Ole