IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

Unable to schema validate the xml node created from SOAP Message having xsi:nil.

  • 1.  Unable to schema validate the xml node created from SOAP Message having xsi:nil.

    Posted Fri January 18, 2013 06:07 PM

    I am sending a SOAP request Message which is containing xsi:nil=“true” in one of the elements whose data type is String. In my web Service I am converting this message into an xml node and validating it against a schema in which nillable property of that element is set to true. But I am getting schema validation error saying that " value does not conform to data type" for that element.

    The webMethods version I am using is :
    [TABLE=“class: tableView, width: 100%”]
    [TR]
    [TD=“class: evenrow”]Version[/TD]
    [TD=“class: evenrowdata-l”]8.2.2.0[/TD]
    [/TR]
    [TR]
    [TD=“class: oddrow”]Updates[/TD]
    [TD=“class: oddrowdata-l”]IS_8.2_SP2_Core_Fix4. [/TD]
    [/TR]
    [/TABLE]
    In extended properties I have also given :
    watt.server.SOAP.encodeXSIType=true
    watt.server.SOAP.generateNilTags=true
    When I am converting the Soap request into XML string the element having xsi:nil=“true” is converted into an xml element with blank value.

    SoapRequest:
    <soapenv:Envelope xmlns:xsi=“[URL]http://www.w3.org/2001/XMLSchema-instance[/URL]” xmlns:soapenv=“[URL]http://schemas.xmlsoap.org/soap/envelope/[/URL]
    soapenv:Header/
    soapenv:Body

                      <ns:DCMinimumShelfLife xsi:nil="true"></ns:DCMinimumShelfLife>
    

    </soapenv:Body>
    </soapenv:Envelope>

    Corresponding XML String:

    <?xml version="1.0" versionID="" systemEnvironmentCode=""?>

    <core:ApplicationArea
    fyt:DCMinimumShelfLife/


    #webMethods
    #soa
    #API-Management