This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Passing Parameters to a Web Service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Passing Parameters to a Web Service" Watch "Passing Parameters to a Web Service" New topic
Author

Passing Parameters to a Web Service

Matthew MacMillan
Greenhorn

Joined: May 23, 2011
Posts: 2
Hi,

I am having a real big problem trying to figure out how to pass parameters to a web service.

The web service has a getCars request web method with 4 input parameters that are usr, pwd, domain & function.

I am using Axis2 1.5.4, and my code is below. When I call the method I get error returned, "org.apache.axis2.AxisFault: Tried to invoke method public java.lang.String com.informa.lmiu.services.web.seahawk.SoapRequest.getVessel(java.lang.String,java.lang.String,int) with arguments null,null,null. The arguments do not match the signature." : -



I have tried passing parameters as per below, after line 4 above, but that has no effect: -




cheers,
Matthew
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
I would certainly be using SOAPui or TCPMON to see exactly what is being sent as your SOAP request.

Bill
Rudy Gireyev
Ranch Hand

Joined: May 03, 2011
Posts: 39
Mathew, does this WebService offer you a WSDL? If it does you can then use Wsdl2java and then use the stubs generated for the connection and to set your parameters. Then you need not worry whether they are Attributes or Elements or what ever other syntax issue there may be.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing Parameters to a Web Service
 
Similar Threads
Creating Service and Client using AXIOM
javax.xml.stream.XMLStreamException: Undeclared prefix 'soapenv' for element <soapenv:Envelope>
Trying to create a java web service client using axis2
Invoking Live Search Web Service - via Axis Client -error AxisFault connection abort
Find THE jar containing a class Axis2