Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing Parameters to a Web Service

 
Matthew MacMillan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would certainly be using SOAPui or TCPMON to see exactly what is being sent as your SOAP request.

Bill
 
Rudy Gireyev
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic