cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP (xsi:nil="true") XI

Former Member
0 Kudos

Hi there,

I have the following problem:

I get from a webservice over SOAP a null. In xml xsi:nil="true". How can i query this value.

I created this userdefined function. But it doesn't work.

if(allocateNewUidForInternalEmployeeReturn != null || allocateNewUidForInternalEmployeeReturn !="" || allocateNewUidForInternalEmployeeReturn !=" " )

return "1"; // response ok

else return "0"; // response not ok

Have anyone an idea. THX for answers.

Regards Johann

Accepted Solutions (1)

Accepted Solutions (1)

henrique_pinto
Active Contributor
0 Kudos

It'd be better if u posted both input xml and desired output.

Regards,

Henrique.

Former Member
0 Kudos

Hi Henrique,

here is my response from the webservice wtih the null value:

....

<ns1:allocateNewUidForInternalEmployeeReturn xsi:type="xsd:string" xsi:nil="true" />

</ns1:allocateNewUidForInternalEmployeeResponse>

part with correct value

<ns1:allocateNewUidForInternalEmployeeReturn xsi:type="xsd:string">V489906</ns1:allocateNewUidForInternalEmployeeReturn>

</ns1:allocateNewUidForInternalEmployeeResponse>

now my question: how can i catch the null value in the xi-mapping

Regards Johann

stefan_grube
Active Contributor
0 Kudos
if( allocateNewUidForInternalEmployeeReturn.equals(""))
return "0"; // response not ok
else return "1"; // response ok

if allocateNewUidForInternalEmployeeReturn is the name of the parameter of the UDF.

Regards

Stefan

Former Member
0 Kudos

thx Stefan is solved with your hint

henrique_pinto
Active Contributor
0 Kudos

To base ur logic on the nil attribute, just do it like (supposing the nil attribute is in the XSD definition of the response message):


        nil -> equalS -> not -> IfWithoutElse -> allocateNewUidForInternalEmployeeReturn 
constant(true) /                       /
allocateNewUidForInternalEmployeeReturn

Regards,

Henrique.

Answers (0)