BizTalk - Updating .pdf file issue in sql

Asked By Abhishek Iyer
31-Aug-10 09:10 AM

I have to update a .pdf filename in the database in a file -> Sql scenario. The number of files are ennumerous and each file has a corresponding entry in SQL table.

for eg: the database entry is : abc.pdf

The error i'm getting is :

A message received by adapter "FILE" on receive location "Receive Location2" with URI "C:\Projects\Udatepdfstatus\in\*.pdf" is suspended.

Error details: The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted. Please use the Biztalk Administration console to troubleshoot this failure.

 

The same thing, if it's an .xml file, works fine. I have my pipelines as PassThrough in both the send and receive ends.

Could anyone tell me where I'm going wrong or is it that the .pdf thing can't be handled in Biztalk?

  Mohan Raj Aryal replied to Abhishek Iyer
31-Aug-10 11:44 AM
Please make sure: 

-> Since you are receiving PDF, you will either need to use passthru pipeline which simply publish your message to the messagebox database. Or write your custom pipeline if you are dealing further with PDF file.
-> The error is mentioning clearly that your received message is suspended because there is no subscriber who is waiting for that message. Note that the basic fundamental of BizTalk is to receive message, process it(if any), and send to the destination since it is an integration tool. Here, you are not sending your received message to anybody so your message is suspended and is in messagebox. The one way to get rid of this message is to create a subscriber for that message. Subscription can be created using Send Port filter, Orchestration Receive Port etc. 
-> If your concern is only about name of the file, you can use FILE.ReceiveFileName property but to get this inside orchestration, you can't directly use passthru pipeline because your XLANG Engine deals with xml message only. So unless you have a xml message you can't read this inside orchestration. 

Now, coming to your scenario, If you are not dealing with PDF at all, you can simply ignore the file in your custom pipeline once you read the filename, and wrap it inside a new xml message and publish this to the messagebox so that your orchestration can subscribe that message and insert entry into the SQL database using SQL adapter.

In case you need that message further, then you can wrap binary content of PDF inside new xml element along with file name in Custom Receive pipeline. In this case you will need to use convert byte array to Base64String using a method like Convert.ToBase64String(byteArray).  On send pipeline, again convert Base64String to byte array and write it into the file (i.e. PDF file). Considering the performance, it is not good to publish entire file into messagebox if your filesize is large. 

I am not sure if you are doing anything with received PDF file. So if could give me the details what you are doing further with the pdf I can recommend you the exact solution.
  Abhishek Iyer replied to Mohan Raj Aryal
10-Sep-10 02:30 AM

I got the solution. My scenario required BTS to process the Filename and update the corresponding entry in the Sql database-nothing more. What i did was this - I promoted the node responsible for receiving the filename, used a sample receive pipeline and added to it the schema of the filename in a flat file disassembler. In the Orchestration, I chopped off all the unwanted things so that I just had the filename - as in abc.pdf and then passed it to the stored procedure's parameter that is used to update the filename status in the Sql table and it worked fine.

 

Thanks for your help though. I'm sure they will help in some future project and do keep helping, friend.

Create New Account
help
Stored Procedure dtasp_CtxEnd failed to run.Timeout expired Windows Server I'm seeing a timeout on one of the biztalk stored procedures. It's happening every few minutes and it only started a few days ago critical and we don't use bam, but how can I fix it? Execute event error. Exception information: "Time out occurred while executing the event data. This is a non critical error and the BAM Event bus service will try resubmitting the data again." SQLServer: myserver, Database BizTalkDTADb.Stored Procedure dtasp_CtxEnd failed to run.Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. . BizTalk Discussions CtxEnd (1) Database (1) Myserver (1) Biztalk (1) Dtasp (1) Days (1) Bam (1) are you running sql express or Sql 2k
Error message from SQL adapter Windows Server I have a two-way send-receive SQL BizTalk port (BizTalk 2006). This port executes a stored procedure (SQL Server 2005). This stored procedure returns the content of a column of type 'text'. Sending a request to the sql port triggers the following error from BizTalk: A message sent to adapter "SQL" on send port "RequestToSQLPort" with URI "SQL: / / localhost / MyDB / " is suspended. Error details: HRESULT = "0x 7a" Description = "No error description provided" After having edited the stored procedure
Biztalk 2002 adapter for sql 2003 Windows Server When creating a job, selecting a stored procedure we get the following error: when using the stored procedure through query analyzer there were no errors so the problem is in the biztalk adapter BizTalk Discussions SQL Server 2000 (1) SQL Server 2005 (1) MedAdmin (1) MedAmin (1 Biztalk (1) Blog.biztalk (1) Allthough (1) Xmldata (1) I think the issue is because you have sql 2003
BizTalk 2004, DTA-error Windows Server Hi, We recently received this warning in our Biztalk eventlog: Execute batch error. Exception information: TDDS failed to batch execution of streams. SQLServer: [server], Database: BizTalkDTADb.Timeout expired the operation or the server is not responding. . It was follow by this warning: Cleanup error. Exception information: TDDS failed to execute event. SQLServer: [server], Database: BizTalkDTADb.Violation of PRIMARY KEY insert duplicate key in object 'TDDS_StreamStatus'. The statement has been terminated. . And finally by this error: Cleanup error.Failed to recover from previous error. SQLServer: [server], Database: BizTalkDTADb. Any ideas? Thanks. Daniel BizTalk Discussions BizTalkDTADb.Timeout (1) SQL Server
BizTalk Error Message Tracking There may be a rare chance of failure occur in the integration process. The BizTalk will not process the error prone data. In that case, there are two ways in which the error messages are logged. a) File Location b) Database Table a) File Location In order to routing at send and receive ports. ii. Create filters at the send port to route error messages based on the promoted error properties. i. Enabling failed message routing at send port · Double click on send port to failed Messages” in the right pane. ii. Create filters at the send port to route error messages based on the promoted error properties. · Double click on send port to open the