cancel
Showing results for 
Search instead for 
Did you mean: 

Deployable proxy lookup problem

mauricio_padilla
Explorer
0 Kudos

Hello SAP Community, here is my issue:

I need to access a web service in my web dynpro application, so I generated a deployable proxy from the wsdl file and deployed it to the server. I added the proxy's ClientAPI.jar to my web dynpro build path and tried to get its interface via jndi lookup, but I get a ClassCastException.

The problem here is that when I look for my proxy in Visual Administrator's JNDI Registry, the class name is different from the one in Client API, as follows:

JNDI Registry: ConsultaPadronServiceImpl

Client API: ConsultaPadronService

Debugging the code I can see that I get ConsultaPadronServiceImpl in my lookup, but when I try to do the casting to ConsultaPadronService I get the exception.

Here is my code:


try{
		InitialContext ctx = new InitialContext();
		Object obj = ctx.lookup("wsclients/proxies/sap.com/FonhapoWS/mx.gob.conavi.sap.ws.fonhapo.FonhapoProxy");
		ConsultaPadronService ser = (ConsultaPadronService)PortableRemoteObject.narrow(obj, ConsultaPadronService.class);
		port = (WsConsultaPadron)ser.getLogicalPort("WsConsultaPadronSoapHttpPort");
		...

	}catch (Exception ex){
		IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
		msgMgr.reportException(ex.getMessage(), true);

	}

I really hope someone can help me out with this, I have already added the sharing reference to the proxy in my Web Dynpro project like <provider>/<EAR name> and still not working.

Regards.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Same issue here. did you resolve it?