Hi Everybody
Im trying to process a webrequest in NAV2017 with System Dotnet variables.
Im currently trying to implement this: http://forum.mibuso.com/discussion/63741/dotnet-for-webrequest - More specificly the part where i strip the response of namespace and soap.
However im having some issues with the Transform function getting the following error:
A call to System.Xml.Xsl.XslTransform.Transform failed with this message: The type of one or more arguments does not match the method's parameter type.
My RemoveNameSpace function looks like this:
Parameters:
Local variables:
Code:
Any directions as to why this fails would be greatly appreciated?
Im trying to process a webrequest in NAV2017 with System Dotnet variables.
Im currently trying to implement this: http://forum.mibuso.com/discussion/63741/dotnet-for-webrequest - More specificly the part where i strip the response of namespace and soap.
However im having some issues with the Transform function getting the following error:
A call to System.Xml.Xsl.XslTransform.Transform failed with this message: The type of one or more arguments does not match the method's parameter type.
My RemoveNameSpace function looks like this:
Parameters:
Var Name DataType Subtype Length No Source DotNet System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' Yes Destination DotNet System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Local variables:
Name DataType Subtype Length XslTransform DotNet System.Xml.Xsl.XslTransform.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' XmlStyleSheet DotNet System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' Writer DotNet System.IO.StringWriter.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' XsltNullArgs DotNet System.Xml.Xsl.XsltArgumentList.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' XsltNullArgs2 DotNet System.Xml.Xsl.XsltArgumentList.'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Code:
XslTransform := XslTransform.XslTransform; XmlStyleSheet := XmlStyleSheet.XmlDocument; XmlStyleSheet.InnerXml( '<?xml version="1.0" encoding="UTF-8"?>' + '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">' + '<xsl:output method="xml" encoding="UTF-8" />' + '<xsl:template match="/">' + '<xsl:copy>' + '<xsl:apply-templates />' + '</xsl:copy>' + '</xsl:template>' + '<xsl:template match="*">' + '<xsl:element name="{local-name()}">' + '<xsl:apply-templates select="@* | node()" />' + '</xsl:element>' + '</xsl:template>' + '<xsl:template match="@*">' + '<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>' + '</xsl:template>' + '<xsl:template match="text() | processing-instruction() | comment()">' + '<xsl:copy />' + '</xsl:template>' + '</xsl:stylesheet>' ); XslTransform.Load(XmlStyleSheet); Writer := Writer.StringWriter; XslTransform.Transform(Source,XsltNullArgs2,Writer); Destination := Destination.XmlDocument; Destination.InnerXml(Writer.ToString);
Any directions as to why this fails would be greatly appreciated?