Showing posts with label BizTalk 2013. Show all posts
Showing posts with label BizTalk 2013. Show all posts

Tuesday, July 1, 2014

Biztalk/VS Error Message "non-readonly field property access is limited to distinguished fields on class-based messages"

Do you run into the following error while building your Biztalk project?
Non-readonly field property access is limited to distinguished fields on class-based messages.
Visual Studio seems to misinterpret your property access to the XmlDocument message, for example with MSG.DocumentElement.LocalName. It assumes that you want to access a distinguished field, which is not allowed here.

Mahesh explained this error on MSDN - it comes from the installation of Hotfix 2851429 in CU2. According to Microsoft, it will be fixed with CU3; if you do not want to wait, you should contact Microsoft Support.

Until then, the only solution that helped me was to un-install the CU2.

Here the screenshot of the error:

UPDATE on July 8th, 2014: The issue is solved in BizTalk 2013 R2.

Tuesday, June 17, 2014

Biztalk FILE Send Port throws "The system cannot find the file specified"

If you receive this exception in BizTalk
A message sent to adapter "FILE" on send port "SENDPORT_FILE" with URI "\\ABC\PATH\%MessageID%.xml" is suspended. 
Error details: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
MessageId:  {5EC92559-C6E3-490C-A1D4-981D154BA126}
InstanceID: {4FF0F3DE-9A4C-4ECE-8C5A-98B34C78701E}
the reason could be that BizTalk does not find the assembly during runtime in the GAC, although it was there. In my case, I had to create the assembly in Development mode instead of instead of and then BizTalk could find the assembly.

Wednesday, April 9, 2014

Read IDocs with WCF-SAP-Adapter that contain Elements that are not attached to a SAP Release

There are basis types that contain elements that are not attached to any release; by design, you cannot retrieve their schema with the Consume Adapter Wizard like it is explained here neither could you get the IDocs on run-time. In both cases, you receive an error like this:
Error while retrieving or generating the WSDL. Adapter message: Details: ErrorCode=RFC_EXCEPTION. ErrorGroup=RFC_ERROR_APPLICATION_EXCEPTION. SapErrorMessage=SEGMENT_UNKNOWN.  AdapterErrorMessage=Error returned by RfcCallReceiveEx while calling RFC: IDOCTYPE_READ_COMPLETE..

When you anyway have to get the IDocs and your SAP colleagues cannot change the basis type's setting, you still can read the IDocs "weakly-typed", i.e. with the setting ReceiveIdocFormat=String.

First, you have to get the general ReceiveIdoc schema:

Second, you have to change the setting in the WCF-Adapter and set ReceiveIDocFormat to from "Types" to "String". A good explanation of how to receive idocs in this "raw format" is written by Mustansir and Gordie, as well as on MSDN.

The drawback of this solution is that you now receive the IDocs in a flat file format and no longer in good-readable and handable XML - until you add a flatfile pipeline.

Tipp: Use WE60 in SAP to find the element that is not set to a release! Maybe your SAP administrator can set this element to a release, and then you can retrieve the schema.

Thursday, July 4, 2013

SftpException "List remote directory error"

If you get this error message in the BTS2013 SFTP adapter:

The Messaging Engine failed to add a receive location "TestFTP_FTPOUTIN" with URL "sftp://ehavftp6402.eha.net:22/IN/*.xml" to the adapter "SFTP". Reason: "Microsoft.BizTalk.Adapter.SftpInvoker.SftpException: List remote directory error.

... the adapter can't find the directory at the remote server. Just add a slash ("/") before the folder name in the FolderPath field of the Receive Location adapter configuration.

Friday, May 24, 2013

EDIOverride Properties have been renamed

Short info: When migrating from BizTalk 2010 to BizTalk 2013, you have to adapt the EDIOverride properties. For example, the property Unb21 is now called UNB2_1.
The EDIOverride properties are stored in Microsoft.BizTalk.Edi.BaseArtifacts.dll.