axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajnish Thakur <>
Subject Fwd: Need Help Regarding AXIS2 Client Implementation
Date Fri, 10 Jan 2014 14:51:48 GMT

Can you please help me? I have got stuck for last 4 days with AXIS2 client
also have done lot of googling as well, but couldn't get help. This is
first time I am working with AXIS2. I have a .asmx service hosted over IIS,
I have generated stub using AXIS2 (WSDL2Java -uri
approvalrequestmanager.wsdl -p ne
 t.approva.BizRights.Services -d adb)

as well as have used below command and wrote client for both.

WSDL2Java -uri approvalrequestmanager.wsdl -p net.approva.BizRights.Services
-d xmlbeans -s

I have posted this on as well PSB link-

I have written client using generated stub from above command. In my client
code there is method which accepts two parameters one is kind of string and
another is kind of OMElement(XML).

When I try to send payload XML using code below:

Create req = new Create();

   fac =;
   omNs = fac.createOMNamespace("", null);

   _valueObjXML =
fac.createOMElement("approvalrequests", omNs);

            _valueObjXML.addChild(fac.createOMText(_valueObjXML, content));



 res = stub.create(req, brSoapHeader);

*I got exception below:*

rg.apache.axis2.AxisFault: System.Web.Services.Protocols.SoapException:
Server was unable to process request. ---> System.InvalidCastException:
Unable to cast object of type 'System.Xml.XmlNode[]' to type

Looking at the exception my assumption is OMelement is getting passed as
XML type and and web service expecting string type so is there any way to
handle such situation in AXIS2.

Thanks in advance..!!

Rajnish Thakur
 Pune, INDIA

View raw message