cancel
Showing results for 
Search instead for 
Did you mean: 

Posting null message to webservice

Former Member
0 Kudos

Hello All,

PI needs to post data to webservice and if for a particular field, there is no value coming from the source structure, then PI needs to post in the following way:

<mil:TrackingLocationSection i:nil="true" />.

Now this attribute(nil="true") is currently not specified in the wsdl. The webservice team says that it is part of the XML Schema standard which is the standard used by SOAP messages and so PI should automatically put the attribute value as nil="true" whenever the value is not present.

Do you know how this can be achieved?

Accepted Solutions (0)

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

you will have to use a simple java mapping after your actual java mapping to create <mil:TrackingLocationSection i:nil="true" /> tag. this is the easiest solution.

else in case you are allowed to change the WSDL message structure you could do this to have it reflected but i assume you wouldnt have that access

Former Member
0 Kudos

Hello

Thanks for the response. Using a java mapping should solve the problem, but since it is a SOAP standard, is there a way that PI automatically handles setting nil="true" value whenever the field is not present in the source?

We do have the namespace xmlns:i=http://www.w3.org/2001/XMLSchema-instance in the output payload, but this is not ensuring that i:nil="true" is passed automatically as an attribute when the field is not present in the source structure .

Thanks and Regards