Skip to main content
Known Participant
December 22, 2008
Question

Web Service Call : Java Error

  • December 22, 2008
  • 1 reply
  • 436 views
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 ?
This topic has been closed for replies.

1 reply

Inspiring
December 29, 2008
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