<?xml version="1.0"?> <NavisionObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www-Navision-com:NavisionObject.xml"> <UserName/> <CompanyName/> <FunctionName>GetCompanyName</FunctionName> <ParameterList/> <Result/> </NavisionObject>
Q := Q.MessageQueue('.\private$\temp'); Q.Formatter := QActiveXFormatter.ActiveXMessageFormatter; IF TryPeek THEN BEGIN QMsg := Q.Peek(TS.TimeSpan(0,0,1)); END ELSE BEGIN CLEAR(ReceiveMSMQ); ReceiveMSMQ.SetTryPeek; IF ReceiveMSMQ.RUN THEN REPEAT QMsg := Q.Receive(TS.TimeSpan(0,0,10)); InStream2 := QMsg.BodyStream; REPEAT InStream2.READTEXT(XMLChar); XMLText := XMLText + XMLChar; UNTIL InStream2.EOS; XMLDoc2 := XMLDoc2.XmlDocument; XMLDoc2.LoadXml(XMLText); XMLNode2 := XMLDoc2.SelectSingleNode('/NavisionObject/FunctionName'); IF NOT ISNULL(XMLNode2) THEN MESSAGE('Success') ELSE MESSAGE('Failed'); CLEAR(ReceiveMSMQ); ReceiveMSMQ.SetTryPeek; UNTIL NOT ReceiveMSMQ.RUN ; END; NameDataType Subtype Length XMLNode2 DotNet System.Xml.XmlNode.'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' XMLDoc2 DotNet System.Xml.XmlDocument.'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Comments
Hope this helps
Thomas
Thanks
xmlns="urn:www-Navision-com:NavisionObject.xml"
this namespace doesn't have a prefix like the first two namespaces...
remove this namespace and try again