java 调用 net做的Web Services问题,请教高手!

xiaoyan21 2005-03-07 10:31:57
java 调用 net做的Web Services问题:
net Web Services 的借口函数
public string Test(string str)
{
string resStr = "" ;
retrun resStr = "[diaoyong:]"+str;
}

java调用程序
<%@ page language="java" %>
<%@ page import="javax.xml.namespace.QName" %>
<%@ page import="org.apache.axis.encoding.XMLType" %>
<%@ page import="org.apache.axis.client.Service" %>
<%@ page import="org.apache.axis.client.Call" %>
<%@ page import="javax.xml.rpc.ParameterMode" %>
<%
String endpoint = "http://url/nbdctest/test.asmx?wsdl";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName( "Test" );
call.addParameter( "str", XMLType.XSD_STRING, ParameterMode.IN );
call.setReturnType( XMLType.XSD_STRING );
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://tempuri.org/Test");

String str= new String( "test" );
Object status = call.invoke( new Object[] {str} );

System.out.println( ">> begin JWTSSendLog" );
System.out.println( "status=" + status.toString() );
out.println( "status=" + status.toString() );
System.out.println( ">> end " );
%>

结果:[diaoyong:];
说明:java传递过去的参数值为空,

请问各位兄弟:为什么java传递到net服务接口中的参数值为空呢?是否字符格式的问题
...全文
188 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
tigerlg 2005-03-07
  • 打赏
  • 举报
回复
.net里面有问题,请查查.net的写法
god9 2005-03-07
  • 打赏
  • 举报
回复
关注
一百减一 2005-03-07
  • 打赏
  • 举报
回复
up

67,550

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