Showing posts with label WCF adapter. Show all posts
Showing posts with label WCF adapter. Show all posts

Wednesday, July 9, 2014

BizTalk XmlException: "'Text' is an invalid XmlNodeType. Line 1, position 1"

If you run into this error during runtime:

A message sent to adapter "WCF-Custom" on send port "SapInvoiceExport" with URI "sap://CLIENT=007;LANG=EN;@a/SAP-SERVER/00?GWSERV=sapgw00&RfcSdkTrace=False&AbapDebug=False" is suspended.
 Error details: System.Xml.XmlException: 'Text' is an invalid XmlNodeType. Line 1, position 1.
   at System.Xml.XmlReader.ReadStartElement(String name)
   at Microsoft.BizTalk.Adapter.Wcf.ComponentModel.IdentityElementSurrogate.ReadXml(XmlReader reader)
   at Microsoft.BizTalk.Adapter.Wcf.ComponentModel.IdentityElementSurrogate.set_ConfigXml(String value)
   at Microsoft.BizTalk.Adapter.Wcf.Config.CustomTLConfig.CreateEndpointAddress()
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.InitializeValues(IBaseMessage message)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfTransmitter`2.GetClientFromCache(String spid, IBaseMessage message)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfAsyncBatch`2.BatchWorker(List`1 messages)
 MessageId:  {E62F2F57-1727-40A7-81DC-8DF797250933}
 InstanceID: {E59F2C86-D2A7-4A57-B6B0-7C3995676E3A}

... then your WCF Send Port Configuration might have screwed up. You can verify this, if the "Send Port Configuration Wizard" breaks with this error when you press the "Edit Endpoint Identity" button or when you try to export the configuration. The Endpoint Identity itself shows some sort of stars:


Solution (July 7, 2014): I imported the binding files with <Password vt="1">pwd<Password><Identity vt="1" />. Since vt contains the type (and format) of the element, it got somehow puzzled. So either use vt="8" or just remove the <Identity> element if you do not need it.

However, the same error can occur also with other mistakes in the Custom props, for example wrong passwords or escaping errors (for example, a non-escaped ">"). Thanks, Christian, for the information!

Tuesday, April 1, 2014

Visual Studio's Consume Adapter Wizard does not show the SAP IDoc you search

There are several reasons, if you can't see an SAP IDoc in the "Consume Adapter Wizard"-List.

First, their might be a resitriction in SAP: You could analyse this in se37 calling IDOCTYPE_READ_COMPLETE. Thanks for the help, Patrick!

Second, you might search for a basic type but the wizard only list message types (and one level deeper, its basis type). Thanks, Christian!

Third, the IDoc search in the wizard does not search for basic types, so you really have to find out what message type uses this basic type.

You can find a good explanation on IDoc opertions on MSDN.

Tuesday, September 6, 2011

32/64-bit Installation of Oracle Adapter

After installing the Oracle Adapter, it might be that you run into errors in run-time, though you solved all the problems so that you could connect to Oracle in VS. ;-) I ran into the following error
System.IO.FileNotFoundException: Die Datei oder Assembly Oracle.DataAccess, Version=2.111.7.20, ...

Actually, the Oracle WCF adapter found the assembly 2.111.7.0, but was searching the Oracle.DataAccess.dll in the BizTalk installation folder:
LOG: Diese Bindung startet im default-Load-Kontext.
LOG: Die Anwendungskonfigurationsdatei wird verwendet: D:\Program Files (x86)\Microsoft BizTalk Server 2009\BTSNTSvc64.exe.Config
LOG: Die Computerkonfigurationsdatei von C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\config\machine.config wird verwendet.
LOG: In der Anwendungskonfigurationsdatei wurde eine Umleitung gefunden. 2.111.7.0 wird nach 2.111.7.20 umgeleitet.
LOG: Verweis nach der Richtlinie: Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342
LOG: Download von neuem URL file:///D:/Program Files (x86)/Microsoft BizTalk Server 2009/Oracle.DataAccess.DLL.
The problem was inconsistent image-typing: While VS ran in 32bit, the BizTalk host instance ran in 64bit so that it didn't look in the GAC... Using a 32-bit host instance solved the problem; however, more elegant might be to install a 64-bit version of the Oracle.DataAccess (that however could cause problems with a 32-bit VS...)

Furthermore, deploy the policies "policy.2.x.Oracle.DataAccess"
into the 32- and the 64-bit GAC to because both VS and the administration console of the BizTalk are searching for the assembly.

Monday, September 5, 2011

Installing Oracle WCF-Adapter

In order to use the LOB WCF-Adapter for Oracle, you have to install an oracle client. Since BizTalk requests the assembly Oracle.DataAccess of version 2.111.7.0 or above, you have to select a correct Oracle client at least in version 11.2.0.21.

Install the client according to Steef-Jan Wigger's explanation. In
%oracle%\product\11.1.0\client_1\odp.net\bin\2.x, you find the Oracle.DataAccess and you can put it to the GAC using OraProvCfg.exe that also redirects all assembly invocations to the actual one. (Otherwise, VS throws an error that it can't find version 2.111.7.0).

Additionally, you can add the sqlnet.ora und tnsnames.ora into %oracle%\product\11.1.0\client_1\Network\Admin. You find samples in the "Sample" folder.

ORA-1017: invalid name/password: When you connect from Visual Studio to the Oracle server, make sure to write the username in capital letters, even if the username is not written in capital letters in Oracle (otherwise you get an ORA-1017: invalid name/password error)!



Friday, June 18, 2010

Guest post: Misleading error message with SAP WCF custom adapter

In an IDOC receive scenario using the WCF custom adapter with SAP binding we received the following error messages:

The adapter "WCF-Custom" raised an error message. Details "Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_EXCEPTION. ErrorGroup=RFC_ERROR_APPLICATION_EXCEPTION. SapErrorMessage=OBJECT_UNKNOWN. AdapterErrorMessage=Error returned by RfcCallReceiveEx while calling RFC: IDOCTYPE_READ_COMPLETE..

The solution is quite simple as it resides in the SAP setting for the RFC connection, transaction SM59. Switching the communication type to Unicode solved the problem.




(This post is brougth to you by Franziska Kirschner, our great new team member)

Tuesday, March 10, 2009

Sending Big IDocs with the WCF-Custom-Adapter

In MSDN, there's a good explanation how to connect BizTalk and SAP with the WCF-Custom-Adapter. However, if you want to send big IDocs, there are some boundaries:

If you use the action Idoc, you could get an exception like: "Failed to allocate a managed memory buffer of 123982965 bytes. The amount of available memory may be low."

If you use SendIdoc instead, you get an exception in the receive pipeline: "Attempt to pass a delimited field greater than the maximum field length of 50000000."

As soon as I find something out, I post it here.