0
Class Services.TestClass Extends (%RegisteredObject, %XML.Adaptor)
{

Property DS As %XML.DataSet;

}

and the following web method inside my web service class:

Method HelloWorld(name As %String) As Services.TestClass [ WebMethod ]
{
Quit ##class(Services.TestClass).%New()
}

This produces the following XML:

<s:complexType name="TestClass">
<s:sequence>
<s:element minOccurs="0" name="DS" type="s0:DataSet"/>
</s:sequence>
</s:complexType>
<s:complexType name="s_DataSet">
<s:sequence>
<s:element ref="s:schema"/>
<s:any/>
</s:sequence>
</s:complexType>
</s:schema>

I believe s_DataSet name should actually be just DataSet, because s0:DataSet points to DataSet, not s_DataSet

When I use a client that consumes the service I get the following error: Error: type 'DataSet@http://tempuri.org' not found. (from SoapUI)

When I take the DataSet property out of the TestClass and return it directly everything is fine. What is going on?

O.O
  • 11,077
  • 18
  • 94
  • 182
  • I don't have a great answer to this question, but I've used this dataset object in many web services and have seen some of the weirdness you're talking about. There isn't anything in the documentation that should lead one to believe it can't be used as a property of a class, but I've never been successful in doing so either. [link](http://docs.intersystems.com/ens20102/csp/documatic/%25CSP.Documatic.cls?APP=1&LIBRARY=%25SYS&CLASSNAME=%25XML.DataSet) I have created webmethods that return a collection of datasets using a %ListOfObjects, and single instances of %xml.dataset. – mccrackend Feb 23 '13 at 15:24
  • Do your webmethods handle dynamic, untyped datasets to ListOfObjects? – O.O Feb 26 '13 at 14:01

1 Answers1

0

What you are showing us is (part of) the WSDL of the WebService (class). s_Dataset is just a name, the schema part refers to the schema element.

Calling the webService :

... Serivices.Client.cls?soap_method=HelloWorld&name=zzz

Just produces:

<SOAP-ENV:Envelope>
    <SOAP-ENV:Body>
        <HelloWorldResponse>
            <HelloWorldResult/>
        </HelloWorldResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

No errors

  • s_DataSet should be DataSet, because the WSDL is referencing the complextype of name DataSet, which is undefined. I don't get what you are saying. – O.O Feb 26 '13 at 13:57