JAVA 调用别人的webservice出问题了!高手速度!!!!!!!!!!!!!!
答案:4 悬赏:70 手机版
解决时间 2021-11-08 17:12
- 提问者网友:爱了却不能说
- 2021-11-08 09:01
JAVA 调用别人的webservice出问题了!高手速度!!!!!!!!!!!!!!
最佳答案
- 五星知识达人网友:枭雄戏美人
- 2021-11-08 09:52
你的代码我没看懂,好象是少了什么东西:
webServicePoint = ude.getDicValue("webservicepoint");
webServiceName = ude.getDicValue("webservicename");
public boolean callWebService(String fileName, String type) {
Service service = null;
Call call;
String[] return_value=null;
try {
service = new Service();
call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(webServicePoint));
call.setOperationName(webServiceName);
call.addParameter("in0", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("in1", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType(XMLType.XSD_ANY);
String[] strs = new String[] { ftpPath+fileName, type };
return_value = (String[]) call.invoke(strs);
} catch (ServiceException se) {
se.printStackTrace();
} catch (MalformedURLException urle) {
urle.printStackTrace();
} catch (RemoteException re) {
re.printStackTrace();
}
if(return_value==null){
System.out.println("WebService返回NULL");
return false;
}else{
for(int i=0;i System.out.println("WebService返回"+return_value[i]);
}
return (return_value[0].equals("true"))?true:false;
}
}
webServicePoint = ude.getDicValue("webservicepoint");
webServiceName = ude.getDicValue("webservicename");
public boolean callWebService(String fileName, String type) {
Service service = null;
Call call;
String[] return_value=null;
try {
service = new Service();
call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(webServicePoint));
call.setOperationName(webServiceName);
call.addParameter("in0", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("in1", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType(XMLType.XSD_ANY);
String[] strs = new String[] { ftpPath+fileName, type };
return_value = (String[]) call.invoke(strs);
} catch (ServiceException se) {
se.printStackTrace();
} catch (MalformedURLException urle) {
urle.printStackTrace();
} catch (RemoteException re) {
re.printStackTrace();
}
if(return_value==null){
System.out.println("WebService返回NULL");
return false;
}else{
for(int i=0;i
}
return (return_value[0].equals("true"))?true:false;
}
}
全部回答
- 1楼网友:青尢
- 2021-11-08 13:06
tomcat?
- 2楼网友:摆渡翁
- 2021-11-08 12:30
架子文件的代码和clent的调用代码呢?
- 3楼网友:痴妹与他
- 2021-11-08 11:08
大哥 你啥异常啊 ~~~
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