Hi Thomas

I am using Apache Axis for Java client to access the .NET web service. I am 
able to invoke the .NET WS but i am not able to pass the parameters. In the 
.NET WS the parameters are received as NULL values. I searched the internet and 
found that AXIS uses SOAP RPC encodying style and .NET by default uses 
Document/Literal. I changed that also in the .NET WS. I dont know what else i 
have to do in the .NET side since i dont have any idea in .NET. 

I am pasting my Java client here

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.description.OperationDesc;
import org.apache.axis.message.RPCElement;

public class WSClient
{
   public static void main(String [] args) throws Exception
   {
                System.out.println("Before WEB SERVICE");
                String endpoint = 
"http://eproindia28/createsubscription-WS/Service1.asmx";;
                Service service = new Service();
                Call    call    = (Call) service.createCall();
                call.setTargetEndpointAddress( new java.net.URL(endpoint) );
                call.setOperationName("HelloWorld");
                System.out.println("---------5--------------");
                call.setSOAPActionURI("http://tempuri.org/HelloWorld";);
                call.addParameter("strRet", 
org.apache.axis.Constants.XSD_STRING, ParameterMode.IN);
                call.setReturnClass(String.class);

                
System.out.println("-----6--getMessageContext()------------"+call.getMessageContext());
                System.out.println("-----6--getOperation() 
------------"+call.getOperation() );
                System.out.println("-----6--getPortName() 
------------"+call.getPortName());
                
System.out.println("-----6--getSOAPActionURI()------------"+call.getSOAPActionURI());
                
System.out.println("-----6--getUsername()------------"+call.getUsername());
                
System.out.println("-----6--getEncodingStyle()------------"+call.getEncodingStyle());
                
System.out.println("-----6--getService()------------"+call.getService());
                
System.out.println("-----6--getOperationName()------------"+call.getOperationName());
                
System.out.println("-----6--getWSDLDocumentLocation()------------"+service.getWSDLDocumentLocation()
 );

                try
                {
                        String strTemp = (String)call.invoke( new Object[] {"HI 
prasanna this is a test input to the .NET WS"});
                        
System.out.println("---------strTemp--------------"+strTemp);
                }
                catch (Exception e)
                {
                        e.printStackTrace();
                }
                System.out.println("AFTER WEB SERVICE --->");
   }
}

Please tell me where i am going wrong...

Thanks in Advance
Prasanna

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3860400#3860400

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3860400


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to