Accessibility

TechNote

Passing complex data structures to web services

Issue


When passing complex data structures (arrays of objects, multidimensional arrays, objects containing arrays, and so on) to or from a web service operation, an error similar to the following occurs:

Error opening URL "<your web service url>"
faultactor: http://webservices.components.crd
faultNamespaceURI: undefined
element: undefined
detail: undefined
faultstring: Unable to connect to endpoint: URL "your web service url"
faultcode: Server.Connection

Reason


The WebServiceConnector supports simple and complex data types, however ColdFusion and Axis will generate a connection error based on the following conditions:

Coldfusion web service
Data sent as a simple Array works, but an object with an array as a property will create an error. For example:

 var foo:Object = new Object(); var bar:Array = new Array("a", "b", "c"); foo.baz = bar; // ----- The following line does not work ----- var logResult = resourceService.logMe(foo);   // ----- The following line works as expected ----- var logResult = resourceService.logMe(bar); 

Axis web service
Sending arrays of objects to or from Flash and an Axis web service does not work because the SOAP messages generated are not well-formed.

Solution


If you need to pass complex data types to and from web services using ColdFusion or Axis servers, you can use Flash Remoting to send and receive the data.

Note: No issues with sending or receiving complex data types with Flash have been found with .NET web services.

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_19047
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox

Products Affected: