This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

adding parameters to call an operation using axis clent  RSS feed

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Service service = new Service();
Call call = (Call) service.createCall();
call.setTimeout(timeoutInSeconds * 1000);
call.setTargetEndpointAddress(new URL(url));
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="" xmlns:xsi="" xmlns:xsd="">
<ns1peration1 xmlns:ns1="abc" SOAP-ENV:encodingStyle="">
<name xsi:type="xsd:string">test</name>
<school xsi:type="xsd:string">tester</school>
<request xsi:type="xsd:string"> some valid xml </request>


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.

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