Skip to main content
Participant
July 3, 2008
Question

.NET Web Service

  • July 3, 2008
  • 1 reply
  • 641 views
I created a web service using VB.net that is used to access a handful of .dbf files. The VB.net code works, the files are read and data is returned. I want to be able to access the web service using CF so I can manipulate the data and move it to SQL Server to be accessed via a web application. However, when I try to access the web service I get the following:

Cannot perform web service invocation GetData.
The fault returned when invoking the web service operation is:

AxisFault
faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Deserializing parameter 'GetDataResult': could not find deserializer for type { http://www.w3.org/2001/XMLSchema}anyType
faultActor:
faultNode:
faultDetail:
{ http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Deserializing parameter 'GetDataResult': could not find deserializer for type { http://www.w3.org/2001/XMLSchema}anyType
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invo... ''

The data is being returned from the web service as xml. The web service converts the DataSet to xml and then returns it to the calling cfc.

I have racked my mind and scoured the internet looking for information. Any help is greatly appreciated.

Thanks.
This topic has been closed for replies.

1 reply

July 3, 2008
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.
Inspiring
July 3, 2008
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.
Participant
July 3, 2008
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.

Thanks again.