Skip to Content
0
Former Member
Oct 27, 2005 at 03:04 PM

Web Service Access From DynPage

34 Views

I am trying to consume a web service from a DynPage. I created the web service proxies and deployed them. I verifyied the proxy in the JNDI Registry and it is under:

wsclients/proxies/sap.com/GoogleProxy/com.ten.ws_pxy.labnw.GoogleProxy

I created a portal component and have the portalapp.xml configured :

The code in the Dynpage is:

String key = "wsclients/proxies/sap.com/GoogleProxy/com.ten.ws_pxy.labnw.GoogleProxy";

com.ten.ws_pxy.labnw.types.GoogleSearchResult result = null;

GoogleSearchService service = null;

GoogleSearchPort port = null;

Context context;

try {

context = new InitialContext();

Object obj = context.lookup(key);

service = (GoogleSearchService) obj;

try {

port =

(GoogleSearchPort) service.getLogicalPort(

GoogleSearchPort.class);

result =

port.doGoogleSearch(.....)

....

But I receive the error:

Path to object does not exist at wsclients, the whole lookup name is webContainer/applications/sap.com/irj/irj/wsclients/proxies/sap.com/googleproxy/com.ten.ws_pxy.labnw.googleproxy.

I don´t know Why is it looking under "webContainer/applications/sap.com" instead of "wsclients/proxies/sap.com". I have tried the lookup with different keys:

wsclients/proxies/sap.com/GoogleProxy/com.ten.ws_pxy.labnw.GoogleProxy

/wsclients/proxies/sap.com/GoogleProxy/com.ten.ws_pxy.labnw.GoogleProxy

GoogleProxy/com.ten.ws_pxy.labnw.GoogleProxy

...but still getting the same error.

Any idea would be appreciated

Best Regards