axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Roder <mro...@wamnet.com>
Subject Issue: a client needs to register a serializer and deserializer f or deserialization to work
Date Thu, 29 Nov 2001 23:00:14 GMT

In my soap client code, if I do not include a serializer, the
deserialization does not work. This method only needs to deserialize so
should not have to add a serializer.

Later

Mark





  public List getLibraries()
          throws InvalidSessionException,
          SystemDownException,
          ArchiveException,
          CommunicationException,
          Exception
    {
	
    LOG.debug("Enter getLibraries");
    Call aCall = this.buildCall();
    QName librariesQName = new QName("",
                                     "Libraries");
//    aCall.addSerializer(Libraries.class,
//                        librariesQName,
//                        new BeanSerializer(Libraries.class));
    aCall.addDeserializerFactory(librariesQName,
                                 Libraries.class,
                                 BeanSerializer.getFactory());
	
    QName libraryQName = new QName("",
                                   "Library");
//    aCall.addSerializer(Library.class,
//                        libraryQName,
//                        new BeanSerializer(Library.class));
    aCall.addDeserializerFactory(libraryQName,
                                 Library.class,
                                 BeanSerializer.getFactory());
	
    aCall.setReturnType( new XMLType(librariesQName));
    aCall.addParameter("Libraries",
                       new XMLType(librariesQName),
                       Call.PARAM_MODE_OUT);
	
    Libraries libraries = (Libraries)aCall.invoke("GetLibraries",
                                                  new Object []
            {});
    List libraryList = libraries.getLibraries();
	
    LOG.debug("libraryList: " + libraryList);
	
    LOG.debug("Exit getLibraries");
    return libraryList;
	
	
    } // getLibraries()




AxisFault   faultCode: http://xml.apache.org/axis/:Server.generalException
faultString: null   faultActor: null   faultDetail:  	stackTrace:
org.xml.sax.SAXException: Unregistered type:  class
com.wamnet.archive.soapclient.value.Library 	at
org.apache.axis.encoding.BeanSerializer.onStartChild(BeanSerializer.java:342
) 	at
org.apache.axis.encoding.DeserializationContext.startElement(Deserialization
Context.java:610) 	at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:197)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
407) 	at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:115) 	at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:139) 	at
org.apache.axis.client.Call.invoke(Call.java:1136) 	at
org.apache.axis.client.Call.invoke(Call.java:1040) 	at
org.apache.axis.client.Call.invoke(Call.java:1066) 	at
com.wamnet.archive.soapclient.ArchiveSession.getLibraries(ArchiveSession.jav
a:233) 	at
com.wamnet.archive.soapclient.ArchiveSessionGetLibrariesTEST.testGetLibrarie
s(ArchiveSessionGetLibrariesTEST.java:25)   org.xml.sax.SAXException:
Unregistered type:  class com.wamnet.archive.soapclient.value.Library 	at
org.apache.axis.encoding.BeanSerializer.onStartChild(BeanSerializer.java:342
) 	at
org.apache.axis.encoding.DeserializationContext.startElement(Deserialization
Context.java:610) 	at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:197)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
407) 	at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:115) 	at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:139) 	at
org.apache.axis.client.Call.invoke(Call.java:1136) 	at
org.apache.axis.client.Call.invoke(Call.java:1040) 	at
org.apache.axis.client.Call.invoke(Call.java:1066) 	at
com.wamnet.archive.soapclient.ArchiveSession.getLibraries(ArchiveSession.jav
a:233) 	at
com.wamnet.archive.soapclient.ArchiveSessionGetLibrariesTEST.testGetLibrarie
s(ArchiveSessionGetLibrariesTEST.java:25) 



2001-11-29 16:53:22,591 DEBUG apache.axis.Message :: Setting current message
for
m to: FORM_SOAPENVELOPE (currentMessage is now <soap:Envelope
soap:encodingStyle
="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.
org/soap/envelope/">
        <soap:Header>

        </soap:Header>
        <soap:Body>
                <m:GetLibrariesResponse
xmlns:m="urn:schemas-wamnet-com:Archive"
>
                        <Libraries>
                                <Library>
                                        <LibraryName>Beta1
Library</LibraryName>

                                        <LibraryID>4110401</LibraryID>
                                </Library>
                        </Libraries>
                </m:GetLibrariesResponse>
        </soap:Body>
</soap:Envelope>)
2001-11-29 16:53:22,631 DEBUG apache.axis.Message :: Exit:
SOAPPart::getAsSOAPEn
velope
2001-11-29 16:53:22,631 DEBUG axis.encoding.DeserializationContext ::
Pushing ha
ndler org.apache.axis.message.EnvelopeHandler@23f1bb
2001-11-29 16:53:22,631 DEBUG axis.encoding.DeserializationContext :: Start
pref
ix mapping 'm' -> 'urn:schemas-wamnet-com:Archive'
2001-11-29 16:53:22,631 DEBUG axis.encoding.DeserializationContext :: Start
elem
ent ['urn:schemas-wamnet-com:Archive' GetLibrariesResponse]
2001-11-29 16:53:22,681 DEBUG axis.encoding.DeserializationContext ::
Pushing ha
ndler org.apache.axis.message.RPCHandler@533a6b
2001-11-29 16:53:22,681 DEBUG axis.utils.NSStack :: NSPush (9)
2001-11-29 16:53:22,681 DEBUG axis.encoding.DeserializationContext :: Start
elem
ent ['' Libraries]
2001-11-29 16:53:22,681 DEBUG axis.message.RPCHandler :: Enter:
RPCHandler.onSt
artChild()
2001-11-29 16:53:22,681 DEBUG axis.message.RPCHandler :: Type from
attributes is
:  null
2001-11-29 16:53:22,711 DEBUG axis.message.RPCHandler :: Exit:
RPCHandler.onSta
rtChild()
2001-11-29 16:53:22,711 DEBUG axis.encoding.DeserializationContext ::
Pushing ha
ndler org.apache.axis.encoding.BeanSerializer@5983b7
2001-11-29 16:53:22,711 DEBUG axis.utils.NSStack :: NSPush (10)
2001-11-29 16:53:22,711 DEBUG axis.encoding.DeserializationContext :: Start
elem
ent ['' Library]
2001-11-29 16:53:22,711 ERROR axis.client.Call :: org.xml.sax.SAXException:
Unre
gistered type:  class com.wamnet.archive.soapclient.value.Library


Mime
View raw message