PropertySchema existence
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 > PropertySchema existence




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

    PropertySchema existence  
eXavier


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


 
06-01-05 10:52 PM

Hi all,
I experience problem when promoting message properties from custom adapter.

I developed my adapter based on SDK samples. It is .NET class library
project type. To be able to deploy adapter's property schema I had to create
also Biztalk project with the schema. If schema is deployed, promoting from
adapter works fine, but if the schema is not deployed I receive error from
IBTTransportBatch.SubmitMessage(): "The parameter is incorrect.". (Code
snippet follows bellow.)

The error brings not much information, so I would like to check if property
schema exists before I try to promote properties. If the schema does not
exist I would just Write() properties into message context (without
promotion). The question is: How could I find out if property schema exists
for given property ?

Thanks a lot
eXavier



Here's code snippet :

IBaseMessagePart part = this.messageFactory.CreateMessagePart();
part.Data = GetMyStream();
IBaseMessage message = this.messageFactory.CreateMessage();
message.AddPart(MESSAGE_BODY_PART_NAME, part, true);

SystemMessageContext context = new SystemMessageContext(message.Context);
context.InboundTransportLocation = this.receiveLocation.uri;
context.InboundTransportType = this.transportType;

string subject = email.Subject as string;
if (subject != null) {
message.Context.Promote("Subject", this.propertyNamespace, subject);
}

StandardReceiveBatchHandler batch = new
StandardReceiveBatchHandler(this.transportProxy, null);
batch.SubmitMessage(message, email.noteid); <<<<< throws Exception
BatchResult batchResult = batch.Done(null);








[ Post a follow-up to this message ]



    Re: PropertySchema existence  


Report This Message To A Moderator Edit/Delete Message


 
06-06-05 12:57 PM

Hi,

If you want to get that degree of insight, you can use the BizTalkOM Objekt
model. It is well documented by the online help. However, please not that in
order to be able to use that, the user account you are acting with must be
member of the BizTalk Administrators group.

Sincerely

Joerg Fischer
MVP

"eXavier" <fhns@centrum.cz> schrieb im Newsbeitrag
news:O4Jdc0qZFHA.1148@tk2msftngp13.phx.gbl...
> Hi all,
> I experience problem when promoting message properties from custom
> adapter.
>
> I developed my adapter based on SDK samples. It is .NET class library
> project type. To be able to deploy adapter's property schema I had to
> create
> also Biztalk project with the schema. If schema is deployed, promoting
> from
> adapter works fine, but if the schema is not deployed I receive error from
> IBTTransportBatch.SubmitMessage(): "The parameter is incorrect.". (Code
> snippet follows bellow.)
>
> The error brings not much information, so I would like to check if
> property
> schema exists before I try to promote properties. If the schema does not
> exist I would just Write() properties into message context (without
> promotion). The question is: How could I find out if property schema
> exists
> for given property ?
>
> Thanks a lot
> eXavier
>
>
>
> Here's code snippet :
>
> IBaseMessagePart part = this.messageFactory.CreateMessagePart();
> part.Data = GetMyStream();
> IBaseMessage message = this.messageFactory.CreateMessage();
> message.AddPart(MESSAGE_BODY_PART_NAME, part, true);
>
> SystemMessageContext context = new SystemMessageContext(message.Context);
> context.InboundTransportLocation = this.receiveLocation.uri;
> context.InboundTransportType = this.transportType;
>
> string subject = email.Subject as string;
> if (subject != null) {
>    message.Context.Promote("Subject", this.propertyNamespace, subject);
> }
>
> StandardReceiveBatchHandler batch = new
> StandardReceiveBatchHandler(this.transportProxy, null);
> batch.SubmitMessage(message, email.noteid); <<<<< throws Exception
> BatchResult batchResult = batch.Done(null);
>
>
>







[ Post a follow-up to this message ]



    Re: PropertySchema existence  
Paul Somers [MVP+BizTalk]


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


 
06-06-05 12:57 PM

You can use the ExplorerOM library, the method you are looking for is:

Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer _explorer  = new
BtsCatalogExplorer();
// Connect the explorer

_explorer.ConnectionString = connectionString;  // Very important to set the
connection string to the management db.

_explorer.Schemas[name];

This will return the schema for your desired assembly, to check that  it
exists, if it return null, then its not deployed.

To check if your assembly with the schema is deployed, try:
_explorer.Assemblies[name]

