[mule-user] Calling external Axis2 web service with complex type

1 view
Skip to first unread message

osito

unread,
Jun 10, 2008, 4:42:21 AM6/10/08
to us...@mule.codehaus.org

Hi All,

I don't have a lot of experience with mule esb and therefore I have a
problem. I use mule 2.0 version and eclipse plug-in.

I have a .net web service with a web method - ping. If I call my web service
in browser the soap response for my web service looks like:
<?xml version="1.0" encoding="utf-8" ?>
- <Person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://localhost:4938/">
<name>name</name>
<surname>surname</surname>
</Person>

And it is my problem, because I will get a complex type person (string name
and string surname) back.

My config file is:
<model name="model">
<service name="Console I/O">
<inbound>
<stdio:inbound-endpoint system="IN"/>
</inbound>
<outbound>

<chaining-router>
<vm:outbound-endpoint path="webservice"/>
<stdio:outbound-endpoint system="OUT"/>
</chaining-router>
</outbound>
</service>

<service name="basic">
<inbound>
<vm:inbound-endpoint path="webservice"/>
</inbound>

<outbound>
<outbound-pass-through-router>
<axis:outbound-endpoint
address="http://localhost:4938/WebService.asmx?method=ping"
soapAction="http://localhost:4938/ping"
style="WRAPPED" use="LITERAL">
<axis:soap-method
method="qname{ping:http://localhost:4938/}">
<axis:soap-parameter
parameter="pingResult" type="qname{Person:http://localhost:4938/}"
mode="OUT"/>
</axis:soap-method>
</axis:outbound-endpoint>
</outbound-pass-through-router>
</outbound>
</service>
</model>

I got an error:
...
ERROR 2008-06-09 14:24:16,194 [Console I/O.2] org.apache.axis.client.Call:
Exception:
org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
which is NOT expected, in something it was trying to deserialize.
at
org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
at
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
....


I have worked on stockquote example, if I invoke:
http://www.webservicex.net/stockquote.asmx?op=GetQuote
the soap response looks like:
<string>
<StockQuotes><Stock><Symbol>IBM</Symbol><Last>124.94</Last><Date>6/6/2008</Date><Time>4:03pm</Time><Change>0.00</Change><Open>N/A</Open><High>N/A</High><Low>N/A</Low><Volume>109</Volume><MktCap>171.6B</MktCap><PreviousClose>124.94</PreviousClose><PercentageChange>0.00%</PercentageChange><AnnRange>97.04
- 129.99</AnnRange><Earns>7.666</Earns><P-E>16.30</P-E><Name>INTL BUSINESS
MAC</Name></Stock></StockQuotes>
</string>

It is easy to undersand because Mule doesn't have problem with string types,
but I don't find examples with complex types.

Cound you give me one example where a web service can to get back a complex
Types.

It is very importan to me because I can not work further.

Thanks a lot.
Tetyana.
--
View this message in context: http://www.nabble.com/Calling-external-Axis2-web-service-with-complex-type-tp17750519p17750519.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


Antoine Borg

unread,
Jun 13, 2008, 3:04:22 AM6/13/08
to us...@mule.codehaus.org
Hi,

Axis does not know how to handle the serialisation of complex data types.
You will have to declare your complex types within <axis:bean-type> elements
for the connector:

http://mule.mulesource.org/display/MULE2USER/Axis+Transport#AxisTransport-ax
isconnector

A


Antoine Borg, Senior Consultant | Tel: +356 21334457 | Fax: +356 21 334156
ricston Ltd., Lincoln, 7 Ferdinand Grech Street, Lija LJA1142, MALTA
email: antoin...@ricston.com | blog: blog.ricston.com | web: ricston.com

Reply all
Reply to author
Forward
0 new messages