Prefixes on elements
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 Framework > Prefixes on elements




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

    Prefixes on elements  
Jan Eliasen


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


 
02-26-06 03:47 PM

Hi

I have a customer, that needs to add prefixes in front of elements,
when using the BTF Assembler in a custom send pipeline. Basicually,
they have a customer that requires the prefixes to be present.

So, if anyone can help, that would be nice.

They are using Biztalk Server 2006  beta 2.

Here is how their document looks like :
- <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:biz="http://schemas.biztalk.org/btf-2-0/address/types">
- <SOAP-ENV:Header>
- <endpoints xmlns="http://schemas.biztalk.org/btf-2-0/endpoints"
SOAP-ENV:mustUnderstand="1">
- <to>
<address
xsi:type="biz:8c7d1ea0-7823-1000-b356-c0a87c200001">CustomerID</address>
</to>
- <from>
<address
xsi:type="biz:6db03db4-78e0-1000-b430-c0a8b4340001">SuppID</address>
</from>
</endpoints>
- <properties xmlns="http://schemas.biztalk.org/btf-2-0/properties"
SOAP-ENV:mustUnderstand="1">
<identity>uuid:4c6e79fb-2fb5-431b-a14d-eb00ccca18dc</identity>
<sentAt>2006-02-21T14:41:26+00:00</sentAt>
<expiresAt>2006-02-21T15:11:26+00:00</expiresAt>
<topic>root:Invoice</topic>
</properties>
<services xmlns="http://schemas.biztalk.org/btf-2-0/services"
SOAP-ENV:mustUnderstand="1" />
</SOAP-ENV:Header>
- <SOAP-ENV:Body>
Here goes our XML document (And it works)
</SOAP-ENV:Envelope>

And this is what it should have looked like :

- <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2000/08/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
- <SOAP-ENV:Header
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <eps:endpoints SOAP-ENV:mustUnderstand="1"
xmlns:biz="http://schemas.biztalk.org/btf-2-0/address/types"
xmlns:eps="http://schemas.biztalk.org/btf-2-0/endpoints">
- <eps:to>
<eps:address xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:type="biz:OrganizationName">200922ac-78d0-1000-9d99-c0a8b4340001</eps:ad
dress>
</eps:to>
- <eps:from>
<eps:address xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:type="biz:OrganizationName">6db03db4-78e0-1000-b430-c0a8b4340001</eps:ad
dress>
</eps:from>
</eps:endpoints>
- <prop:properties SOAP-ENV:mustUnderstand="1"
xmlns:prop="http://schemas.biztalk.org/btf-2-0/properties">
<prop:identity>88B29821-0A27-472C-87E7-FB3A824FF0B8</prop:identity>
<prop:sentAt>2006-02-16T15:09:46+01:00</prop:sentAt>
<prop:expiresAt>2006-05-01T15:49:46+01:00</prop:expiresAt>
<prop:topic>root:Invoice</prop:topic>
</prop:properties>
</SOAP-ENV:Header>
<SOAP-ENV:Body />
Here goes our XML document (And it works)
</SOAP-ENV:Envelope>

--
Eliasen Jr. representing himself and not the company he works for.

Private email: jan@eliasen.dk

"Ford," he said, "you're turning into a penguin. Stop it."





[ Post a follow-up to this message ]



    RE: Prefixes on elements  
WenJun Zhang[msft]


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


 
02-27-06 12:48 PM

Hi Jan,

You should create custom pipeline component to append the prefixes on
elements.

In the pipeline code, you can use XslTransform class to perform XSLT
transformation. Below is an exmaple:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:book="http://example.com/2004/books">

<xsl:output method="xml" encoding="UTF-8" />

<xsl:template match="xhtml:* | /">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>

<xsl:template match="*[namespace-uri() = '']">
<xsl:element name="{concat('book:', local-name())}"
namespace="http://example.com/2004/books">
<xsl:apply-templates select="@* | node()" />
</xsl:element>
</xsl:template>

<xsl:template match="@* | text() | processing-instruction() | comment()">
<xsl:copy />
</xsl:template>

</xsl:stylesheet>

Or you can use BizTalk 2004 mapper to generate XSLT for this and execute it
via XslTransform:

How do I reuse BizTalk 2004 maps outside of BizTalk?
http://blogs.msdn.com/gzunino/archi.../21/232629.aspx

Hope the info will be of some help.

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.





Attachment:
This has been downloaded 0 time(s).



[ Post a follow-up to this message ]



    Re: Prefixes on elements  
Leonid Ganeline


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


 
02-27-06 10:51 PM

Hi Jan,
Is it working when use
the "Element FormDefault" schema property equal to Qualified?

--

Regards,

Leonid Ganeline
BizTalk developer
Vancouver
http://geekswithblogs.net/leonidganeline
===================================


"Jan Eliasen" <eliasen@nospam.nospam> wrote in message
 news:distv1lc8cm8kjhdhsnfg23b7c0182kssl@
