Hello everybody,
how can I add encode - into xml? :-) i need this - <?xml version="1.0" encoding="UTF-8"?>
from this <?xml version="1.0"?>
Iam using XML DOM Management for creating xml
<?xml version="1.0"?>
-<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="
http://www.teccom-eu.net/wsdl">
-<o:Security xmlns:o="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:s="
http://schemas.xmlsoap.org/soap/envelope/" s:mustUnderstand="1">
-<o:UsernameToken xmlns:u="
http://www.teccom-eu.net/wsdl" u:Id="uuid-441ec92f-002a-4c40-adea-a40eb7159b2e">
<o:Username>6790000000930</o:Username>
<o:Password Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TcCUser_2006!</o:Password>
</o:UsernameToken>
</o:Security>
-<SOAP-ENV:Body>
-<ProcessRequest>
<RequestElement>
<FunctionCallRequest xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
thx Everyone
Answers
How can I insert encoding="utf-8" into xml header please?
you should start it with
That's alll.
Yes, but problem is, that I need to put this automatically with function in NAV. I have to connect two system with web services and second one
requires encoding in xml header.
XMLDOMMgt create xml just with <?xml version="1.0"?> instead this <?xml version="1.0" encoding="utf-8" ?>
XMLDeclaration := XmlDoc.CreateXmlDeclaration('1.0','UTF-8','');
XmlDoc.AppendChild(XMLDeclaration);
put this before root element
Name DataType Subtype Length
XMLDeclaration DotNet System.Xml.XmlDeclaration.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
XMLDOMMgt.AddDeclaration(XmlDoc,'1.0','UTF-8','');
Are you able to share your code? I'm trying to do the same but I don't have code which add ANY declaration. Even when I'm adding (or trying) it doesn't add it or errors...
I have tried to create node with 'processinginstruction' type, insertbefore function, createxmldeclaration, and few more but it still doesn't display what I want to.
Please help.