Topic
  • 3 replies
  • Latest Post - ‏2014-08-29T17:42:58Z by amra1
JohnxLong
JohnxLong
59 Posts

Pinned topic WSDL isnil

‏2014-08-29T16:02:24Z |

Hi,

I've got a wsdl with an element that is defined as

<xs:element name="shelfLife" type="xs:int" minOccurs="0"/>
<xs:element name="shelfLifeControlled" type="xs:boolean" minOccurs="0"/>
<xs:element name="expirationWindow" type="xs:int" minOccurs="0"/>
<xs:element name="allocationWindow" type="xs:int" minOccurs="0"/>

 

in my RPG I've set the element as request.shelflife.isnil = *On;

Yet the element is generated in the XML response message

<shelfLife>0</shelfLife>
<expirationWindow>0</expirationWindow>
 

The other values as set with isnil = *ON and they don't appear in the XML response

Any ideas?

 

Thanks in advance

John


 

  • amra1
    amra1
    45 Posts

    Re: WSDL isnil

    ‏2014-08-29T17:11:35Z  

    Hi John, I am assuming when you say "...is generated in the XML response message"  you mean in the XML request message.  Assuming that is the case the only way to figure this out is for you to send WSDL (or something equivalent that shows the problem) to me and the client code you created.  If you want to send it to me I can take a look.  amra@us.ibm.com. 

     

     

  • JohnxLong
    JohnxLong
    59 Posts

    Re: WSDL isnil

    ‏2014-08-29T17:34:56Z  
    • amra1
    • ‏2014-08-29T17:11:35Z

    Hi John, I am assuming when you say "...is generated in the XML response message"  you mean in the XML request message.  Assuming that is the case the only way to figure this out is for you to send WSDL (or something equivalent that shows the problem) to me and the client code you created.  If you want to send it to me I can take a look.  amra@us.ibm.com. 

     

     

    Hi,
     
    Thanks for the reply. 
     
     sorry I meant the message request. 
     
    The excerpts in the original posting are from the xsd associated with the wsdl
     
    The rpg is basically :-
    shelflife.isnil = *on;
    Shelflifecontrolled.isnil=*on;
     
    One appears in the request, the other doesn't. 
     
    The resulting data structures all look fine, I can't see any difference between the elements that appear in the message and the elements that atre omitted. 
     
    As far as I can see they are all minoccurs=0, which if I'm reading the documentation correctly, should be omitted if isnil is *on. 
     
    The wsdl is quite complex and contains several messages so  has generated a lot of client code. 
     
    I'll try and generate a simple wsdl that I can use to demonstrate the problem. 
     
    John
  • amra1
    amra1
    45 Posts

    Re: WSDL isnil

    ‏2014-08-29T17:42:58Z  
    • JohnxLong
    • ‏2014-08-29T17:34:56Z
    Hi,
     
    Thanks for the reply. 
     
     sorry I meant the message request. 
     
    The excerpts in the original posting are from the xsd associated with the wsdl
     
    The rpg is basically :-
    shelflife.isnil = *on;
    Shelflifecontrolled.isnil=*on;
     
    One appears in the request, the other doesn't. 
     
    The resulting data structures all look fine, I can't see any difference between the elements that appear in the message and the elements that atre omitted. 
     
    As far as I can see they are all minoccurs=0, which if I'm reading the documentation correctly, should be omitted if isnil is *on. 
     
    The wsdl is quite complex and contains several messages so  has generated a lot of client code. 
     
    I'll try and generate a simple wsdl that I can use to demonstrate the problem. 
     
    John

    OK, just to clarify, minoccurs=0 means the element can be omitted.  nillable=true means the element is passed with no value (it still has to be passed).

    The integrated client unfortunately handles minoccurs=0 that same way as nillable (I think that is true). That is working as designed.