4ax.com...
> Hi
>
> I have a customer, that needs to add prefixes in front of elements,
> when using the BTF Assembler in a custom send pipeline. Basicually,
> they have a customer that requires the prefixes to be present.
>
> So, if anyone can help, that would be nice.
>
> They are using Biztalk Server 2006  beta 2.
>
> Here is how their document looks like :
> - <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xmlns:biz="http://schemas.biztalk.org/btf-2-0/address/types">
> - <SOAP-ENV:Header>
> - <endpoints xmlns="http://schemas.biztalk.org/btf-2-0/endpoints"
> SOAP-ENV:mustUnderstand="1">
> - <to>
>  <address
> xsi:type="biz:8c7d1ea0-7823-1000-b356-c0a87c200001">CustomerID</address>
> </to>
> - <from>
>  <address
> xsi:type="biz:6db03db4-78e0-1000-b430-c0a8b4340001">SuppID</address>
>  </from>
>  </endpoints>
> - <properties xmlns="http://schemas.biztalk.org/btf-2-0/properties"
> SOAP-ENV:mustUnderstand="1">
>  <identity>uuid:4c6e79fb-2fb5-431b-a14d-eb00ccca18dc</identity>
>  <sentAt>2006-02-21T14:41:26+00:00</sentAt>
>  <expiresAt>2006-02-21T15:11:26+00:00</expiresAt>
>  <topic>root:Invoice</topic>
>  </properties>
>  <services xmlns="http://schemas.biztalk.org/btf-2-0/services"
> SOAP-ENV:mustUnderstand="1" />
>  </SOAP-ENV:Header>
> - <SOAP-ENV:Body>
>    Here goes our XML document (And it works)
>  </SOAP-ENV:Envelope>
>
> And this is what it should have looked like :
>
> - <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2000/08/XMLSchema"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
> - <SOAP-ENV:Header
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> - <eps:endpoints SOAP-ENV:mustUnderstand="1"
> xmlns:biz="http://schemas.biztalk.org/btf-2-0/address/types"
> xmlns:eps="http://schemas.biztalk.org/btf-2-0/endpoints">
> - <eps:to>
>  <eps:address xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xsi:type="biz:OrganizationName">200922ac-78d0-1000-9d99-c0a8b4340001</eps:
address>
> </eps:to>
> - <eps:from>
>  <eps:address xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xsi:type="biz:OrganizationName">6db03db4-78e0-1000-b430-c0a8b4340001</eps:
address>
> </eps:from>
>  </eps:endpoints>
> - <prop:properties SOAP-ENV:mustUnderstand="1"
> xmlns:prop="http://schemas.biztalk.org/btf-2-0/properties">
>  <prop:identity>88B29821-0A27-472C-87E7-FB3A824FF0B8</prop:identity>
>  <prop:sentAt>2006-02-16T15:09:46+01:00</prop:sentAt>
>  <prop:expiresAt>2006-05-01T15:49:46+01:00</prop:expiresAt>
>  <prop:topic>root:Invoice</prop:topic>
>  </prop:properties>
>  </SOAP-ENV:Header>
>  <SOAP-ENV:Body />
>    Here goes our XML document (And it works)
>  </SOAP-ENV:Envelope>
>
> --
> Eliasen Jr. representing himself and not the company he works for.
>
> Private email: jan@eliasen.dk
>
> "Ford," he said, "you're turning into a penguin. Stop it."







[ Post a follow-up to this message ]



    Re: Prefixes on elements  
Jan Eliasen


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


 
03-01-06 12:55 PM

On Mon, 27 Feb 2006 09:43:39 GMT, wjzhang@online.microsoft.com
("WenJun Zhang[msft]") wrote:

>You should create custom pipeline component to append the prefixes on
>elements.
Thanks for the answer! It helped a lot.

--
Eliasen Jr. representing himself and not the company he works for.

Private email: jan@eliasen.dk

"Ford," he said, "you're turning into a penguin. Stop it."





[ Post a follow-up to this message ]



    Re: Prefixes on elements  
Jan Eliasen


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


 
03-01-06 12:55 PM

On Mon, 27 Feb 2006 13:00:32 -0800, "Leonid Ganeline"
<leo_gan_57@hotmail.com> wrote:

>Is it working when use
>the "Element FormDefault" schema property equal to Qualified?
Hi

Thanks for your answer.

Yo uanswer appies to the schame of the document inside the envelope
and not to the envelope itself. So I don't think it will work. Anyway,
Wenjun's solution works fine, so we'll go with that one.

--
Eliasen Jr. representing himself and not the company he works for.

Private email: jan@eliasen.dk

"Ford," he said, "you're turning into a penguin. Stop it."





[ Post a follow-up to this message ]



    Re: Prefixes on elements  
WenJun Zhang[msft]


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


 
03-03-06 11:17 PM

You are welcome. Have a great day!

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.





Attachment:
This has been downloaded 0 time(s).



[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:32 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