[mule-user] Exception in Web service client for Axis Web Services@Mule 2.1.2

0 views
Skip to first unread message

Nirav

unread,
Mar 3, 2009, 9:34:06 AM3/3/09
to us...@mule.codehaus.org

Hi,

I have created a component and exposed it as a web service using
<axis:inbound-endpoint/>

In my component I have two methods,

public String CallString(String str){... return "Hello "+str;}
public SampleBean CallBean(String str1, String str2){ SampleBean sb = new
SampleBean(); ... return sb;}

Now using AXIS 1.4's WSDL2JAVA tool I have created client for my webservice
and I am able to call "CallString" method successfully but I get
ADBException when I am trying to call "CallBean" method which is returning
SampleBean.

I have attached <<WSClientCode.zip>> which is having auto generated code fro
web service client, <<WSComponentCode.zip>> which is having code for MULE
component and MULE configuration file.

Thank you,
Nirav. http://www.nabble.com/file/p22309726/WSClientCode.zip
WSClientCode.zip http://www.nabble.com/file/p22309726/WSComponentCode.zip
WSComponentCode.zip http://www.nabble.com/file/p22309726/axis-config.xml
axis-config.xml
--
View this message in context: http://www.nabble.com/Exception-in-Web-service-client-for-Axis-Web-Services%40Mule-2.1.2-tp22309726p22309726.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,
Mar 4, 2009, 3:26:36 AM3/4/09
to us...@mule.codehaus.org
Hello,

I was going to suggest looking at
http://www.mulesource.org/display/MULE2USER/Configuring+Axis#ConfiguringAxis
-TypeMappings but then I saw your SampleBean code and figured that you don't
need it.

Can you include the error message that you get? Perhaps there's more info in
it.

A


Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
email: antoin...@ricston.com | blog: blog.ricston.com | web: ricston.com

Nirav

unread,
Mar 4, 2009, 3:49:28 AM3/4/09
to us...@mule.codehaus.org

Thanks for Reply Antonie.

Please find error message below,

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement CallBeanReturn
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.mule.example.ws.axis.SampleWSStub.fromOM(SampleWSStub.java:3370)
at org.mule.example.ws.axis.SampleWSStub.CallBean(SampleWSStub.java:468)
at org.mule.example.ws.axis.SampleWSClient.main(SampleWSClient.java:15)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException:
Unexpected subelement CallBeanReturn
at
org.mule.example.ws.axis.SampleWSStub$SampleBean$Factory.parse(SampleWSStub.java:1254)
at
org.mule.example.ws.axis.SampleWSStub$CallBeanResponse$Factory.parse(SampleWSStub.java:2161)
at org.mule.example.ws.axis.SampleWSStub.fromOM(SampleWSStub.java:3364)
... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement
CallBeanReturn
at
org.mule.example.ws.axis.SampleWSStub$SampleBean$Factory.parse(SampleWSStub.java:1215)
... 4 more

Even if you can help me to decide what to use between Axis client and MULE
client?

Right now I am also trying to configure mule client but I am not able to
pass String[] as argument(Refered from
http://www.mulesource.org/display/MULE2USER/Using+the+Mule+Client) by
following code,

...
...
String[] args = new String[]{"1", "Bharat"};
MuleClient client = new MuleClient();
MuleMessage result =
client.send("axis:http://localhost:8100/services/webservice?method=handle",
args, null);

Object[] o = (Object[])result.getPayload();
...
...

Shall I make a new post for this?

Thanks again,
Nirav.

--
View this message in context: http://www.nabble.com/Exception-in-Web-service-client-for-Axis-Web-Services%40Mule-2.1.2-tp22309726p22325932.html

Antoine Borg

unread,
Mar 5, 2009, 4:16:49 AM3/5/09
to us...@mule.codehaus.org
Hi Nirav,

First point - Axis in Mule is Axis 1.4 but you seem to be using Axis 2 to
invoke the web service. Check to see if there's something you should be
configuring to allow for this.

Secondly, a separate post for the MuleClient issue would help future
researchers. Make sure to include the error that's being raised too.

HTH

A


Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
email: antoin...@ricston.com | blog: blog.ricston.com | web: ricston.com

-----Original Message-----
From: Nirav [mailto:nir...@i-logicon.co.in]
Sent: Wednesday, March 04, 2009 9:49 AM
To: us...@mule.codehaus.org
Subject: RE: [mule-user] Exception in Web service client for Axis Web
Services@Mule 2.1.2


Thanks for Reply Antonie.

Thanks again,
Nirav.

> ngAxis -TypeMappings but then I saw your SampleBean code and figured

Reply all
Reply to author
Forward
0 new messages