如何调用别人提供的webservice接口?

xiaong520jl 2012-12-27 11:55:58
初次接触webservice接口,求大神相助,急,带线等待。。。

对方公司提供了一个HTTP地址 http://10.16.33.68:50000/XISOAPAdapterMessageServlet?channel=*:BS_WMS:CC_WMS_SOAP_PO_LIST 这个的一个接口

改如何调用啊。

用浏览器访问 返回的是
Message Servlet is in Status OK
Status information:
Servlet com.sap.aii.adapter.soap.web.MessageServlet (Version $Id: //tc/xpi.adapters/NW711_07_REL/src/_soap_application_web_module/webm/api/com/sap/aii/adapter/soap/web/MessageServlet.java#1 $) bound to /MessageServlet
Classname ModuleProcessor: null
Lookupname for localModuleProcessorLookupName: localejbs/ModuleProcessorBean
Lookupname for remoteModuleProcessorLookupName: null
ModuleProcessorClass not instantiated
ModuleProcessorLocal is Instance of $Proxy507
ModuleProcessorRemote not instantiated

用myEclipse new 一个 web service client 输入接口路径 点next时报错。。。
...全文
61547 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
yuanhongzhang8 2015-07-20
  • 打赏
  • 举报
回复
import java.net.MalformedURLException; import java.net.URL; import java.rmi.RemoteException; import java.util.ArrayList; import java.util.List; import javax.xml.namespace.QName; import javax.xml.rpc.ServiceException; import org.apache.axis.client.Call; import org.apache.axis.client.Service; public class TEST { public static void main(String[] args) throws ServiceException, MalformedURLException, RemoteException { List<ArrayList> list = new ArrayList<ArrayList>(); String endPoint = "http://localhost:8080/wwwWebSvc/services/Service.wsdl?wsdl"; // String endPoint = "http://localhost:6888/ormrpc/services/WSPublicServiceFacade?wsdl"; String xml="<?xml version='1.0' encoding='UTF-8'?>" + "<ROOT><datas id='1'><main>" + "<data name='xxxxxxx'>XHC/YJ/ZZ</data>" + "<data name='xxxxxxx'>201505</data>" + "<data name='xxxxxxx'>10002083</data>" + "<data name='xxxxxxx'>2015-05-08</data>" + "<data name='xxxxxxx'>0</data>" + "</main><details><detail id='1'>" + "<data name='xxxxxxx'>101.02.04.02</data>" + "<data name='xxxxxxx'>Q15050026</data>" + "<data name='xxxxxxx'>1</data>" + "<data name='xxxxxxx'>FD926737</data>" + "</detail></details></datas></ROOT>"; Service service = new Service(); Call call = (Call)service.createCall(); // call.setEncodingStyle("GBK"); call.setOperationName(new QName(endPoint,"sendTarget")); // //添加参数 call.addParameter("laiyuan", org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT); call.addParameter("biaoshi", org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT); call.addParameter("xml", org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT); // //添加返回值类型 call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING); // //设置事件相应属性 //call.setUseSOAPAction(true); call.setTargetEndpointAddress(new URL(endPoint)); String result = (String)call.invoke(new Object[]{"YIGE","TRCL",xml}); System.out.println(result+"result"); // list=new Parsexml().xmltoList(result); // System.out.println(list.get(0).get(1)+"Fname"); } }
fzu2013 2013-08-13
  • 打赏
  • 举报
回复
如果用xmlhttp来处理该怎么做???
wang_2000 2013-01-28
  • 打赏
  • 举报
回复
用xfie生成客户端代码,
personball 2013-01-08
  • 打赏
  • 举报
回复
哦,java的,不了解
personball 2013-01-08
  • 打赏
  • 举报
回复
点击项目引用,添加web引用
xiaong520jl 2013-01-07
  • 打赏
  • 举报
回复
有没有大神在啊,求助。。。
9441 2012-12-27
  • 打赏
  • 举报
回复
你让对方提供WSDL啊 就可以用webservice向导生成客户端了
xiaong520jl 2012-12-27
  • 打赏
  • 举报
回复
可对方是做SAP的 他们提供的就是SOAP的方式。
净 夜 思卐 2021-07-16
  • 举报
回复 1
@xiaong520jl 请问最后怎么解决的呢

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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