Closed lego12239 closed 10 years ago
Hi,
I ran a simple test, but that seemed to work without problems. Can you send me an example XSD and XML?
Regards, Willem
XSD:
<xsd:complexType name="ItemsAvailResult">
<xsd:all>
<xsd:element name="No" type="xsd:string" nillable="true"/>
<xsd:element name="PriceClient" type="xsd:float" nillable="true"/>
<xsd:element name="PriceClient_RG" type="xsd:float" nillable="true"/>
<xsd:element name="PriceClient_MSK" type="xsd:float" nillable="true"/>
<xsd:element name="AvailableClient" type="xsd:float" nillable="true"/>
<xsd:element name="AvailableClient_RG" type="xsd:int" nillable="true"/>
<xsd:element name="AvailableClient_MSK" type="xsd:int" nillable="true"/>
<xsd:element name="AvailableExpected" type="xsd:int" nillable="true"/>
<xsd:element name="AvailableExpectedNext" type="xsd:int" nillable="true"/>
<xsd:element name="DateExpectedNext" type="xsd:string" nillable="true"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ArrayOfItemsAvailResult">
<xsd:sequence>
<xsd:element name="item" type="tns:ItemsAvailResult" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="getItemsAvailResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="getItemsAvailResult" type="tns:ArrayOfItemsAvailResult"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http:/\
/www.w3.org/2001/XMLSchema-instance" xmlns:ns1="https://api.merlion.com/dl/mlservice2">
<SOAP-ENV:Body>
<ns1:getItemsAvailResponse>
<getItemsAvailResult>
<item>
<No xsi:nil="true"/>
<PriceClient xsi:nil="true"/>
<PriceClient_RG xsi:nil="true"/>
<PriceClient_MSK xsi:nil="true"/>
<AvailableClient xsi:nil="true"/>
<AvailableClient_RG xsi:nil="true"/>
<AvailableClient_MSK xsi:nil="true"/>
<AvailableExpected xsi:nil="true"/>
<AvailableExpectedNext xsi:nil="true"/>
<DateExpectedNext xsi:nil="true"/>
</item>
</getItemsAvailResult>
</ns1:getItemsAvailResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I see... It is because of the combination with "xsd:all", I guess. I'll see what I can do about it.
Thank you!
Fixed. Note that this fix also has impact on xsi:nil values for elements within xsd:all types that are not integers: they will now contain 'nil'.
Hello.
When i get a response from a soap server with empty elements (which marked by xsi:nil="true" attribute and nillable="true" attribute in a schema), erlsom crashes with the next error:
If i change an element type from int to string in the wsdl schema, everything works fine.