eXavier
2005-06-01 13:23:40 UTC
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);
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);