Skip to Content
avatar image
Former Member

Accessing external webvservice from WAS 6.2

Hi,

I am trying to access a web service from http://www.webservicex.net/globalweather.asmx

when I execute the request_response method of the CSoapTransportHttp class object i get a communications failed exception, I am however able to contact a webservise running on my system, which in turn calls the aforementioned webservice, my question thus is, do i need to configure some addtional settings like the specifying the proxy server and if so then how to go about it.

Thanks and Regards,

Aniruddha

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 23, 2004 at 10:34 AM

    Hi Aniruddha,

    I just tested this Web Service with our new Sneak Preview Web AS 6.40 which will be available in the third week of February on SDN for download. It worked perfectly. So you may want to wait another 3 weeks? I know that there are some bugs when it comes to Web Services in the current version you have.

    Cheers

    Ivo

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Ivo

      Did you try if the Google or Amazon Web Service works well on the new preview?

      Our NDS version much newer than the old (current) preview, and most web services seem to work well. However, we didn't succeed with Google nor Amazon yet.

      I had some nice demo scenarios with these web services in mind (combined with Web Dynpro), but unfortunately only some less attractive web services worked well until now.

      Thanks in advance & kind regards,

      Rob

      PS. I also posted following details in the Web Dynpro Area last week:

      -

      -


      Null Pointer Exception when consuming Amazone (or Google Web) Web Service

      Vorheriges Thema | Nächstes Thema | Themenliste | Thema ausblenden

      Rob van Kaathoven Gesendet am: 22.01.04 05:23:01

      With our NetWeaver Developer Studio version (Version: 2.0.3, Build: 200310160341), consuming web services, which we generated out of Session Beans, works perfectly. We're using this functionality frequently.

      However, when we try to consume external web services by importing the corresponding WSDL file, this only seems the work for very simple model structures (e.g. a simple currency converter web service).

      When we try to consume the Amazon web service or the Google web service e.g., we get a Nullpointer exception at the moment the model is bind to the context (see further details below).

      Did anyone succeed in consuming the Amazon or Google web services?

      Many thanks in advance,

      Rob

      PS. We know that a key (Google), or keyword fields etc. (Amazon) for these web services have to be filled before the actual web service call, but our problem appears already before the .execute() method is called.

      Details:

      -

      -


      wsdl url: http://soap.amazon.com/schemas2/AmazonWebServices.wsdl

      Context-Node:

      SearchBooks

      keywordSearchRequest

      .. etc.

      Response

      .. etc.

      wdDoInit coding:

      //@@begin wdDoInit()

      Request_AmazonSearchPort_keywordSearchRequest req =

      new Request_AmazonSearchPort_keywordSearchRequest();

      wdContext.nodeSearchBooks().bind(req); // <---HERE THINGS GO WRONG!!

      //@@end

      Coding for web service execution:

      //@@begin onActionSearchPressed(ServerEvent)

      try {

      // ... fill required fields (keywords string e.g.) ...

      wdContext.currentSearchBooksElement().modelObject().execute();

      } catch (Exception e) {

      // ...

      }

      wdContext.nodeResponse().invalidate();

      //@@end

      -

      -


      Error stacktrace: (appears immediately, when starting the web dynpro application)

      com.sap.tc.webdynpro.services.cal.core.exceptions.ClientRuntimeException

      at com.sap.tc.webdynpro.clientimpl.csf.client.CSFClient.sendResponse(CSFClient.java:489)

      at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:573)

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

      at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:236)

      at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:137)

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

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

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

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

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

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

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

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

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

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

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

      at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

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

      Caused by: com.sap.tc.webdynpro.services.cal.core.exceptions.ClientRuntimeException

      at com.sap.tc.webdynpro.clientimpl.csf.client.CSFUpdateClientPeer.sendResponse(CSFUpdateClientPeer.java:177)

      at com.sap.tc.webdynpro.clientimpl.csf.client.CSFClient.sendResponse(CSFClient.java:486)

      ... 22 more

      Caused by: java.lang.NullPointerException

      at mode.ws.proxies.types.ComplexType_ProductInfo.setDetails(ComplexType_ProductInfo.java:150)

      at mode.ws.proxies.types.ComplexType_ProductInfo.getDetails(ComplexType_ProductInfo.java:137)

      at components.searchbooks.wdp.InternalSearchBooks$DetailsNode.doSupplyElements(InternalSearchBooks.java:1387)

      at com.sap.tc.webdynpro.progmodel.context.Node.supplyElements(Node.java:361)

      at com.sap.tc.webdynpro.progmodel.context.Node.getElementList(Node.java:325)

      at com.sap.tc.webdynpro.progmodel.context.Node.createMappedElementList(Node.java:453)

      at com.sap.tc.webdynpro.progmodel.context.Node.supplyElements(Node.java:348)

      at com.sap.tc.webdynpro.progmodel.context.Node.getElementList(Node.java:325)

      at com.sap.tc.webdynpro.progmodel.context.Node.getElements(Node.java:310)

      at com.sap.tc.webdynpro.progmodel.context.Node.size(Node.java:652)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeOrElements(DataContainerRenderer.java:601)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeOrElements(DataContainerRenderer.java:690)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeOrElements(DataContainerRenderer.java:690)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeOrElements(DataContainerRenderer.java:690)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeOrElements(DataContainerRenderer.java:690)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeOrElements(DataContainerRenderer.java:552)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeInfo(DataContainerRenderer.java:262)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeInfo(DataContainerRenderer.java:285)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeInfo(DataContainerRenderer.java:285)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeInfo(DataContainerRenderer.java:285)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeInfo(DataContainerRenderer.java:285)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitContext(DataContainerRenderer.java:181)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitDataContainer(DataContainerRenderer.java:127)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.render(DataContainerRenderer.java:93)

      at com.sap.tc.webdynpro.clientserver.renderer.AbstractRenderManager.render(AbstractRenderManager.java:61)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.core.CSFResponseRenderer.renderDataContainerUpdates(CSFResponseRenderer.java:804)

      at com.sap.tc.webdynpro.clientimpl.csf.renderer.core.CSFResponseRenderer.renderUserInterfaceUpdates(CSFResponseRenderer.java:1183)

      at com.sap.tc.webdynpro.clientimpl.http.client.AbstractUpdateClientPeer.sendResponse(AbstractUpdateClientPeer.java:146)

      at com.sap.tc.webdynpro.clientimpl.csf.client.CSFUpdateClientPeer.sendResponse(CSFUpdateClientPeer.java:171)

      ... 23 more