Discussion:
Trying to use SubmitDirect sample adapter
(too old to reply)
Waqar Sadiq
2008-07-14 16:42:10 UTC
Permalink
I have a custom send adapter that needs to publish a summary message. This
message is not being sent as a response to a message it is processing. This
adapter is built using the adapter framework.

I figured maybe using the SubmitDirect sample adapter is a way to publish
this summary message. So I have configured the SubmitDirect adapter as per
the instructions and created a receive port with it. I have also created an
isolated handler for this adapter. In my code, I try to invoke the
following code.
BizTalkMessaging btm = new BizTalkMessaging();

string url = "submit://submitmessages";

IBaseMessage responseMessage = btm.CreateMessageFromString(url,
content.OuterXml);

btm.SubmitMessage(responseMessage);



When I execute btm.CreateMessageFromString, I get the following error:

The Messaging Engine failed to register the adapter for "Submit" for the
receive location "submit://submitmessages". Please verify that the receive
location exists, and that the isolated adapter runs under an account that
has access to the BizTalk databases.
at
Microsoft.BizTalk.TransportProxy.Interop.IBTTransportProxy.RegisterIsolatedReceiver(String
url, IBTTransportConfig callBack)
at
Microsoft.Samples.BizTalk.Adapters.TransportProxyUtils.BizTalkMessaging.InternalInitialize(IBTTransportProxy
tp, String url, IBTTransportConfig callBack) in
C:\ProductDevelopment\LoyaltyWare\Main\Brierley.BizTalkAdapter\Brierley.BizTalkAdapter.Runtime\TransportProxyUtils\MessagingAPIs.cs:line
213
at
Microsoft.Samples.BizTalk.Adapters.TransportProxyUtils.BizTalkMessaging.CreateMessageFromString(String
url, String data) in
C:\ProductDevelopment\LoyaltyWare\Main\Brierley.BizTalkAdapter\Brierley.BizTalkAdapter.Runtime\TransportProxyUtils\MessagingAPIs.cs:line
437
at
Brierley.BizTalkAdapter.Runtime.LWBizTalkBatchPoolMgrThread.TimerCallBackFunction(Object
stateInfo) in
C:\ProductDevelopment\LoyaltyWare\Main\Brierley.BizTalkAdapter\Brierley.BizTalkAdapter.Runtime\LWBizTalkBatchPoolMgrThread.cs:line
280



Now, I can publish to the same receive adapter using the console executable
that comes with the adapter sample and the message gets published. So why
can't I publish from the code in my custom send adapter?



Can anyone help?



Thanks.
Tomas Restrepo [MVP]
2008-07-15 03:10:47 UTC
Permalink
Hi Waqar,
Post by Waqar Sadiq
I figured maybe using the SubmitDirect sample adapter is a way to publish
this summary message.
You've got the right idea, but the wrong implementation. If your send
adapter is an in-proc adapter (most likely), you can't use the SubmitDirect
sample adapter because it's an isolated adapter so it can't run within a
BTSNTSvcs.exe process.

So you either have to: Move the SubmitDirect code out of proc and do an IPC
call to the other process to submit the message, or, create something
similar to the SubmitDirect sample that is an in-proc adapter.
--
Tomas Restrepo
http://www.devdeo.com/
http://www.winterdom.com/weblog/
Waqar Sadiq
2008-07-15 13:17:37 UTC
Permalink
The reason I was trying to use the SubmitDirect adapter was because of my
other post relating to the need of publishing a message to the message box
from SEND adapter. The solution you suggested there eliminates the need for
having to publish this message.

Thanks.
Post by Tomas Restrepo [MVP]
Hi Waqar,
Post by Waqar Sadiq
I figured maybe using the SubmitDirect sample adapter is a way to publish
this summary message.
You've got the right idea, but the wrong implementation. If your send
adapter is an in-proc adapter (most likely), you can't use the
SubmitDirect sample adapter because it's an isolated adapter so it can't
run within a BTSNTSvcs.exe process.
So you either have to: Move the SubmitDirect code out of proc and do an
IPC call to the other process to submit the message, or, create something
similar to the SubmitDirect sample that is an in-proc adapter.
--
Tomas Restrepo
http://www.devdeo.com/
http://www.winterdom.com/weblog/
Loading...