You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Thomas Börkel <tb...@ap-ag.com> on 2003/05/09 13:03:04 UTC

Why does Axis 1.1 RC2 need 2001 XML schema in SOAP message to recognize null parameters?

HI!

Axis 1.0 understood the two null parameters in this XML:

<?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/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  <SOAP-ENV:Body>
    <send2 xmlns="http://tempuri.org/">
      <sender xsi:type="xsd:string">sender@firma.de</sender>
      <receiver xsi:type="xsd:string">receiver@firma.de</receiver>
      <subject xsi:type="xsd:string">Betreff der Nachricht</subject>
      <body xsi:type="xsd:string">Text der Nachricht...</body>
      <base64 xsi:type="xsd:boolean">false</base64>
      <ccReceiver xsi:nil="true"/>
      <bccReceiver xsi:nil="true"/>
    </send2>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Axis 1.1 RC2 calls the Java method with "" instead of null with this XML. I compared XMLs from the Axis client to the one above and changed it like this, so that Axis 1.1 RC2 understands null again:

<?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:xsd="http://www.w3.org/2001/XMLSchema">
  <SOAP-ENV:Body>
    <send2 xmlns="http://tempuri.org/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <sender xsi:type="xsd:string">sender@firma.de</sender>
      <receiver xsi:type="xsd:string">receiver@firma.de</receiver>
      <subject xsi:type="xsd:string">Betreff der Nachricht</subject>
      <body xsi:type="xsd:string">Text der Nachricht...</body>
      <base64 xsi:type="xsd:boolean">false</base64>
      <ccReceiver xsi:type="xsd:string" xsi:nil="true"/>
      <bccReceiver xsi:type="xsd:string" xsi:nil="true"/>
    </send2>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


The one change that made it work was the switch from 1999 to 2001 schema. Why is that? Is this a bug in 1.1 RC2?

Thanks!

Regards,
Thomas