BizTalk Server General - Schema element types in custom adapter

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > December 2005 > Schema element types in custom adapter





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 Schema element types in custom adapter
Jussi Palo

2005-11-23, 5:51 pm

Hi,
I have a custom BTS 2004 adapter. In an orchestration, I have defined a
schema for a message that is sent through my custom adapter.

In the schema I've defined an element's type like this:
<xs:element maxOccurs="1" name="before" type="xs:string" />

Now, in my adapter I can access the message that comes from BTS, no problem.
The problem is that I need to know the type of the element that was defined
in the schema of the message. Idea behind this is that I need to put quotes
around strings but not around doubles.

Is there a way to accomplish this?

Thanks!
Younes Amar

2005-11-23, 5:51 pm

you can ask its XmlSchemaDatatype what the
corresponding .NET value type would be. and for an element of type
"xs:string", you get back System.String.
HTH
Younes
"Jussi Palo" <jpalo@community.nospam> wrote in message
news:712789EC-4CF9-4AB9-8153-7949DE980D02@microsoft.com...
> Hi,
> I have a custom BTS 2004 adapter. In an orchestration, I have defined a
> schema for a message that is sent through my custom adapter.
>
> In the schema I've defined an element's type like this:
> <xs:element maxOccurs="1" name="before" type="xs:string" />
>
> Now, in my adapter I can access the message that comes from BTS, no
> problem.
> The problem is that I need to know the type of the element that was
> defined
> in the schema of the message. Idea behind this is that I need to put
> quotes
> around strings but not around doubles.
>
> Is there a way to accomplish this?
>
> Thanks!



Jussi Palo

2005-11-24, 7:47 am

Hi,
thank you for your response, your instructions will surely help me later on.
But, if I understood the usage of XmlSchemaDatatype correctly, I'd need to
have the scehma in my adapter in order to determine the types of the
elements. Is this correct?

Does BizTalk send the schema or information about the schema along with the
message that is sent to the adapter, or how can the adapter determine the
types of the elements?

Regards,
Jussi

"Younes Amar" wrote:

> you can ask its XmlSchemaDatatype what the
> corresponding .NET value type would be. and for an element of type
> "xs:string", you get back System.String.
> HTH
> Younes
> "Jussi Palo" <jpalo@community.nospam> wrote in message
> news:712789EC-4CF9-4AB9-8153-7949DE980D02@microsoft.com...
>
>
>

WenJun Zhang[msft]

2005-12-01, 7:48 am

Hi Jussi,

You shouldn't modify and post-process the document in adapter. An
approriate way to do the job is using a custom pipeline component. You can
simply retrieve the schema by using the method like GetDocumentSpecByName.

Using Schemas
http://msdn.microsoft.com/library/d...-us/sdk/htm/ebi
z_sdk_samples_zfza.asp

CustomComponent
http://msdn.microsoft.com/library/e...les_zfza.asp?fr
ame=true

Best regards,

WenJun Zhang
Microsoft Online Partner Support

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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com