on 06-23-2009 10:15 PM
Hi Experts
I'd developed a ejb project, and in this project i imported a service from esworkplace. I need to authenticate when i call this service, but i don't know how can i do this. I think is necessary http authentication.
I created a service group, but didn't work.
I use NW 7.1 EHP1.
Someone can help me to resolve this?
Marcos
Edited by: Marcos Brandao on Jun 23, 2009 6:21 PM
you will have to use JCOconnection,
you can take basis guy assitance and can do it along with him.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/fcadaf90-0201-0010-4091-bd0bcd7b...http://help.sap.com/saphelp_nw04/helpdata/en/69/b1f6840c324b3f892d9470a847e94f/frameset.htm
regards
nag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi welcomenag
Thanks for your reply and suggestion, but that isn't what i want. I use version 7.1, and i think i don't need call a JCO Connection. i am calling a web service in esworkplace in my ejb project and i just need authenticate it. I've read some about service groups to connect in web service with authentication. I don't how to configure this right. I know that service group is assign in my project, and there is a Provider system assign to the service group. But isn't work.
Any other suggestion will be great.
Regards
Marcos
Hi Marcos,
When calling a Web Service from proxy client within EJB you can use the following to pass in the username and password:
context.put(BindingProvider.USERNAME_PROPERTY,"userName");
context.put(BindingProvider.PASSWORD_PROPERTY,"pass");
For more detailed explation look at this help.sap.com page:
http://help.sap.com/saphelp_nwce10/helpdata/en/45/113a1221337249e10000000a155369/frameset.htm
Regards,
Alka.
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 your reply
I've done this, but the error is happen.
This is my code:
((BindingProvider) port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY,"S000XXXXXXX");
((BindingProvider) port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY,"XXXXXXXXXXXXX");
and the message error returned:
javax.ejb.EJBException: (Failed in component: xxxx.com.br/crvp~ear~services)
Exception raised from invocation of public br.com.xxxxxxxxx.xi.apo.global.ResourceSimpleByPlantResponseSync br.com.xxxxxxxxx.xi.apo.global.QueryCriticalResourceInImplBean.findCriticalResourceByPlant(br.com.xxxxxxxxx.xi.apo.global.ResourceSimpleByPlantQuerySync)
throws br.com.xxxxxxxxx.xi.apo.global.StandardMessageFault_Exception method on bean instance br.com.xxxxxxxxx.xi.apo.global.QueryCriticalResourceInImplBean@1eda952
for bean xxxx.com.br/crvp~ear~services*annotation|xxxx.com.br~crvp~ejb~services.jar*annotation|QueryCriticalResourceInImplBean
in application xxxx.com.br/crvp~ear~services.; nested exception is: javax.xml.ws.WebServiceException:
Invalid Response code (401). Server <http://erp.esworkplace.sap.com/sap/bc/srt/xip/sap/ecc_workcentre001qr/version2?sap-client=800> returned message <Unauthorized>.
javax.xml.ws.WebServiceException: Invalid Response code (401).
Server <http://erp.esworkplace.sap.com/sap/bc/srt/xip/sap/ecc_workcentre001qr/version2?sap-client=800> returned message <Unauthorized>.
Maybe i forget some steps, i just don't put the ENDPOINT_ADDRESS_PROPERTY property in BindingProvider, but others examples don't have, and if i put, the errors continues.
Any ideia?
Regards
Marcos
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.