Skip to Content
author's profile photo Former Member
Former Member

Exception while invoking web service

Hi all,

I am trying to consume a web service which is actually a BAPI which is being exposed as a WS. The BAPI is BAPI_COMPANYCODE_GETLIST. The following is the code that I use to execute the Web service:

/***************************Code Begins*************************/

MO_CompanyWS model_inst = new MO_CompanyWS();

Request_BAPI_COMPANYCODE_GETLIST request_para = new Request_BAPI_COMPANYCODE_GETLIST(model_inst);

BAPI_COMPANYCODE_GETLIST input_values = new BAPI_COMPANYCODE_GETLIST(model_inst);

request_para.setBAPI_COMPANYCODE_GETLIST(input_values);

wdContext.nodeRequest_BAPI_COMPANYCODE_GETLIST().bind(request_para);

try

{

wdContext.currentRequest_BAPI_COMPANYCODE_GETLISTElement().modelObject().execute();

}

catch(Exception exp)

{

wdComponentAPI.getMessageManager().reportException(

"Exception - " + exp,

true);

}

/*************************Code Ends**************************/

I am getting the exception as follows - java.io.FileNotFoundException: C:\Documents and Settings\Desktop\ZGetCompanyList.xml (The system cannot find the path specified)

at java.io.FileInputStream.open(Native Method)

at java.io.FileInputStream.<init>(FileInputStream.java:106)

at java.io.FileInputStream.<init>(FileInputStream.java:66)

at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:69)

at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:156)

Can someone help me out in getting the problem solved?

Here is the detailed exception -

com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WSDL URL ' C:\Documents and Settings\Desktop\ZGetCompanyList.xml' and service factory configuration 'null'

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

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

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

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

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

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

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

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

at com.cts.wsmodel.MO_CompanyWS.<init>(MO_CompanyWS.java:51)

at com.cts.bapiws.BAPIWSView.wdDoInit(BAPIWSView.java:111)

at com.cts.bapiws.wdp.InternalBAPIWSView.wdDoInit(InternalBAPIWSView.java:233)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)

at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)

at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)

at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)

at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)

at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)

at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)

at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)

at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:183)

at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:178)

at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)

at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:707)

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

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

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

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

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

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

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)

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

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

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

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

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

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

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

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

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

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

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)

Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.WebserviceClientException: GenericServiceFactory initialization problem. Could not load web service model. See nested exception for details.

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

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:420)

... 45 more

Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.ProxyGeneratorException: Proxy Generator Error. Problem with WSDL file parsing. See nested message.

at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ProxyGenerator.generateProxy(ProxyGenerator.java:182)

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

... 49 more

Caused by: com.sap.engine.lib.xml.util.NestedException: IO Exception occurred while parsing file: C:\Documents and Settings\Desktop\ZGetCompanyList.xml (The system cannot find the path specified) -> java.io.FileNotFoundException: C:\Documents and Settings\Desktop\ZGetCompanyList.xml (The system cannot find the path specified)

at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadDOMDocument(WSDLDOMLoader.java:1038)

at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadWSDLDocument(WSDLDOMLoader.java:1125)

at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ProxyGenerator.generateProxy(ProxyGenerator.java:178)

... 50 more

Caused by: java.io.FileNotFoundException: C:\Documents and Settings\Desktop\ZGetCompanyList.xml (The system cannot find the path specified)

at java.io.FileInputStream.open(Native Method)

at java.io.FileInputStream.<init>(FileInputStream.java:106)

at java.io.FileInputStream.<init>(FileInputStream.java:66)

at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:69)

at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:156)

at java.net.URL.openStream(URL.java:913)

at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:201)

at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:263)

at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:280)

at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:342)

at com.sap.engine.lib.xml.parser.DOMParser.parse(DOMParser.java:101)

at com.sap.engine.lib.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:127)

at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadDOMDocument(WSDLDOMLoader.java:1022)

... 52 more

Thanks in advance.

~Subathra M

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 30, 2007 at 07:46 AM

    Hi,

    Are your webservice or BAPI is reading data from the file specified?

    Regards

    Abhinav

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.