on 02-02-2016 3:35 PM
Dear SCN Users,
What are the below Fuctions and the uses in the Graphical Mapping.
Boolean- isNil
Constants- XSI:Nil.
Let me know the use cases,Any link or example also should be fine.
Hi Raghu,
<element xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></element>
Check below blog for more details.
Check below i am passing xsi:nil function to body element
The output contains xsi:nil attribute the target element.
I am checking is element name1 contains xsi:nil attribute or not using isNil function.
The output return true.
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone,
I really didn't know this possibility, thanks Praveen for the clarification and Raghuraman for the question.
If i understand right the xis:nil constant function is used when you want to generate a tag but you can't not have the source tag (i didn't see the difference against use an empty constant tag).
The boolean isNil, if you have a false value, will you have a targe tag with false value? or with false value the tag will not be generated?. If the behavior is the first assumption, I didn't see either in which cases this can be helpful.
Regards.
Hi Raghuraman,
Right now you have throwed a doubt in me , do you see any circumstance in which boolean isNil is useful?.
And according the blog shared by Praveen and if you can use the constant function with empty, the unique sense to use the xis:nil constant is when the receiver system need this kind of tag?
Regards.
Hi Ragu/Inaki,
Some web services more strict in field validation they treat differently for below two cases.
(<element xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </element>)
So for those web services element with null fields we need to send xsi:nil="true" using function xsi:nil constant function like below.
This example is if the field does not exist the web service needs xsi:nil="true" attribute in their field, this is one of the use case for xsi:nil constant function.
The same web service when they send the data to PI system, some of the null fields they will send xsi:nil="true" in their XML.
If they send xsi:nil="true" then we need to send blank value to the receiver using isNil boolean function, this is one of the use case for isNil boolean function.
I hope i clarify your query.
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.