我已根据此链接http://px.pats.no/px/Eclipse_tutorial.html创建了网络服务客户端 我确实意识到我正在使用WSDL1.1规范。
从我的WSDL中我有以下服务部分(删除了xml标签,因为我无法在SO中粘贴)
service name =“BAPI_CUSTOMER_DISPLAYService” 通过SOAP文档记录SAP Service BAPI_CUSTOMER_DISPLAY port name =“BAPI_CUSTOMER_DISPLAYPortType”binding =“s0:BAPI_CUSTOMER_DISPLAYBinding” soap:地址位置=“http:// * * :8000 / sap / bc / soap / rfc” 港口 服务
以下是我的客户 BAPI_CUSTOMER_DISPLAYService locator = new BAPI_CUSTOMER_DISPLAYServiceLocator(); URL urlLocation; urlLocation =新网址(“http:// * * :8000 / sap / bc / soap / rfc”);
System.out.println(locator.getBAPI_CUSTOMER_DISPLAYPortTypeAddress());
BAPI_CUSTOMER_DISPLAYBindingStub sapStub = new BAPI_CUSTOMER_DISPLAYBindingStub(urlLocation,locator);
sapStub.setUsername("****");
sapStub.setPassword("*****");
sapStub.BAPI_CUSTOMER_DISPLAY("1");
我收到以下错误 AxisFault faultCode:{http://xml.apache.org/axis/}HTTP faultSubcode: faultString:(403)禁止 faultActor: faultNode: faultDetail: {}:返回码:403 此服务需要客户端证书进行身份验证过程 {http://xml.apache.org/axis/} HttpErrorCode:403
禁(403) 在org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744) 在org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) 在org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) 在org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) 在org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) 在org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) 在org.apache.axis.client.Call.invokeEngine(Call.java:2784) 在org.apache.axis.client.Call.invoke(Call.java:2767) 在org.apache.axis.client.Call.invoke(Call.java:2443) 在org.apache.axis.client.Call.invoke(Call.java:2366) 在org.apache.axis.client.Call.invoke(Call.java:1812) 在functions.rfc.sap.document.sap_com.BAPI_CUSTOMER_DISPLAYBindingStub.BAPI_CUSTOMER_DISPLAY(BAPI_CUSTOMER_DISPLAYBindingStub.java:234) 在functions.rfc.sap.document.sap_com.SAPClient.main(SAPClient.java:33)
感谢任何帮助。我的意图是使用任何Java技术来使用服务。 这很紧急。