axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kerstin Bauer" <>
Subject problem when sending custom datatype
Date Wed, 12 Sep 2007 10:06:40 GMT
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 = "";
Service wservice = new Service();
Call wsCall;
try {
    wsCall = (Call) wservice.createCall();
    wsCall.setTargetEndpointAddress(new URL(endpoint));
    wsCall.addParameter("Query", new QName("MpegQueryType"), 
                                       queryType.getClass(), ParameterMode.IN);

    QName qnMpeg = new QName("urn:mpeg:mpqf:schema:2006", "MpegQueryType");
     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:
 faultCode: {}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:
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!


Psssst! Schon vom neuen GMX MultiMessenger geh├Ârt?
Der kanns mit allen:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message