<Joerg Fischer> wrote in message
news:exl7mUoaFHA.3048@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> If you want to get that degree of insight, you can use the BizTalkOM
> Objekt model. It is well documented by the online help. However, please
> not that in order to be able to use that, the user account you are acting
> with must be member of the BizTalk Administrators group.
>
> Sincerely
>
> Joerg Fischer
> MVP
>
> "eXavier" <fhns@centrum.cz> schrieb im Newsbeitrag
> news:O4Jdc0qZFHA.1148@tk2msftngp13.phx.gbl... 
>
>







[ Post a follow-up to this message ]



    Re: PropertySchema existence  
eXavier


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


 
06-08-05 12:47 PM

Thanks for your response, but I really don't want to incorporate connection
string to managment database into an adapter. Is using BizTalkOM the only
way how to figure out if the property can be promoted ?

eXavier

"Paul Somers [MVP+BizTalk]" <paul@somers.com> wrote in message
news:%23LDc4eoaFHA.2128@TK2MSFTNGP14.phx.gbl...
> You can use the ExplorerOM library, the method you are looking for is:
>
> Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer _explorer  = new
> BtsCatalogExplorer();
> // Connect the explorer
>
> _explorer.ConnectionString = connectionString;  // Very important to set
the
> connection string to the management db.
>
> _explorer.Schemas[name];
>
> This will return the schema for your desired assembly, to check that  it
> exists, if it return null, then its not deployed.
>
> To check if your assembly with the schema is deployed, try:
> _explorer.Assemblies[name]
>
> <Joerg Fischer> wrote in message
> news:exl7mUoaFHA.3048@TK2MSFTNGP12.phx.gbl... 
acting[vbcol=seagreen] 
not[vbcol=seagreen] 
SystemMessageContext(message.Context);[vbcol=seagreen] 
>
>







[ Post a follow-up to this message ]



    Re: PropertySchema existence  
Yossi Dahan


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


 
06-30-05 12:48 PM

A simple try catch will do the trick for you, won't it?
Try it the first time, if you fail keep an indication in memory so you don't
have to keep trying.

Yossi Dahan



"eXavier" <fhns@centrum.cz> wrote in message
news:e1e915BbFHA.3400@tk2msftngp13.phx.gbl...
> Thanks for your response, but I really don't want to incorporate
> connection
> string to managment database into an adapter. Is using BizTalkOM the only
> way how to figure out if the property can be promoted ?
>
> eXavier
>
> "Paul Somers [MVP+BizTalk]" <paul@somers.com> wrote in message
> news:%23LDc4eoaFHA.2128@TK2MSFTNGP14.phx.gbl... 
> the 
> acting 
> not 
> SystemMessageContext(message.Context); 
>
>







[ Post a follow-up to this message ]



    Re: PropertySchema existence  
Paul


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


 
07-04-05 12:48 PM

If you are using the right user, then integrated security is all you need
for connection sting.

"eXavier" <fhns@centrum.cz> wrote in message
news:e1e915BbFHA.3400@tk2msftngp13.phx.gbl...
> Thanks for your response, but I really don't want to incorporate
> connection
> string to managment database into an adapter. Is using BizTalkOM the only
> way how to figure out if the property can be promoted ?
>
> eXavier
>
> "Paul Somers [MVP+BizTalk]" <paul@somers.com> wrote in message
> news:%23LDc4eoaFHA.2128@TK2MSFTNGP14.phx.gbl... 
> the 
> acting 
> not 
> SystemMessageContext(message.Context); 
>
>







[ Post a follow-up to this message ]



    Re: PropertySchema existence  
eXavier


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


 
07-28-05 07:48 AM

Not true in our scenario - biztalk database is on dedicated (clustered) DB
server which hosts several installation of biztalk databases, so there are
databases
App1BiztalkMgmtDb, App2BiztalkMgmtDb, ...



"Paul" <paul@somers.com> wrote in message
news:erRu69IgFHA.2700@TK2MSFTNGP15.phx.gbl...
> If you are using the right user, then integrated security is all you need
> for connection sting.
>
> "eXavier" <fhns@centrum.cz> wrote in message
> news:e1e915BbFHA.3400@tk2msftngp13.phx.gbl... 
only[vbcol=seagreen] 
set[vbcol=seagreen] 
it[vbcol=seagreen] 
please[vbcol=seagreen] 
library[vbcol=seagreen] 
to[vbcol=seagreen] 
promoting[vbcol=seagreen] 
error[vbcol=seagreen] 
>
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:47 PM.      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