Discussion:
Cannot pass parameters to .net service from java client
(too old to reply)
d***@gmail.com
2009-01-14 17:16:06 UTC
Permalink
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)-----------------------------------------------------
Darrell Bulloch
2009-02-12 19:10:15 UTC
Permalink
I am having the same issue. Did you find a solution? If so, please e-mail
it to me at ***@csc.com.

Your help is greatly appreciated.
Post by d***@gmail.com
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)-----------------------------------------------------
Darrell Bulloch
2009-02-12 19:11:00 UTC
Permalink
Hi Darin.

Did you find a solution for this? If so, please e-mail it to me at
***@csc.com

Your help is greatly appreciated.
Post by d***@gmail.com
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)-----------------------------------------------------
y***@gmail.com
2009-02-23 13:12:14 UTC
Permalink
Hi folks,

i'm running against the same wall, did any of you find a solution to
this problem?

thanks in advance
Yago
2009-02-23 13:13:19 UTC
Permalink
Hi,

i'm having exactly the same problem... did any of you find a solution on this?
Pier-Luc Caron St-Pierre
2009-04-01 13:23:34 UTC
Permalink
Post by Yago
Hi,
i'm having exactly the same problem... did any of you find a solution on this?
Hi,

Exactly the same problem here. Any solution?

Loading...