|
Home > Archive > BizTalk Server Orchestration > August 2004 > Removing unnecessary null elements from the Response
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Removing unnecessary null elements from the Response
|
|
| rnsdas 2004-08-27, 6:06 pm |
| Hello,
I have deployed my Orchestration as a Webservice.
The Schemas has many elements which has nillable ="true". If a particular
response has NO value , i.e if it is null (which is perfectly fine), I do not
want it to be a part of the XML output.
e.g: My current output response is like this:
<entityReferenceNumber/>
<entitySupervisor>John A</entitySupervisor>
<dataReferenceNumber/>
: :
I want that the output should NOT have tags which are not having any
information. Hence I would like my output to be as follows:
<entitySupervisor>John A</entitySupervisor>
::
Can anyone suggest me the way to do it.
Thanks and regards,
Milan Doshi
| |
| Devdutt Patnaik 2004-08-27, 6:06 pm |
| If you are using a map to produce the output, then you should use
conditional mapping inside it, so that the XSLT does not generate elements
when there is no source value. Mostly you will have to use the logical
functoids in tandem with the Value Mapping functoid.
Regards
Dev
"rnsdas" <rnsdas@discussions.microsoft.com> wrote in message
news:1013D199-47DA-4D4E-92D9-8315BFD77B2C@microsoft.com...
> Hello,
>
> I have deployed my Orchestration as a Webservice.
>
> The Schemas has many elements which has nillable ="true". If a particular
> response has NO value , i.e if it is null (which is perfectly fine), I do
not
> want it to be a part of the XML output.
>
> e.g: My current output response is like this:
> <entityReferenceNumber/>
> <entitySupervisor>John A</entitySupervisor>
> <dataReferenceNumber/>
> : :
>
> I want that the output should NOT have tags which are not having any
> information. Hence I would like my output to be as follows:
> <entitySupervisor>John A</entitySupervisor>
> ::
>
> Can anyone suggest me the way to do it.
>
> Thanks and regards,
> Milan Doshi
| |
| rnsdas 2004-08-30, 5:53 pm |
| Thanks Devdutt for the help.
It works for the Mesages that I create through the functoid and after I
introduced the logical functoid.
But I have two questions here:
1. I am sure there would be a way / setting by which we can tell the SOAP
Engine (or the XSLT Processor that it should NOT generate the null elements).
2. It worked in the Functoid, but I am not sure if this is an efficient way
of doing things. (I mean intoducing more processing for each and every
element). Moreover, what do I do for the message that are NOT constructed in
the Transforms.
All help appreciated,
Thanks,
milan doshi
"Devdutt Patnaik" wrote:
> If you are using a map to produce the output, then you should use
> conditional mapping inside it, so that the XSLT does not generate elements
> when there is no source value. Mostly you will have to use the logical
> functoids in tandem with the Value Mapping functoid.
>
> Regards
> Dev
>
> "rnsdas" <rnsdas@discussions.microsoft.com> wrote in message
> news:1013D199-47DA-4D4E-92D9-8315BFD77B2C@microsoft.com...
> not
>
>
>
|
|
|
|
|