cancel
Showing results for 
Search instead for 
Did you mean: 

Asynchronous Web Services raising NULL exception

Former Member
0 Kudos

Hello experts,

I'm consuming an asynchronous WS in my WD App, I'm not expecting any response from this WS but when I execute te request I'm getting a NULL exception.. Any ideas in how to handle this WS or how to call them.. I already tested the WS with other tools like soapUI and XI's SXMB_MONI trx and I can check that the WS is working properly with the parameters I'm sending from the WD... the thing is that I'm always getting the null exception and I don't know what else to do..

Thanx in advance

JV

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Did you do bind the model correctly? You've initialized the all parameters?

Regards

Former Member
0 Kudos

This is my model / nodes instantiation and for this example I assignes fixed values, I still have the same exception.. I isolated this code and its execution in a dummy project in order to test it, as I said, got the same result.. hope u can help me out.. thanx!


  public void wsMIfoviPreValidaO( )
  {
    //@@begin wsMIfoviPreValidaO()
    WSMIfoviPreValidaO model = new WSMIfoviPreValidaO();
    Request_MIfoviPreValidaO req = new Request_MIfoviPreValidaO(model);
    DTfoviPreValida dt = new DTfoviPreValida(model);
    SolicitudValidacion sol = new SolicitudValidacion(model);
    
    sol.setFechaAplicacion("2008-02-11");
    sol.setIdStringerfaz("13");
    sol.setNumeroTicket("215");
    sol.setUsuario("Administrator");
    sol.setNombreArchivo("Fov1107.txt");
    
    dt.setSolicitudValidacion(sol);
    req.setMTfoviPreValida(dt);
    
    wdContext.nodeRequest_MIfoviPreValidaO().bind(req);
    
    try{
    	req.setInvokerProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"username");
    	req.setInvokerProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"pass");
    	
    	req.execute();
    }catch(Exception ex){
    	ex.printStackTrace();
    }
    //@@end
  }

Former Member
0 Kudos

Hi,

try it.

try{
    	req.setInvokerProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"username");
    	req.setInvokerProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"pass");
    	
wdContext.nodeRequest_MIfoviPreValidaO().modelObject().execute();
    }catch(Exception ex){
    	ex.printStackTrace();
    }

Regards

Former Member
0 Kudos

Hello Isaias, thanks for your answer, I tried this solution:


try{
    	req.setInvokerProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"username");
    	req.setInvokerProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"pass");
    	wdContext.nodeRequest_MIfoviPreValidaO().currentRequest_MIfoviPreValidaOElement().modelObject().execute();
    }catch(Exception ex){
    	ex.printStackTrace();
    }

Still I'm having the same exception.. have you implemented async web services in web dynpro before??, if so.. could you post some example code??.. Thanks again.

Cheers

JV

Former Member
0 Kudos

Hi Jesus,

I've never consumed a Async Web Service with Web Dynpro, later i will try to consume one and post the result here.

Regards

Former Member
0 Kudos

Thanks anyway for your answers, I think you'll get the same result I'm getting now.. hope you find an answer 'cause I didn't so far...

The "solution" we implemented for now is to create a facade synchronous web service, depending on the service ID the wdApp sends it calls the corresponding async WS, and then returns some value. That way the wdApp does not raise an exception and the async WS is executed, not from the wdApp directly, but from the sync WS... I repeat and agree with the people I'm working that this isn't (or shuldn't be) the best way to accomplish this issue but we're running out of time and decided to implement this "solution".

Thanks again Isaias.. and any comments or ideas from the developer community are still welcome.. cheerio!

JV

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Can you post the complete Stack Trace?

Regards

Former Member
0 Kudos

Detailed Error Information

Detailed Exception Chain

java.lang.NullPointerException

at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DOperationImpl.initParameters_DocumentStyle(DOperationImpl.java:59)

at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DOperationImpl.initParameters(DOperationImpl.java:46)

at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DOperationImpl.<init>(DOperationImpl.java:40)

at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DInterfaceImpl.initOperationNameToOperationMapping(DInterfaceImpl.java:150)

at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DInterfaceImpl.<init>(DInterfaceImpl.java:55)

at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.initPortNameToInterfaceMapping(DGenericServiceImpl.java:78)

at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.<init>(DGenericServiceImpl.java:50)

at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:71)

at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:91)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:419)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.readOperationsFromWSDL(WSModelInfo.java:371)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadataInternal(WSModelInfo.java:341)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:325)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo$Cache.getModelInfo(WSModelInfo.java:198)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getModelInfoFromCacheOrCreate(WSModelInfo.java:1029)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getModelInfoFromCacheOrCreate(WSModelInfo.java:247)

at com.sap.tc.webdynpro.model.webservice.gci.WSTypedModel.<init>(WSTypedModel.java:41)

at com.intelematica.issste.modelos.wsmifoviprevalidao.WSMIfoviPreValidaO.<init>(WSMIfoviPreValidaO.java:45)

at com.intelematica.issste.webdynpro.FIVISSSTE_Presupuesto_comp.wsMIfoviPreValidaO(FIVISSSTE_Presupuesto_comp.java:125)

at com.intelematica.issste.webdynpro.wdp.InternalFIVISSSTE_Presupuesto_comp.wsMIfoviPreValidaO(InternalFIVISSSTE_Presupuesto_comp.java:212)

at com.intelematica.issste.webdynpro.FOVISSSTE_Presupuestos_View.onActionUploadFile(FOVISSSTE_Presupuestos_View.java:272)

at com.intelematica.issste.webdynpro.wdp.InternalFOVISSSTE_Presupuestos_View.wdInvokeEventHandler(InternalFOVISSSTE_Presupuestos_View.java:153)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)

at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)

at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)

at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)

at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)

at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)

at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:711)

at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:665)

at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:232)

at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

Former Member
0 Kudos

Any ideas? Thanx ..

JV