开发者

how can I share proxy objects across multiple Axis2 web service clients?

开发者 https://www.devze.com 2022-12-19 02:28 出处:网络
I have several WCF services that I want to access from a Java client.The services have some complex data contracts used across multiple services.I want to be able to generate client code that will all

I have several WCF services that I want to access from a Java client. The services have some complex data contracts used across multiple services. I want to be able to generate client code that will allow me to share the objects generated from the data contracts across all the services. Basically I want to be able to retrieve data from one service and pass it to another.

This was pretty easy to accomplish in .NET using SvcUtil.exe, so I'm thinking there开发者_如何转开发 has to be a way to do it in Java. I've been using Axis2 for it's ws-security support, but I'm not committed to that tool. Any ideas on how I can accomplish this?


Found the answer, in case anyone needs it... The Axis2 wsdl2java tool --unpack-classes (-u) switch moves the classes out of the generated service stub.

example command line:

"C:\Program Files (x86)\Java\axis2-1.5.1\bin\wsdl2java.bat" -noBuildXML -u -uw -p org.sample -uri http://localhost/SampleWcfServiceApp/Service1.svc?wsdl

"C:\Program Files (x86)\Java\axis2-1.5.1\bin\wsdl2java.bat" -noBuildXML -u -uw -p org.sample -uri http://localhost/SampleWcfServiceApp/Service2.svc?wsdl

0

精彩评论

暂无评论...
验证码 换一张
取 消