on 05-05-2008 3:04 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Solved .
Edited by: vln on May 7, 2008 9:43 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.