Search code examples
javaweb-servicesjakarta-eewsdljaxb

Mapping Requests to a Nonstandard Webservice


I'm writing a bridge between two old application on our network. One has a webservice that takes URL encoded parameters (GET) and returns an XML document. Like this:

http://mytest.com/getData/?format=xml&dateStart=2012-01-01

My question is this - I can use the XSD for the xml returned and marshall it into Java objects (xjc defined).. but is there any way to map the requests/responses to a jax-ws webservice (or similar?) It's not SOAP - so I can't go the WSDL, CXF/JAX-WS route, can I?

I was really hoping for an elegant solution to this without having to code it all from scratch (URL request , returned stream, then marshal). Is there a framework out there that would allow me configure a request? I thought WSDL supported verb="GET" but sadly, I can't seem to get it working with Apache CXF and WSDL2JAVA.

Am I totally off base here?


Solution

  • I think JAX-RS may be of use here. Just create XSD schemas and convert them to Java classes, and use a REST client for that site.

    You can probably do it with CXF too. See here.