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 EXT / FOCAL VALENTIN Jean-Philippe <ex...@sncf.fr> on 2004/11/17 12:02:02 UTC
Why sendNull parameter of the method SerializationContextImpl.ser
ialize is hard code set to true ?
Hi,
I would like to access to the Microsoft Web Service SQL Reporting Services
but my problem was that the soap message sent to the web service included
parameters with xsi:nil="true" that are not recognized by Microsoft. In C#,
parameters are not send if the value is null.
I had to force the sendNull parameter to false in the class
SerializationContextImpl (method serialize).
Why is not possible to have a configuration file to precise this ? Perhaps
in the client-config.wsdd file ?
If we can modify this comportment , How can I do ?
I am using Axis 1.1.
The method concerned is :
org.apache.axis.encoding.SerializationContextImpl.serialize(QName elemQName,
Attributes attributes,
Object value,
QName xmlType,
boolean sendNull,
Boolean sendType)
The soap message before was :
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> "
xmlns:xsd="http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> "
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> ">
<soapenv:Body>
<Render
xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingser
vices
<http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices>
">
<Report>/TestReportJPV/Resultats</Report>
<Format>PDF</Format>
<HistoryID xsi:nil="true"/>
<DeviceInfo xsi:nil="true"/>
<Parameters xsi:nil="true"/>
<Credentials xsi:nil="true"/>
<ShowHideToggle xsi:nil="true"/>
</Render>
</soapenv:Body>
</soapenv:Envelope>
The soap message after was :
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> "
xmlns:xsd="http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> "
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> ">
<soapenv:Body>
<Render
xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingser
vices
<http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices>
">
<Report>/TestReportJPV/Resultats</Report>
<Format>PDF</Format>
</Render>
</soapenv:Body>
</soapenv:Envelope>
thanks
JPV