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

Error message when trying to connect to a web service

New Here ,
Jan 05, 2007 Jan 05, 2007

Copy link to clipboard

Copied

Hi all,

I am trying to consume a third party web service using the attached code and i get this big massive error about complex types:


[The following information is meant for the website developer for debugging purposes.

Error Occurred While Processing Request
Complex object types cannot be converted to simple values.
The expression has requested a variable or an intermediate expression result as a simple value, however, the result cannot be converted to a simple value. Simple values are strings, numbers, boolean values, and date/time values. Queries, arrays, and COM objects are examples of complex values.
The most likely cause of the error is that you are trying to use a complex value as a simple one. For example, you might be trying to use a query variable in a <CFIF> tag. This was possible in ColdFusion 2.0 but creates an error in later versions. ]

Has anyone encountered this before or what this may mean....thanks

Code:



TOPICS
Advanced techniques

Views

272

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
Advocate ,
Jan 05, 2007 Jan 05, 2007

Copy link to clipboard

Copied

What kind of data is returned by your callcredit webservice? Try performing a cfdump on "io".

Also, the cfinvoke/webservice method usually generates the SOAP wrapper around your webservice arguments. You may want to try just passing the XML expected by Job5314 (unless, of course, the method is expecting a full SOAP message as a parameter).

i.e.
<cfsavecontent variable="strpost2">
<pwdchangerequest>
<oldpwd>oldpassword</oldpwd>
<newpwd>newpass</newpwd>
<confirmpwd>newpass</confirmpwd>
</pwdchangerequest>
</cfsavecontent>

<cfinvoke
webservice=" http://localhost/callcredit.wsdl"
method="Job5314"
returnvariable="io">
<cfinvokeargument name="io" value="#strpost2#"/>
</cfinvoke>

<cfdump var="#io#">

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
New Here ,
Jan 05, 2007 Jan 05, 2007

Copy link to clipboard

Copied

Thanks Michael...I tried what you mentioned but I still get the same error...I think my fundemental proble is I do not understand my WSDL file very well....

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
Advocate ,
Jan 05, 2007 Jan 05, 2007

Copy link to clipboard

Copied

LATEST
If you have access to them, I would try loading the WSDL as a web reference in either .NET studio or Dreamweaver MX. From there you can inspect the webservice and see what the input and output variables for the web service functions are. Its much easier that trying to read through the WSDL document if you're not familiar with the structure of the document.

If you are still having problems with the webservice, you could always contact the 3rd party developer and see if they have any sample code showing how to consume the webservice. Odds are they probably won't have anything in CF, but it might give you more of an idea of what the methods expect and return.

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