Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Axis client calling WebLogic service

843834Aug 19 2004 — edited Aug 19 2004
I need to get an Axis command-line client to work using dynamic binding to call the Trader webservice that ships with WL8.1SP2.

Here is my code:
			Service service = new Service();
			Call call = (Call) service.createCall();
			
			call.setTargetEndpointAddress(new URL("http://localhost:7001/webservice/TraderService"));
			call.setOperationName(new QName("TraderService", "sell"));
			call.addParameter("string", XMLType.XSD_STRING, ParameterMode.IN);
			call.addParameter("intVal", XMLType.XSD_INT,    ParameterMode.IN);
			QName qName = new QName("http://www.bea.com/examples/Trader", "TradeResult");
			call.registerTypeMapping(TradeResult.class, qName,
									BeanSerializerFactory.class, BeanDeserializerFactory.class);
			
			call.setReturnType(new QName("tradeResult"));
			TradeResult tr = (TradeResult) call.invoke(new Object[] {"PEP", new Integer(1000)});
I can't figure out what I am doing wrong but I'm relatively sure it is a QName problem.
The code actually works fine and gets to the server but blows out when it tries to serialize the response back into the TradeResult object.

Here's the error:


org.xml.sax.SAXException: Deserializing parameter 'result': could not find deserializer for type {java:examples.webservices.complex.statelessSession}TradeResult
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:302)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
at org.apache.axis.client.Call.invoke(Call.java:2272)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at ntrs.soa.wlservice.axisclientdynamic.TraderAxisClientDynamic3.main(TraderAxisClientDynamic3.java:57)

Any help is appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 16 2004
Added on Aug 19 2004
1 comment
167 views