• Post Reply Bookmark Topic Watch Topic
  • New Topic

adding parameters to call an operation using axis clent

 
kandy veer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Code
Service service = new Service();
Call call = (Call) service.createCall();
call.setOperationName("operation1");
call.setTimeout(timeoutInSeconds * 1000);
call.setTargetEndpointAddress(new URL(url));
call.addParameter("name",XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
call.addParameter("school", XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
call.addParameter("request", XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
call.invoke(new Object[] { "abc1" ,"abc", input.getAsString()} );



Sample SOAP encoded request is

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1peration1 xmlns:ns1="abc" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<name xsi:type="xsd:string">test</name>
<school xsi:type="xsd:string">tester</school>
<request xsi:type="xsd:string"> some valid xml </request>
</ns1peration1>
</SOAP_ENV:Body>
</SOAP-ENV>


Issue:

call.addParameter method doesnt seems to work. There is no error but the system,out,println statements are not displayed after this line. Is this correct approach or is there any other way to call this service.

You help is greatly appreciated.

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!