Discussion:
PropertySchema existence
(too old to reply)
eXavier
2005-06-01 13:23:40 UTC
Permalink
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);
2005-06-06 10:47:37 UTC
Permalink
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
Post by eXavier
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
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);
Paul Somers [MVP+BizTalk]
2005-06-06 10:58:52 UTC
Permalink
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]
Post by
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
Post by eXavier
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
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);
eXavier
2005-06-08 11:37:39 UTC
Permalink
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
Post by Paul Somers [MVP+BizTalk]
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.
_explorer.Assemblies[name]
Post by
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
Post by eXavier
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
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);
Post by Paul Somers [MVP+BizTalk]
Post by
Post by eXavier
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);
Yossi Dahan
2005-06-30 08:26:22 UTC
Permalink
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
Post by eXavier
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
Post by Paul Somers [MVP+BizTalk]
Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer _explorer = new
BtsCatalogExplorer();
// Connect the explorer
_explorer.ConnectionString = connectionString; // Very important to set
the
Post by Paul Somers [MVP+BizTalk]
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.
_explorer.Assemblies[name]
Post by
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
Post by Paul Somers [MVP+BizTalk]
Post by
with must be member of the BizTalk Administrators group.
Sincerely
Joerg Fischer
MVP
Post by eXavier
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
Post by Paul Somers [MVP+BizTalk]
Post by
Post by eXavier
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
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);
Post by Paul Somers [MVP+BizTalk]
Post by
Post by eXavier
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);
Paul
2005-07-04 11:56:56 UTC
Permalink
If you are using the right user, then integrated security is all you need
for connection sting.
Post by eXavier
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
Post by Paul Somers [MVP+BizTalk]
Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer _explorer = new
BtsCatalogExplorer();
// Connect the explorer
_explorer.ConnectionString = connectionString; // Very important to set
the
Post by Paul Somers [MVP+BizTalk]
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.
_explorer.Assemblies[name]
Post by
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
Post by Paul Somers [MVP+BizTalk]
Post by
with must be member of the BizTalk Administrators group.
Sincerely
Joerg Fischer
MVP
Post by eXavier
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
Post by Paul Somers [MVP+BizTalk]
Post by
Post by eXavier
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
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);
Post by Paul Somers [MVP+BizTalk]
Post by
Post by eXavier
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);
eXavier
2005-07-28 07:14:53 UTC
Permalink
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, ...
Post by Paul
If you are using the right user, then integrated security is all you need
for connection sting.
Post by eXavier
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
Post by Paul Somers [MVP+BizTalk]
Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer _explorer = new
BtsCatalogExplorer();
// Connect the explorer
_explorer.ConnectionString = connectionString; // Very important to set
the
Post by Paul Somers [MVP+BizTalk]
connection string to the management db.
_explorer.Schemas[name];
This will return the schema for your desired assembly, to check that
it
Post by Paul
Post by eXavier
Post by Paul Somers [MVP+BizTalk]
exists, if it return null, then its not deployed.
_explorer.Assemblies[name]
Post by
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
Post by Paul Somers [MVP+BizTalk]
Post by
with must be member of the BizTalk Administrators group.
Sincerely
Joerg Fischer
MVP
Post by eXavier
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
Post by Paul
Post by eXavier
Post by Paul Somers [MVP+BizTalk]
Post by
Post by eXavier
create
also Biztalk project with the schema. If schema is deployed,
promoting
Post by Paul
Post by eXavier
Post by Paul Somers [MVP+BizTalk]
Post by
Post by eXavier
from
adapter works fine, but if the schema is not deployed I receive
error
Post by Paul
Post by eXavier
Post by Paul Somers [MVP+BizTalk]
Post by
Post by eXavier
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
Post by Paul Somers [MVP+BizTalk]
Post by
Post by eXavier
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
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);
Post by Paul Somers [MVP+BizTalk]
Post by
Post by eXavier
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);
Loading...