cancel
Showing results for 
Search instead for 
Did you mean: 

exception thrown while marshaling RFCTYPE_XMLDATAto .NET type

Former Member
0 Kudos

Hi,

I have created a .net proxy for Function module SWNC_GET_WORKLOAD_STATISTIC using sap.net connector 1.2.2. Now when i am calling this proxy from my .net code it give me following exception.

Error in rfc call.SAP.Connector.RfcMarshalException: System exception thrown while marshaling RFCTYPE_XMLDATAto .NET type. ---> System.Xml.XmlException: This is an unexpected token. The expected token is 'EndElement'. Line 1, position 7128.

§§ at System.Xml.XmlTextReader.Read()

§§ at System.Xml.XmlValidatingReader.ReadNoCollectTextToken()

§§ at System.Xml.XmlValidatingReader.Read()

§§ at System.Xml.XmlLoader.LoadChildren(XmlNode parent)

§§ at System.Xml.XmlLoader.LoadElementNode()

§§ at System.Xml.XmlLoader.LoadCurrentNode()

§§ at System.Xml.XmlLoader.LoadChildren(XmlNode parent)

§§ at System.Xml.XmlLoader.LoadElementNode()

§§ at System.Xml.XmlLoader.LoadCurrentNode()

§§ at System.Xml.XmlLoader.LoadChildren(XmlNode parent)

§§ at System.Xml.XmlLoader.LoadElementNode()

§§ at System.Xml.XmlLoader.LoadCurrentNode()

§§ at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)

§§ at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)

§§ at System.Xml.XmlDocument.Load(XmlReader reader)

§§ at System.Xml.XmlDocument.Load(Stream inStream)

§§ at SAP.Connector.RfcMarshal.RfcScalarParamToNetScalarParam(SAPConnection conn, Type t, String rfcParamName, IntPtr src, RFCTYPE type, Int32 len, Int32 decimals)

Please help.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sandeep,

the XML structure is u're problem.

this is a responsibility of the tool, so you dont really have to do anything except :

1> check the versions of all dependancies of SAP .NET Connector: java, xml,

2> make sure u're target system is constant, at least initially for testing [i.e. a proxy generated for sys1, but used for sys2]

3> regenerate proxies

with respect,

amit

0 Kudos

Hello Sandeep,

it looks like the XML that you want transfer is not correct. I would recommend you to check at first the XML-document on the SAP site. If there is a way to save it, then do this and look that's well formed. Maybe there is a mistake in the XML structure ?

Regards

Holger