Hi everybody!

I'm a newbie using Axis (Axis 1.4) and I have a problem that I don't know how 
to solve. Until now I invoked the webservices I wrote directly, but now I have 
to invoke them using the Service and Call classes.

Inside of one of my webservices I would like to invoke another. The method 
"processQuery" of the invoked webservice has one custom input parameter called 
MpegQueryType and the return type of the method is a MpegQueryType, too. So 
this is the code I'm using to invoke the webservice:

String endpoint = "http://127.0.0.1:8080/axis/services/db3";;
Service wservice = new Service();
Call wsCall;
try {
    wsCall = (Call) wservice.createCall();
    wsCall.setTargetEndpointAddress(new URL(endpoint));
    wsCall.setOperationName("processQuery");
    wsCall.addParameter("Query", new QName("MpegQueryType"), 
                                       queryType.getClass(), ParameterMode.IN);

    QName qnMpeg = new QName("urn:mpeg:mpqf:schema:2006", "MpegQueryType");
    wsCall.setReturnType(qnMpeg);
    wsCall.setOperationStyle("document");
    wsCall.setOperationUse("literal");
            
     wsCall.registerTypeMapping(MpegQueryType.class, qnMpeg, 
                        new BeanSerializerFactory(MpegQueryType.class, qnMpeg), 
                        new BeanDeserializerFactory(MpegQueryType.class, 
qnMpeg));
            
     MpegQueryType resType = (MpegQueryType) wsCall.invoke(new 
Object[]{queryType});
} catch ...


But this doesn't work, I get a RemoteException saying:
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a child 
element, which is NOT expected, in something it was trying to deserialize.

I don't understand this, because I'm not using the SimpleDeserializer. As I 
have custom objects, I called the method registerTypeMapping to set the type 
mappings...

The webservice I invoke has this method:
 public MpegQueryType processQuery(MpegQueryType query) 
                throws java.rmi.RemoteException { ...

The deploy.wsdd of the webservice I invoke contains this type-mapping:
<typeMapping
        xmlns:ns="urn:mpeg:mpqf:schema:2006"
        qname="ns:MpegQueryType"
        type="java:mpqf.MpegQueryType"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />
The deploy.wsdd was created when I used the wsdl2java command and I didn't 
change it.

Does anybody know, why I have problems with the type mapping?

Thanks in advance for your help!

Regards,
Kerstin

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to