简体   繁体   中英

Accessing Web Service using Play Framework 1.2.5

I am using Play framework 1.2.5 in my application in Eclipse IDE . I need to access a web service built using IBM JAX-RPC . I have got the wsdl file of the web service which I need to access in my applicatiom.

For normal Java EE applications, I used to paste the WSDL in my workspace, generate the files by right clicking the WSDL file => Generate Client option ie generating files with the help of Eclipse IDE.

I am not sure how to access the WSDL using Play framework.

I want to know:

1) Where to paste the WSDL file in my workspace?

2) In Play framework how do generate the client (Not sure even if we need this or not in play framework) and access the service methods?

3) Any additional settings needed for accessing the service methods?

Please let me know about this.

Regards,

The easy way:

Use Play!'s built-in play.libs.WS (Link #2 and #3 ). You have to create the raw HTTP requests yourself, and parse the XML result from the server yourself. Of course, this can become a complex task, if the web service interface is complex.

Preferably, you will create a JAX-RPC client based on your WSDL , and use it from your Play! application.

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