各位大神有知道,java怎么调用SAP PI Webservice的吗?
浏览器访问的时候,要输入用户名跟密码。 我先通过url读取wsdl文件,然后获取webservice接口对象,最后调用其方法。但是报错。也不知道是否是这样调用的。在线求答。
String patch = Thread.currentThread().getContextClassLoader().getResource("").getPath() ;
URL url = new URL("file:"+patch+"/os_MemberTransaction_Update_Third_partyService.wsdl");
BindingProvider bp = (BindingProvider) port;
bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY,"pisuper");
bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "wenjian2015");
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://172.16.0.95:50000/dir/wsdl?p=ic/6e425b75a9923363b39afab7d2f86d7c");
错误信息如下:Exceptioninthread"main"com.sun.xml.internal.ws.client.ClientTransportException:TheserversentHTTPstatuscode405:MethodNotAllowed
atcom.sun.xml.internal.ws.transport.http.client.HttpClientTransport.checkResponseCode(UnknownSource)
atcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(UnknownSource)
atcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(UnknownSource)
atcom.sun.xml.internal.ws.api.pipe.Fiber.__doRun(UnknownSource)
atcom.sun.xml.internal.ws.api.pipe.Fiber._doRun(UnknownSource)
atcom.sun.xml.internal.ws.api.pipe.Fiber.doRun(UnknownSource)
atcom.sun.xml.internal.ws.api.pipe.Fiber.runSync(UnknownSource)
atcom.sun.xml.internal.ws.client.Stub.process(UnknownSource)
atcom.sun.xml.internal.ws.client.sei.SEIStub.doProcess(UnknownSource)
atcom.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(UnknownSource)
atcom.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(UnknownSource)
atcom.sun.xml.internal.ws.client.sei.SEIStub.invoke(UnknownSource)
at$Proxy27.osMemberTransactionUpdateThirdParty(UnknownSource)
atcom.winnermedical.pi.esb_i_crm.update.Demo_Client.main(Demo_Client.java:57)
朋友,后来这个问题解决了吗
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。