d***@gmail.com
2009-01-14 17:16:06 UTC
I am really stuck - maybe somebody can help.
Below is the complete .NET web service (web method) and java client
code calling it. I can call this method and get a result back without
a problem - however I can not send a parameter to the web service, all
that comes in is null (Nothing) this is VB.NET.
Does anybody have any clue as to why this is happening?
BTW - if you call the web service from the .net web page that get
created automatically by .NET it works - so I think it is on the java
end - but what could be causing this?
any help?
.net web method-----------------------------------------------------
Public Class WebService
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function HelloWorld(ByVal paramString As String) As String
HelloWorld = "Hello World ee"
End Function
End Class
.net web method-----------------------------------------------------
.java client (using axis
1.2)-----------------------------------------------------
String result = "";
String url = "http://localhost:2161/WebServiceTest/
WebService.asmx";
String action = "http://tempuri.org/HelloWorld";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(url));
call.setOperationName(new QName("http://tempuri.org/
HelloWorld","HelloWorld"));
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://tempuri.org/
HelloWorld");
call.addParameter("paramString",
org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.Constants.XSD_STRING);
call.setUseSOAPAction(true);
call.setSOAPActionURI(action);
Object[] params = {new String("test")};
result = (String)call.invoke(params);
.java client (using axis
1.2)-----------------------------------------------------
Below is the complete .NET web service (web method) and java client
code calling it. I can call this method and get a result back without
a problem - however I can not send a parameter to the web service, all
that comes in is null (Nothing) this is VB.NET.
Does anybody have any clue as to why this is happening?
BTW - if you call the web service from the .net web page that get
created automatically by .NET it works - so I think it is on the java
end - but what could be causing this?
any help?
.net web method-----------------------------------------------------
Public Class WebService
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function HelloWorld(ByVal paramString As String) As String
HelloWorld = "Hello World ee"
End Function
End Class
.net web method-----------------------------------------------------
.java client (using axis
1.2)-----------------------------------------------------
String result = "";
String url = "http://localhost:2161/WebServiceTest/
WebService.asmx";
String action = "http://tempuri.org/HelloWorld";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(url));
call.setOperationName(new QName("http://tempuri.org/
HelloWorld","HelloWorld"));
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://tempuri.org/
HelloWorld");
call.addParameter("paramString",
org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.Constants.XSD_STRING);
call.setUseSOAPAction(true);
call.setSOAPActionURI(action);
Object[] params = {new String("test")};
result = (String)call.invoke(params);
.java client (using axis
1.2)-----------------------------------------------------