0 Replies Latest reply on Oct 15, 2005 2:03 AM by Anand kumar

    passing parameters to .Net webservice through java

    Anand kumar Newbie

      Hi Thomas,

      plz help me form this thinking if this problem comes in jboss what will u reply bez i saw a message in jboss exactly the same give by parsanna_b2001@yahoo.co.in to you thomas @jboss.com
      plz give reply.

      I am new to Apache axis and web services
      The below code is invoking the .Net web service but it is not passing the values which sent to the .NET web service .

      Here is my code:

      <%@ page import="java.util.Date,org.apache.axis.client.Call,
      java.io.IOException ,org.apache.axis.soap.SOAPConstants,
      org.apache.axis.encoding.XMLType,javax.xml.rpc.ServiceFactory;" %>
      String endpoint = "";
      Service service = new Service();
      QName Qname = new QName(" http://tempuri.org/WebService1/Service1","HelloWorld");
      Call call = (Call) service.createCall(Qname);
      call.setTargetEndpointAddress (new java.net.URL(endpoint));
      call.setProperty(call.SOAPACTION_USE_PROPERTY, new Boolean(true));
      call.setProperty(call.SOAPACTION_URI_PROPERTY," http://tempuri.org/WebService1/Service1/HelloWorld");
      call.setOperationName(new QName("http://tempuri.org/WebService1/Service1","HelloWorld")) ;
      String msg = (String) call.invoke(new Object[]{" Anand "});
      out.println ("Received : " + msg +" ");
      }catch(Exception e)
      out.println("error "+ e.getMessage());
      Out put for this Above is :
      To Day's Date : Wed Sep 28 10:29:00 IST 2005 Received : null