[mule-user] Mule Client calling Axis webservice with complex type input parameter

1 view
Skip to first unread message

Riyaz Saiyed

unread,
Apr 21, 2008, 8:38:11 AM4/21/08
to us...@mule.codehaus.org

Hello All,

I have a WebService running on Axis 1.4 and the input for one operation of
this WS is a complex type. The binding of the WS is RPC and i am trying to
invoke this WebService via Mule.
When i tried invoking this service, I got deserialization exception.
Please privide me a solution.

My code,

MuleClient client = new MuleClient();
Map props = new HashMap();
SoapMethod soapMethod = new SoapMethod(
NamedParameter.createQName("setBook"));
soapMethod.addNamedParameter(NamedParameter.createQName("book"),
NamedParameter.XSD_ANY, "in");
props.put(MuleProperties.MULE_SOAP_METHOD, soapMethod);

Book book = new Book("MY MULE BOOK"); // Complex type
UMOMessage result =

client.send("axis:http://localhost:8080/Apache-Axis/services/BookQuote?method=setBook",
book, props);

System.out.println(result);

The exception,
log4j:WARN No appenders could be found for logger
(org.mule.extras.client.MuleClient).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.mule.umo.provider.DispatchException: Failed
to route event via endpoint:
MuleEndpoint{endpointUri=http://localhost:8080/Apache-Axis/services/BookQuote?method=setBook,
connector=AxisConnector{this=1ac2f9c, started=true, initialised=true,
name='connector.axis.0', disposed=false,
numberOfConcurrentTransactedReceivers=4,
createMultipleTransactedReceivers=true, connected=true,
supportedProtocols=[axis, axis:http, axis:https, axis:servlet, axis:vm,
axis:jms, axis:xmpp, axis:smtp, axis:smtps, axis:pop3, axis:pop3s,
axis:imap, axis:imaps, axis:ssl, axis:tcp, axis:http, axis:https,
axis:servlet, axis:vm, axis:jms, axis:xmpp, axis:smtp, axis:smtps,
axis:pop3, axis:pop3s, axis:imap, axis:imaps, axis:ssl, axis:tcp],
serviceOverrides=null}, transformer=null,
name='endpoint.http.localhost.8080.Apache.Axis.services.BookQuote.method.setBook',
type='sender', properties={method=setBook},
transactionConfig=Transaction{factory=null, action=NONE, timeout=30000},
filter=null, deleteUnacceptedMessages=false, initialised=false,
securityFilter=null, synchronous=null, initialState=started,
createConnector=0, remoteSync=null, remoteSyncTimeout=10000,
endpointEncoding=null}. Message payload is of type: Book
at
org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:252)
at org.mule.providers.AbstractConnector.send(AbstractConnector.java:1629)
at org.mule.impl.ImmutableMuleEndpoint.send(ImmutableMuleEndpoint.java:955)
at org.mule.impl.MuleSession.sendEvent(MuleSession.java:327)
at org.mule.extras.client.MuleClient.send(MuleClient.java:737)
at org.mule.extras.client.MuleClient.send(MuleClient.java:714)
at org.mule.extras.client.MuleClient.send(MuleClient.java:667)
at AxisClient.jvmInvoke(AxisClient.java:60)
at AxisClient.main(AxisClient.java:27)
Caused by: org.xml.sax.SAXException: Deserializing parameter 'book': could
not find deserializer for type {http://bookstore}Book
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.SOAPPart.getEnvelope(SOAPPart.java:1003)
at
org.mule.providers.soap.axis.extensions.MuleSoapHeadersHandler.processClientResponse(MuleSoapHeadersHandler.java:138)
at
org.mule.providers.soap.axis.extensions.MuleSoapHeadersHandler.invoke(MuleSoapHeadersHandler.java:61)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:190)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at
org.mule.providers.soap.axis.AxisMessageDispatcher.doSend(AxisMessageDispatcher.java:144)
at
org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:224)
... 8 more

--
View this message in context: http://www.nabble.com/Mule-Client-calling-Axis-webservice-with-complex-type-input-parameter-tp16807526p16807526.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Reply all
Reply to author
Forward
0 new messages