[vwnc] Empty collections and web services

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Empty collections and web services

Maximiliano Taborda
Hi.

I have a webservice built using the VW7.6nc wizard (Web Services
Wizard) that returns an OrderedCollection and when the collection is
empty this exception is raised:

--"SoapServerFault: SOAP-ENV:Server Marshaling error:
WebServices.Struct is missing mandatory value for: #ItemNode"--

The #x2oBinding method generated by the wizard includes this

     <struct name="ItemsOfResponse" smalltalkClass="Struct">
          <element name="result" ref="tns:CollectionOfItemNode"/>
     </struct>

For it to work I have to add "minOccurs=0" to the <element> node like this

     <struct name="ItemsOfResponse" smalltalkClass="Struct">
          <element name="result" ref="tns:CollectionOfItemNode" minOccurs="0"/>
     </struct>

Anybody knows why the wizard doesn't generate the code to handle empty
collections? or Am I doing something else wrong?

Thanks.
Maxi
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc