1 Reply Latest reply on Dec 29, 2008 5:09 AM by Newsgroup_User

    Web Service Call : Java Error

    obouillaud Level 1
      Hi

      I'm trying to consume a web service with the simple code below, but it always gives me an error.

      The code:
      <cfscript>
      ws = CreateObject("webservice", " http://ws.neteven.com/NWS");
      </cfscript>

      The error :
      11. public examples.NWS.EchoResponseType echo(examples.NWS.EchoRequestType parameters) throws java.rmi.RemoteException;
      ^--------------^
      *** Semantic Error: Type "examples.NWS.EchoResponseType" was not found.


      11. public examples.NWS.EchoResponseType echo(examples.NWS.EchoRequestType parameters) throws java.rmi.RemoteException;
      ^-------------^
      *** Semantic Error: Type "examples.NWS.EchoRequestType" was not found.


      12. public examples.NWS.InventoryItemsType getItems(examples.NWS.GetItemsRequestType parameters) throws java.rmi.RemoteException;
      ^----------------^
      *** Semantic Error: Type "examples.NWS.InventoryItemsType" was not found.


      12. public examples.NWS.InventoryItemsType getItems(examples.NWS.GetItemsRequestType parameters) throws java....
      server-error: true
      Content-Language: fr-FR
      Content-Type: text/html; charset=UTF-8

      I'm using CF 8,0,1,195765 (latests hotfixes) and I even tried on a CF 7 server, it gives me the same error.

      Do you think that the web service has a problem or is it coldfusion related ?

      - I tried with an internet browser (IE, Firefox) the web service answers correct XML
      - I tried a call using PHP and it works like a charm.

      Somme suggestions ?
        • 1. Re: Web Service Call : Java Error
          Level 7
          obouillaud wrote:
          > Hi
          >
          > I'm trying to consume a web service with the simple code below, but it always
          > gives me an error.

          I think you have 2 options here:

          - save the wsdl file locally, fix the local wsdl file to make it work
          with Axis - the library that is used by ColdFusion (might take some time
          and requires some experience with wsdl);

          - use CFHTTP to communicate directly with the web service (using XML).
          You can watch the communication of the PHP client to see the structure
          of the requests/responses.

          In my opinion no 2 is easier.

          --
          Mack