Question

I am trying to consume the following web service from ColdFusion:

http://xserv.dell.com/services/assetservice.asmx

I should be able to consume the web service using the code below:

<cfscript> 
    params = structNew(); 
    params.guid = "11111111-1111-1111-1111-111111111111"; 
    params.applicationName = "test"; 
    params.serviceTags = "JLJMHX1"; 

    ws = createObject("webservice", "http://xserv.dell.com/services/assetservice.asmx?wsdl"); 

    writeDump(ws)

    ws.GetAssetInformation(params); 
</cfscript> 

The results of dumping out the WSDL information (ws), indicates that the GetAssetInformation method has the following signature:

getAssetInformation(com.microsoft.wsdl.types.Guid, java.lang.String, java.lang.String)

The service call errors every single time, saying that:

"Error Occurred While Processing Request Web service operation GetAssetInformation with parameters {11111111-1111-1111-1111-111111111111,test,JLJMHX1} cannot be found."

I am sure this is due to the method expecting a "com.microsoft.wsdl.types.Guid" data type, but how can I pass that in via ColdFusion?

I can create and run the request in Fiddler with the same data and get a response back without issue, so there is something I am doing wrong in ColdFusion.

Any help would be appreciated.

Was it helpful?

Solution

The method expects a guid and two strings. You are passing a structure. Pass the arguments separately.

ColdFusion 10 also introduces Axis 2 for web services by default. For some web services, you need to use Axis 1 which you can enable in the ColdFusion Administrator. You will also need to refresh the web service.

createObject("webservice", theURL, {refreshWSDL=true,wsVersion=1})

OTHER TIPS

I found the answer by following the instructions in this post:

Consume SOAP web service having complex types

Thanks for the help everyone!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top