[英]Accessing a .NET web service using a Java client
I am trying to access a .NET web service using a Java client using: 我正在尝试使用以下Java客户端访问.NET Web服务:
I am able to create a stub using the WSDL file which is given by the .NET web service. 我可以使用.NET Web服务提供的WSDL文件创建存根。 But I receive the error: 但是我收到错误:
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: MustUnderstand
headers:[{http://www.w3.org/2005/08/addressing}Action] are not understood
at com.sun.xml.internal.ws.protocol.soap.MUTube.createMUSOAPFaultException(MUTube.java:143)
at com.sun.xml.internal.ws.protocol.soap.ClientMUTube.processResponse(ClientMUTube.java:85)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:597)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
at com.sun.xml.internal.ws.client.Stub.process(Stub.java:211)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy30.helloMperks(Unknown Source)
at HTTPMain.main(HTTPMain.java:25)
when I access the .NET web service through Java client. 当我通过Java客户端访问.NET Web服务时。
But I can access the .NET web service using a .NET web client with out any error. 但是我可以使用.NET Web客户端访问.NET Web服务,而不会出现任何错误。 How can I solve this issue? 我该如何解决这个问题?
After having tried different flavors of webservice client generators I finally used Apache Axis2 as a webservice classes generator for connection with MS Dynamics both 3 and 4 version (based on .Net framework). 在尝试了不同类型的Web服务客户端生成器之后,我最终使用Apache Axis2作为Web服务类生成器,以与3和4版本(基于.Net框架)的MS Dynamics连接。 The generator (command line based) generates a bunch of classes that I copy into my src folder of my Netbeans 6.9 project from which it is compiled, build and deployed. 生成器(基于命令行)生成一堆类,我将这些类复制到Netbeans 6.9项目的src文件夹中,从中对其进行编译,构建和部署。 From there on the major difficulties I had were : 从那里开始,我遇到的主要困难是:
There's a lot of libraries to use (ear file = + 40Mb) but the thing runs fine. 有很多库可供使用(ear文件= + 40Mb),但运行正常。 I started the project on Weblogic 8 with Jdk1.4 and now it runs on Weblogic 10 with Jdk1.6. 我使用Jdk1.4在Weblogic 8上启动了该项目,现在它在具有Jdk1.6的Weblogic 10上运行。 Regards 问候
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.