如何使用Java使用RPCEN编码的SOAP Web服务
有没有一种方法可以使用java使用SOAP web服务,只需使用:
- 所需的SOAPaction(例如名为“find”的methodname)
- web服务的URL
- 标头身份验证(用户名和密码)
- 最后输出结果
我有一个用php成功使用的示例请求xml文件,但我找不到在java上使用它的正确方法
[更新:web服务的WSDL样式为RPC/编码]
[更新#2:您可以找到我是如何解决以下问题的(通过使用IDE生成的java存根)
你可以在下面搜索框中键入要查询的问题!
有没有一种方法可以使用java使用SOAP web服务,只需使用:
我有一个用php成功使用的示例请求xml文件,但我找不到在java上使用它的正确方法
[更新:web服务的WSDL样式为RPC/编码]
[更新#2:您可以找到我是如何解决以下问题的(通过使用IDE生成的java存根)
# 1 楼答案
经过长时间的搜索,我终于找到了一种使用rpc/编码的
SOAP
web服务的方法。 我决定从wsdl url生成客户端存根一个成功的方法是通过这个链接(来源:What is the easiest way to generate a Java client from an RPC encoded WSDL)
在eclipse/netbeans调整生成的代码(java存根)之后,您只需构建客户端。 通过使用您生成的类,您可以使用首选的soap api
例如
# 2 楼答案
可以使用^{} 发送SOAP消息。e、 g: