cancel
Showing results for 
Search instead for 
Did you mean: 

how to consume web service in j2ee app

ramanender_singh
Explorer
0 Kudos

Hi

I am trying to consume a web service in a j2ee web app.

In Nwds 7.0 there was an option to create a deployable proxy project which could be referenced in the web project.

However now I am using NWDS 7.3 and i do not see an option to create a deployable proxy project

neither do i get the option of switching to web services perspective.

In NWDS 7.3 i imported the wsdl file into my web module and then by right clicking generated the client.

This generates the proxy classes but i do not see an option to configure the logical ports.

In NWDS 7.0 the logical ports had a security tab where i could configure the authentication details etc

Can someone please guide how this is done in NWDS7.3

Thanks

Ramanender Singh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ya even i'm having the same doubt .can you plz reply as soon as possible .

ramanender_singh
Explorer
0 Kudos

hi karthik

After you have imported the wsdl into your web dc.

1. Right click on the wsdl -> Web Services-> Generate Client

2. In the Web Service Client window opens..

     a. Ensure the that correct Web dc and Ear dc are selected

     b. move the slider to Deploy Client

     c. Click Finish

This will generate the proxy classes

3. Create the servlet where you want to consume the web service

4. In the servlet specify the web service reference as

WebServiceRef(name = "webServiceName")

SEIClass sEIObject;

5 In the post or get method use the following code

LogicalPortClass lpObj = sEIObject.getLogicalPort();

set input params and call the method.

6. Package the war into an ear and deploy

7. In NWA goto SOA tab->Application and Scenario communication -> Single Service administration

8. Goto Consumer Proxies. Search for the wsdl port type

9. Maintain authentication details for the used logical port

10. test you application

Regards

Ramanender Singh

Answers (1)

Answers (1)

Former Member
0 Kudos

thanks Ramanender Singh for your reply.  Can you tell if it is possible to create Restful Webservices instead of SOAP Webservices?

ramanender_singh
Explorer
0 Kudos

sorry i cannot help u with that. i have never used RESTful WS

Regards

Ramanender Singh