Announcement Announcement Module
No announcement yet.
Axis 1.4 and Spring 2.0.1 : Deserializer (yet again) Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Axis 1.4 and Spring 2.0.1 : Deserializer (yet again)


    Please help - feeling like a real dumb@ss at this stage. I just can't seem to get my Spring-wrapped web service client working. As a stand-alone Axis web service client, my code works fine.

    I have generated the Java classes using Axis 1.4 using wsdl2java and have created a class extended JaxRpcPortProxyFactoryBean and added mappings for the generated classes.

    public class CmPortProxyFactoryBean extends JaxRpcPortProxyFactoryBean {
        /** The namespace URI for the Content Manager web service's dto classes. */
        public static final String CM_DTO_NAMESPACE 
            = "";
        protected void postProcessJaxRpcService(Service service) {       
            TypeMappingRegistry registry = service.getTypeMappingRegistry();              
            TypeMapping mapping = registry.createTypeMapping();       
           //add the classes to the mapping
           registerBeanMapping(mapping, ApplicationError.class, "ApplicationError");       
           registerBeanMapping(mapping, AttributeData.class, "AttributeData");
           registerBeanMapping(mapping, StoreDocumentRequest.class, "StoreDocumentRequest");                                
           registerBeanMapping(mapping, StoreDocumentResponse.class, "StoreDocumentResponse");
           registerBeanMapping(mapping, StoreDocumentResult.class, "StoreDocumentResult");
           //register the mapping
           registry.register("", mapping);
        protected void registerBeanMapping(TypeMapping mapping, Class type, String name) {
           QName qName = new QName(CM_DTO_NAMESPACE, name);
                            new BeanSerializerFactory(type, qName),
                            new BeanDeserializerFactory(type, qName));       
    I can call the web service and see the expected SOAP/XML being returned from the web service but I keep getting the following exception:
    org.xml.sax.SAXException: Deserializing parameter 'storeDocumentResponse': could not find deserializer for type {}>storeDocumentResponse
    (I am not sure why there is a > before the storeDocumentResponse element but adding variations of the element's name does not help.)

    Please can someone help me out? I did see several posting about encoding, etc and trying doing:
    //register the mapping
           registry.register("", mapping);
    But that just generated more exceptions:
    org.xml.sax.SAXException: Bad types (interface javax.xml.soap.SOAPElement -> class t) Message being parsed:
    Any ideas/help would be (greatly) appreciated.