IBM Support

PM43517: RBD 7.5.1.4:java.io.IOException: Non nillable element array is null when running EGL webservice on TomCat

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Environment: windows xp
    Product name: IBM? Rational? Business Developer
    Program Version : 7.5.1.4
    
    Problem Description
    Developing webservices with RBD and Tomcat, there is a
    java.io.IOException at runtime in the webservices dealing with
    arrays that should be nillable but are not
    
    Sample
    
    record record1{}
    r1 string?;
    r2 record2?[];
    end
    
    record record2{}
    aa String?;
    bb String[];
    end
    
    And a webservice function with an inout parameter:
    
    function test(test record1 inout)
    syslib.writestdout('is null server? '+(test.r2 == null));
    end
    
    they generate and publish the project to Tomcat
    
    The first thing to notice is that the wsdl generated inside the
    project
    (PMRTomcatService\WebContent\WEB-INF\wsdl\TestService.wsdl)
    seems to be
    generated by EGL and looks like this:
    
    ?complexType name='record1'?
    ?xsd:annotation?
    ?xsd:documentation?EGL_TYPE com.costaisa.test.record1?/xsd:
    documentation?
    ?/xsd:annotation?
    ?sequence?
    ?element maxOccurs='1' name='r1' nillable='true' type='xsd:
    string'/?
    ?element maxOccurs='1' name='r2' nillable='true' type='tns:
    record2Array'/?
    ?/sequence?
    ?/complexType?
    ?complexType name='record2Array'?
    ?sequence?
    ?element maxOccurs='unbounded' name='record2Array'
    nillable='false' type='tns:record2'/?
    ?/sequence?
    ?/complexType?
    
    It's different from the one obtained online with the url http:
    //localhost:8080/PMRTomcatService/services/TestService?wsdl .
    This
    seems to be generated by axis and the array is not nillable:
    
    ?complexType name='record1'?
    ?sequence?
    ?element name='r1' nillable='true' type='xsd:string'/?
    ?element name='r2' type='impl:ArrayOfrecord2'/?
    ?/sequence?
    ?/complexType?
    ?complexType name='ArrayOfrecord2'?
    ?sequence?
    ?element maxOccurs='unbounded' minOccurs='0' name='item' type='
    impl:record2'/?
    ?/sequence?
    ?/complexType?
    
    With the first WSDL, create a new EGL Web Project to test it and
    the
    result is:
    
    function button()
    testService TestService {@bindService};
    
    test record1;
    
    syslib.writestdout('is null client before? '+(test.r2 == null));
    testService.test(test);
    syslib.writestdout('is null client after? '+(test.r2 == null));
    end
    
    http://localhost:8080/PMRTomcatClient/test.faces
    
    is null client before? true
    is null server? true
    java.io.IOException: Non nillable element 'r2' is null.
    at org.apache.axis.encoding.ser.BeanSerializer.serialize
    (BeanSerializer.java:215)
    at org.apache.axis.encoding.SerializationContext.serializeActual
    (SerializationContext.java:1504)
    at org.apache.axis.encoding.SerializationContext.serialize
    (SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize
    (SerializationContext.java:801)
    at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
    at
    org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:43
    3)
    at
    org.apache.axis.message.MessageElement.output(MessageElement.jav
    a:
    1208)
    at
    org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
    at
    org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.jav
    a:
    478)
    at
    org.apache.axis.message.MessageElement.output(MessageElement.jav
    a:
    1208)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
    at org.apache.axis.Message.writeTo(Message.java:539)
    at
    org.apache.axis.transport.http.AxisServlet.sendResponse(AxisServ
    let.
    java:902)
    
    The client creates the record with test.r2 null. The server
    receives
    the same, but it cannot send back the response, because axis
    says that
    r2 is not nillable.
    This does not happen in Websphere
    
    
    Workaround:
    is to return an empty array
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    A record field type record[] can't be set to null in a
    tomcat SOAP service.
    

Problem conclusion

  • added code to allow a record array field to set set to null.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM43517

  • Reported component name

    RATL BUS DEV

  • Reported component ID

    5724S5000

  • Reported release

    750

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-07-12

  • Closed date

    2011-07-29

  • Last modified date

    2011-07-29

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    RATL BUS DEV

  • Fixed component ID

    5724S5000

Applicable component levels

  • R750 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMQ79","label":"Rational Business Developer"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
27 October 2021