cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: Webservice consumption on JEE 5

Former Member
0 Kudos

Hi

I have a webservice provider (ABAP) and I call the WebService from a WS Client in Java (JEE 5 SAP CE). I have generated Proxies using the WSDL Url (WS Client Generator on NDS CE 710). Now I would like to use HTTP Destination, can some one please tell me how? How should I configure it on NWA and then how should I change my client code? Thanks.

regards

Lakshminarayanan.V

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

For maintaining HTTP destinations you can follow the steps below:

1.Go to NetWeaver Administrator.

2.Choose Role SOA Management --> Destination Template Mangement

3. Choose the Service Client

5.Select Edit required parameters and Save.

Programmatically:

InitialContext ctx = new InitialContext();
Service reqSrv = new Service();
Request req = (Request) reqSrv.getRequestPort();

Map propsMap = ((BindingProvider)req).getRequestContext();
propsMap.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "URL");
propsMap.put(BindingProvider.USERNAME_PROPERTY, "UserName");
propsMap.put(BindingProvider.PASSWORD_PROPERTY, "PASSWORD");

Regards,

Alka.

Edited by: Alka Panday on May 6, 2008 10:02 AM

Former Member
0 Kudos

Hi Alka

Thanks for the answer, I had solved the problem but forgot to update the thread. I am not sure if the code snippet you have given will use the created HTTP destination on NWA. I used was dependency injection on managed classes. It picks up the port type. The new Service instantiation in your code snippet will create a new instance of the service with all default parameters. But I wanted the one that takes the parameters set on the HTTP Destination. I created a Logical Port out of the proxy definition and solved the issue. Again thanks for your help.

regards

LNV

Answers (1)

Answers (1)

Former Member
0 Kudos

Solved .

Edited by: vln on May 7, 2008 9:43 AM