kattre
asked on
Send XML Messages via Wiinsock
Hi
I am having trouble sending xml requests using winsock to an application server running on my pc.
I am able to connect, but when i try to send a xml request the server hasn't received the message.
If anyone can see why the following code wouldn't work or any other suggestions, it would be appreciated.
With Winsock1
.Close
.LocalPort = 0
.RemoteHost = "localhost"
.RemotePort = 7001
.Connect
End With
Dim objXMLDoc As New DOMDocument40
objXMLDoc.async = False
objXMLDoc.validateOnParse = False
objXMLDoc.resolveExternals = False
Dim root As IXMLDOMNode
Set root = objXMLDoc.appendChild(objX MLDoc.crea teElement( "Request_L ogon"))
Dim data As IXMLDOMNode
Set data = root.appendChild(objXMLDoc .createEle ment("Data "))
data.appendChild(objXMLDoc .createEle ment("User Name")).Te xt = "user_1"
' send xml request
Winsock1.SendData objXMLDoc.xml
Thanks.
I am having trouble sending xml requests using winsock to an application server running on my pc.
I am able to connect, but when i try to send a xml request the server hasn't received the message.
If anyone can see why the following code wouldn't work or any other suggestions, it would be appreciated.
With Winsock1
.Close
.LocalPort = 0
.RemoteHost = "localhost"
.RemotePort = 7001
.Connect
End With
Dim objXMLDoc As New DOMDocument40
objXMLDoc.async = False
objXMLDoc.validateOnParse = False
objXMLDoc.resolveExternals
Dim root As IXMLDOMNode
Set root = objXMLDoc.appendChild(objX
Dim data As IXMLDOMNode
Set data = root.appendChild(objXMLDoc
data.appendChild(objXMLDoc
' send xml request
Winsock1.SendData objXMLDoc.xml
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
winsock1.listen at port 7001
in the winsock1_data arrival event, do a getData and see what sutff is coming in.