Copy link to clipboard
Copied
I have tried to get data from a .net webservice for hours now and am having absolutely no luck.
When I call a method that returns 1 record, it works fine. I can reference the data.
When multiple records are returned, it's an object and I have no idea how to read this data. Can anyone help me out? Someone else has have to had to do this before, but I can find very little documentation on how to accomplish this task. Any help would be appreciated.
I'm using CFINVOKE to call my web service, and my return results is titled "ResultSet"
When I do a CFDump on it I get
object of com.www.website.MyService.ArrayOfDatePeriods | |
---|---|
Methods | equals (returns boolean) getSerializer (returns interface org.apache.axis.encoding.Serializer) getDeserializer (returns interface org.apache.axis.encoding.Deserializer) getTypeDesc (returns org.apache.axis.description.TypeDesc) getDatePeriods (returns www.website.MyService.DatePeriods) setDatePeriods (returns void) setDatePeriods (returns void) getClass (returns java.lang.Class) wait (returns void) wait (returns void) wait (returns void) notify (returns void) notifyAll (returns void) toString (returns java.lang.String) |
Copy link to clipboard
Copied
Ah, the joys of consuming .NET web services! You identified the issue - the .NET web service is actually returning a complex object (or an array of complex objects) instead of a simple value that CF can easily translate into a native data type. Unfortunately, this means that you'll have to retrieve the data you are interested using the properties/methods of the object returned by the web service. Sort of defeats the whole "simple" aspect of using a web service, if you ask me. Check the WSDL for the response object definition - that should give you a good idea of what your options are in terms of accessing the data in the returned object.
Copy link to clipboard
Copied
Thanks. I know what it's got in the object, I just have no idea how to get to it. Not sure what to do with this object in Cold Fusion.
Copy link to clipboard
Copied
Can you post the WSDL?