Forum Replies Created
-
AuthorPosts
-
SKL,
Pleased to hear that it worked, can you mark the thread as answered.
Cheers, Nick.
Thanx for the Response Rusell. I have tried your both technoques to debug. Finally the conclusion is that. it Passes through Conctruct Messages and Sends Message through Orchestration in Debug mode.
but i received 2 messages in 1 message it RETURNS=”Successfully Send a Message (My String Message)”;
in second message in after debug is an error .. which is :
<SOAP:Envelope xmlns:SOAP=”http://schemas.xmlsoap.org/soap/envelope/” SOAP:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”><SOAP:Body><SOAP:Fault><faultcode>Microsoft BizTalk Server Negative Acknowledgment </faultcode><faultstring>An error occurred while processing the message, refer to the details section for more information </faultstring><faultactor>net.tcp://localhost:9002/WCFTEST</faultactor><detail><ns0:NACK Type=”NACK” xmlns:ns0=”http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd”><NAckID>{B4D96C2F-1B0D-4B1A-8560-386FF9E92365}</NAckID><ErrorCode>0xc0c016b7</ErrorCode><ErrorCategory>0</ErrorCategory><ErrorDescription>System.ApplicationException: The response message body was not read. (This may indicate the connection has been closed.)</ErrorDescription></ns0:NACK></detail></SOAP:Fault></SOAP:Body></SOAP:Envelope>
Hey Nick,
Thanks for the reply!!! It works dude… one more thing i noticed was SQL server was running under Admin login and not Network Service login so the problem was somebody changed the password of Administrator and that made SQL server also not to work properly.
Thanks once again
Regards,
SKL
Sounds like you weren’t copying across the promoted properties, so they didn’t exist in the copied message, hence the runtime exception (although it would compile fine as the copied message schema would let you select them in the Expression Shape).
If you’re happy with the solution, mark it as the answer!
Cheers, Nick.
I fixed it !!!!!! [:D]
First of all thank you to the responses above. I followed the link and determined that I had to copy the CONTEXT as well as the message.
So my new code looks like this:System.Diagnostics.EventLog.WriteEntry(“1″,”1”);
msgEDIRebateCopy = msgEDIRebate;
msgEDIRebateCopy(*) = msgEDIRebate(*);
System.Diagnostics.EventLog.WriteEntry(“2″,”2”);
msgEDIRebateCopy(Rebate.PropertySchema.CompanyNumber) = 905;
System.Diagnostics.EventLog.WriteEntry(“3″,”3”);
msgEDIRebateCopy(Rebate.PropertySchema.EDIDocumentNumber) = 22;
System.Diagnostics.EventLog.WriteEntry(“4″,”4”);
msgEDIRebateCopy(Rebate.PropertySchema.EDIBatchNumber) = 546;
System.Diagnostics.EventLog.WriteEntry(“5″,”5”);And voilla it now makes it all the way to number 5.
If you are interested and have time read on:
There are currently 2 projects in the solution. “Claims” and “Rebates”.
The Claims project always existed from before I started here.
When I joined I was asked to create a “rebates” project.
It is identical to the claims in every way except that
1) It would have a different namespace and
2) The schema would have 2 extra fields (RebateType and RebateValue)I was told to copy the Claims project EXACTLY – only change variable names etc to match rebates.
So I did this. Eg: The message copy code is taken verbatim from claims – it does not have any CONTEXT copying and yet it works fine.Weird!
Hello
Thanks for the responses.
Yes I am doing it all inside the same construct block.
In fact here is my real – non obfuscated – codeSystem.Diagnostics.EventLog.WriteEntry(“1″,”1”);
msgEDIRebateCopy = msgEDIRebate;
System.Diagnostics.EventLog.WriteEntry(“2″,”2”);
msgEDIRebateCopy(Rebate.PropertySchema.CompanyNumber) = 905;
System.Diagnostics.EventLog.WriteEntry(“3″,”3”);
msgEDIRebateCopy(Rebate.PropertySchema.EDIDocumentNumber) = 22;
System.Diagnostics.EventLog.WriteEntry(“4″,”4”);
msgEDIRebateCopy(Rebate.PropertySchema.EDIBatchNumber) = 546;
System.Diagnostics.EventLog.WriteEntry(“5″,”5”);So what I have done is write out a number to the eventlog at each stage of the operation so that I can tell where it is failing.
It gets as far as the number “2” being written and then it fails.
If I run it through the Orchestration debugger I see that “msgEDIRebate” is a full XML document but even once I have moved passed “2”,”2″ line I see that msgEDIRebateCopy is NULL – it never gets populated.BTW the construct block is set to construct the msgEDIRebateCopy message.
TIA
You should also bear in mind context properties when copying one message to another – I made a bit of a wah some time ago (http://www.modhul.com/2007/10/29/so-what-does-msg2-msg1-do-exactly/).
However, there is no reason why the copy isn’t copying… As ruselw points out, are you performing the copy (and later distinguished field assignment) within the same Construct Message block?
Nick.
Update: Whoops, that should have been *promoted property* assignment….
Anon,
There isn’t a way to set the encoding used in the e-mail subject field ASAIK; the best option is to set the subject manually as detailed by ruselw above and live with the encoding that is provided.
Alternatively, you could look at using a third party SMTP adapter that provides this functionality (if there is one).
Rgds, Nick.
Did you try setting the SMTP properties dynamically from an orchestration? For example:
OutboundMessage(SMTP.Subject) = “MySubject”;
Try this. In the BizTalk admin console, stop the orchestration. Now run your client. Now run a query for “All service instances” in the group hub page. You should have a suspended message. Open up the message to make sure the data was received correctly. If the data is right, you can right click on the messae and resume in debug mode. Right click again and open the message in the orchestration debugger. Now you can add breakpoints, step through, and check the values of variables and messages. Alternatively, you could just use a Sysem.Diagnostics.Trace.WriteLine() statement to print out the return value. Then you can view the trace statement in DebugView.
Are you doing the copying the message within a construct message block?
P.S. Once the construct message block finishes, the message is immutable. You can’t make any changes after the construct block.
Can you give some more details about the issue you’re having? I haven’t done this before, but I think the process would be something like this:
1. Receive email w/ Excel attachment via POP3 adapter.
2. Use a receive pipeline to extract the attachments from the email. The attachments are additional message parts. You may need to write a custom pipeline component to do this.
3. Connect a file send port to the email receive port using filter expressions. Configure the file mask with a “.XLS” or “.XLSX” extension, so that the files will have the correct extension.
Thanx Rusel. That helped.
I could not get it to work with Biztalk 2006 tho. There seems to be a problem with the 2006 SharePoint adapter. I installed r2 and it worked.
H
Haven’t seen that error before… You’re using the SOAP adapter for this? If you are on R2, there’s not much reason to use the SOAP adapter now that you have the WCF-BasicHttp adapter. This issue will probably go away just by using the WCF adapter, and even if it doesn’t, you will have MUCH better troubleshooting capabilities and flexibility to fix the problem. Here is more info: http://msdn.microsoft.com/en-us/library/bb246098.aspx.
Hope this helps!
I haven’t used the SharePoint adapter much, but here is a walkthrough: http://msdn.microsoft.com/en-us/library/aa560513.aspx. It looks like it is compabile with SharePoint 2007. To test the process, just configure a send port to use the SharePoint adapter and to point to your image library (use the PassThrough pipeline to send images). For a simple test, you can create a file receive port (with PassThrough) pipeline to deliver the images to the SharePoint send port using filter expressions.
-
AuthorPosts