This content has been marked as final. Show 4 replies
Can you get the web service to work when it returns a simple data type?
If so, then Axis may not understand a DataSet. That is one of the issues with .NET web services, is that DataSets are only consumable by other .NET web services.
You may need to convert the DataSet to XML yourself and send the XML as a string.
If your problem is consuming the .NET DataSet from CF take a look at chapter 25 of "Advanced Macromedia ColdFusion MX 7 Application Development" by Ben Forta. The chapter includes a sample converting a .NET DataSet to a ColdFusion struct.
I would recommend against using the .NET DataSet as the return type for your web services. Only a .NET consumer will understand how to handle DataSets out of the box without needing additional coding. Instead create a class for each type of object you wish to return. If you are new to .NET I can provide a basic sample if you would like one.
Thanks for the help.
I can consume the web service if it returns a simple data type. I will check out the chapter in Ben Forta's book.
I'll share a similar situation which may help you get through yours. I published a web service using CF. One of the parameters passed into this web service was a ColdFusion structure. In fact, it was simply the entire FORM scope (which CF can treat as a structure). It worked fine--when consumed by CF. My challenge was to ensure that it would also be consumable by .NET (or any other language). To do this, I established an XML schema that can be used to represent the entire FORM scope. This permitted .NET consumers to perform some processing against their FORM scope and build what amounts to a string of plain text, marked up with XML, which contains all the name/value pairs submitted through the FORM. When this string is passed into the CF web service, I use CF's isStruct() function to see if it's a CF structure. If yes, processing continues. If not, I use CF's isXML() function to see if it's a string of XML. If so, I use the XMLParse() function to create an XML object out of it which can then be processed and converted into a CF structure--a structure identical to what would have been passed into the web service had it been consumed by a CF to begin with. Works beautifully. Hope that helps.