Hi all!

I wrote a webservice with Axis 1.4 (writing first the wsdl and then I used the 
command wsdl2java to generate the java classes).

When I access my webservice with a client like this:

RetManService service = new RetManServiceLocator();
RetMan stub = service.getretMan();
MpegQueryType query = new MpegQueryType(...);
MpegQueryType result = stub.search(query);

Everything works fine. I can send my custom type MpegQueryType and I receive my 
custom return type.

But now I would like to use a "dynamic" access to my webserver using the 
Classes Service and Call, like this:

Service wservice = new Service();
Call wsCall = (Call) wservice.createCall();
wsCall.setTargetEndpointAddress(new 
URL("http://127.0.0.1:8080/axis/services/db3";));
MpegQueryType queryResult = (MpegQueryType) wsCall.invoke(params);

But this doesn't work. I suppose the problem lies in the type mapping that is 
not correct on the client side. On the server side it has to be working fine as 
I can access the server with the method above (with the ServiceLocator).

So I tried to use some of the methods of the Call class to specify my custom 
type, e.g.

wsCall.setOperationName("processQuery");
wsCall.addParameter("query", new QName("MpegQueryType"), MpegQueryType.class, 
ParameterMode.IN);
QName qnMpeg = new QName("urn:mpeg:mpqf:schema:2006", "MpegQueryType");
wsCall.setReturnType(qnMpeg);
wsCall.setOperationStyle("document");
wsCall.setOperationUse("literal");
wsCall.registerTypeMapping(mpqf.MpegQueryType.class, qnMpeg, new 
BeanSerializerFactory(mpqf.MpegQueryType.class, qnMpeg), new 
BeanDeserializerFactory(mpqf.MpegQueryType.class, qnMpeg));
Object[] params = new Object[1];
params[0] = queryType;
MpegQueryType queryResult = (MpegQueryType) wsCall.invoke(params);

But I don't know, how I have to use these methods exactly. The Axis API isn't 
that helpfull either and I didn't find an example in the web. (The examples I 
found use only Java-Types)

Can anybody help me? 
Maybe someone can give me an example so that I know how I have to specify the 
Call so that I can use my custom types?

Thanks in advance for your help!

Regards,
Kerstin Bauer

-- 
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