简体   繁体   中英

Consuming REST web service like SOAP

I have an application which simply works as a translator between two web service. Hence, main goal/operation in my application is transformation from consumer XML to Gate Way XML.

So far we have integrated two SOAP web services by creating Proxy.

Now, the challenge is we require to integrate a REST web service and we can't create Proxy of it. However, request and response are in XML format.

To consume this service (REST) we have thought about following approach:

  1. Create JAXB classes by createing shcema using sample XMLs of service

Can you please suggest us any better approach? Is it possible to create Object/Class from XML at run-time? (UnMarshalling run-time)

Please guide. Thanks.

Try the REST Framework Jersey which contains the Jackson/JAX-RS Framework.
The JAX-RS Framework can you use to marshall or unmarshalling objects.

Follow these tutorial for example:

http://www.vogella.com/articles/REST/article.html

Jersey Framework:

jersey.java.net/

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