Hello,
I have a problem. I want to pass XML document as parameter to Scripting Functoid. Where I run this code I get a null variable.
I want pass strTmp which is document
<POLISY xmlns="http://E.M.P.FD"> <HEADERINFO> <RaportDateCreate>2009-06-08T11:57:25</RaportDateCreate> </HEADERINFO> <POLISA> <NUMER>A0/DOK/I/00006/2009</NUMER> </POLISA> <POLISA> <NUMER>A0/DOK/I/00007/2009</NUMER> </POLISA></POLISY>
[IN EXPRESSION EDITOR]
strTmp = xmlTmpDocOut.InnerText.ToString(); strXmlTmp = "<HashString><strcontractNo>"+strcontractNo+"</strcontractNo>"; strXmlTmp = strXmlTmp + "<xmlDoc>"+strTmp+"</xmlDoc>"; strXmlTmp = strXmlTmp + "<pass></pass></HashString>"; [IN Scripting Functoid] PARAMETER /*[local-name()='<Schema>']/*[local-name()='HashString']/*[local-name()='xmlDoc'] When I want to get a parameter value I get null. Where is an error. Please HELP. Paul.
strTmp = xmlTmpDocOut.InnerText.ToString();
strXmlTmp = "<HashString><strcontractNo>"+strcontractNo+"</strcontractNo>"; strXmlTmp = strXmlTmp + "<xmlDoc>"+strTmp+"</xmlDoc>"; strXmlTmp = strXmlTmp + "<pass></pass></HashString>"; [IN Scripting Functoid] PARAMETER /*[local-name()='<Schema>']/*[local-name()='HashString']/*[local-name()='xmlDoc'] When I want to get a parameter value I get null. Where is an error. Please HELP. Paul.
strXmlTmp = strXmlTmp + "<xmlDoc>"+strTmp+"</xmlDoc>";
strXmlTmp = strXmlTmp + "<pass></pass></HashString>";
[IN Scripting Functoid]
PARAMETER
/*[local-name()='<Schema>']/*[local-name()='HashString']/*[local-name()='xmlDoc']
When I want to get a parameter value I get null.
Where is an error.
Please HELP.
Paul.
Hi Paul,
I don't believe you can use a .net variable inside the map that you define outside of the map. I think you can create a schema with the following structure. Then create and populate a XLangMessage of this type of schema and use the XLangMessage as an input to the map. hope that helps.
How do you assign the content to xmlTmpDocOut?
There are a couple of issues with your code:strTmp = xmlTmpDocOut.InnerText.ToString();
The InnerText property only returns the text content of your Xml, basically strips all the xml tags.You should use:strTmp = xmlTmpDocOut.OuterXml;
The xpath statement in your map is also incorrect, there is no <Schema> root node in your message.You should use:/*[local-name()='HashString']/*[local-name()='xmlDoc']
This may not be the best way of achieving your result. Are you using custom Xslt? What is the purpose of passing the Xml to the scripting functoid?