• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Web Service Call : Java Error

New Here ,
Dec 22, 2008 Dec 22, 2008

Copy link to clipboard

Copied

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 ?
TOPICS
Advanced techniques

Views

364

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 29, 2008 Dec 29, 2008

Copy link to clipboard

Copied

LATEST
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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation