Hi,
I am trying to integrate some web server process into Navision using MSMQ and trying to use ComCom2 to do it.
The problem I am having is that VBScript uses Unicode strings (with 00 hex) every second character. Hence Instream.READ or InStream.READTEXT break and assume InStream.EOS is true, despite more characters being in the Message.
I have tried to use ComCom2 on the WebServer , but cannot get the webserver to create instances on ComCom2 , either the Communication Component, or the MSQBusAdapter.
I have even tried to copy the Visual basic example in Navision but only have Visual Studio .NET.
The following code is as close as I can get it,
Dim cc2
Dim mqBA
Dim outMsg
Dim Dom
Dim inMsg
Dim ResponseText
cc2 = New NSCOMCOM2Lib.CommunicationComponent()
mqBA = New MSMQBUSADAPTERLib.MSMQBusAdapter()
Dom = New MSXML2.DOMDocument30()
cc2.AddBusAdapter(mqBA, 1)
mqBA.OpenWriteQueue(".\private$\toNavision", 0, 0)
mqBA.OpenReplyQueue(".\private$\ReplyQueue", 0, 0)
outMsg = cc2.CreateoutMessage("Message queue://")
Dom.Load("C:\test.xml")
Dom.Save(outMsg.GetStream())
inMsg = outMsg.SendforWaitReply(5000)
If inMsg Is Nothing Then
Debug.Write("No Response")
Else
Dom.Load(inMsg.GetStream)
Dom.Save(ResponseText)
Debug.Write(ResponseText)
End If
THis code breaks on the line : Dom.Save(outMsg.GetStream())
saying : Member not Found.
I have check the OutMsg object in object browser and that method does exist.
I am at a wits end with this....
If i could somehow send a non-unicode string to the MSMQ from the website, it would solve all my problems, but VBScript seems to only be able to send Unicode strings.
Has anyone got any idea's I can try.
NB. THe webserver is running Windows 2000 (No .NET framework) - so I cannot even use the C# example on MSDN.
THanks.
0
Comments
RIS Plus, LLC
RIS Plus, LLC