AXIS调用web service出错~!提示目标服务为null~~~????帮帮忙!
deploy.wsdd:
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="SoapService" provider="java:RPC">
<parameter name="className" value="pfwang.SoapService"/>
<parameter name="allowedMethods" value="*"/>
</service>
</deployment>
执行:java org.apache.axis.client.AdminClient -lhttp://localhost:8008/axis/services/AdminService deploy.wsdd 提示Done
server-config.wsdd:
<service name="SoapService" provider="java:RPC">
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="pfwang.SoapService"/>
</service>
pfwang.SoapService.java:
package pfwang;
public class SoapService
{
public Integer testSoap(Integer arg,Integer arg1)
{
return (new Integer((arg.intValue()+arg1.intValue())*2));
}
}
客户端调用代码:
Service service = new Service();
Call call = (Call) service.createCall();
URL endPoint = new URL("http://192.168.90.28:9080/axis/servlet/AxisServlet");
call.setTargetEndpointAddress(endPoint);
call.setOperationName("testSoap");
call.setProperty(Call.NAMESPACE,"SoapService");
Object result = null;
result = call.invoke(params);
错误提示:
64282 2006-03-02 16:33:58,653 ERROR -The AXIS engine could not find a target
service to invoke! targetService is null