On 10/27/2009 07:22 AM, Elyrwen Dynesh wrote:
Hello,
I ve just started using suds for accessing a webservice written with gsoap.
I have a problem with passing NULL arguments. When I call a remote method
which has a pointer argument and I dont not want to specify this argument,
suds nevertheless includes this argument in SOAP message with an empty
contents, like this:
<filter xsi:type="ns0:ReportFilter"/>
On the other hand, gsoap recognizes this as a non-empty argument and by no
means filter == NULL
Generally, gsoap treats an argument as NULL only if:
<filter xsi:nil="1">
or <filter ...> is not present in a SOAP message at all.
My question is how to force suds to send <filter xsi:nil="1"> or not at
all
Suds will send <filter xsi:nil="true"> if the element is defined as being
nillable in the
XSD as follows:
<element name="filter" nillable="true" .../>
Also, if the element is defined as optional
<element name="filter" nillable="true" minOccurs="0"
.../>
then you should be able to call as client.service.someMethod()
Can you show me the wsdl and related schemas?
while using methods with pointers?
I use the following method calls:
client.service.someMethod(filter = None)
client.service.someMethod()
The method declaration in C++ is:
void someMethod(someType* filter = NULL) {
if (filter == NULL) {
//filter is never NULL
}
}
I've already checked, that when sending the same message suds generates
while calling client.service.someMethod(), but with
<filter xsi:type="ns0:ReportFilter"/> cut out, everything works fine and
filter == NULL
Anyone has a clue?
------------------------------------------------------------------------
_______________________________________________
fedora-suds-list mailing list
fedora-suds-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/fedora-suds-list