简体   繁体   中英

Calling an Apache Axis 1 web service from Apache CXF

I'm trying to call an Apache Axis 1 web service from a client using CXF but coming across this issue:

java: Rpc/encoded wsdls are not supported in JAXWS 2.0

Now although switching the client would solve this problem my client is running inside Osgi and axis1 doesn't play nice.

My idea was to write a web service in either CXF or Axis2 -- so I can call it from my client -- and then use that as a proxy to call into the Axis1 web service.

Has anyone done anything this like before? Or can anyone suggest any other approaches?

Thanks

You could most certainly use the approach you are suggesting of using Axis2/CXF -> Axis 1.x, but there may be a simpler approach. Do you "own" the Axis 1.x web service? Axis 1.x often exposed services using RPC encoded WSDLs. However, you can override this in Axis 1.2 forward via the configuration file used by Axis.

Here are the docs for the Axis 1.2 service configuration specification: http://ws.apache.org/axis/java/user-guide.html#ServiceStylesRPCDocumentWrappedAndMessage

I would recommend leaving the existing service as an RPC encoded service so as to preserve any existing integrations, and simply exposing an additional service via the configuration which is document literal service, which you could then consume easily from most anywhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM