Removing unnecessary null elements from the Response
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > Removing unnecessary null elements from the Response




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Removing unnecessary null elements from the Response  
rnsdas


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11: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 no
t
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





[ Post a follow-up to this message ]



    Re: Removing unnecessary null elements from the Response  
Devdutt Patnaik


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11: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







[ Post a follow-up to this message ]



    Re: Removing unnecessary null elements from the Response  
rnsdas


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-30-04 10: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 
>
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:33 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register