tags:

views:

58

answers:

1

hi friends

I am working with 3 xml's,

i wand to send my 3 xml request to different http's in same time, How it possible?

I using classic asp(VBSCRIPT), below is my code now i use.

Below code is working fine.. But the problem is to take more time to send and recive xml (because it send in different time)

<%
'  xml 1

pXML=Server.URLencode(XML_REQUEST_ONE)
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "post", servletURLH01B, false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send  "xml_request=" &pXML
XMLresult_ONE= xmlhttp.responsexml.xml
Set xd= Server.CreateObject ("Microsoft.XMLDOM")
  xd.async = "false"
  xd.loadXML(XMLresult_ONE)

'  xml 2

pXML=Server.URLencode(XML_REQUEST_TWO)
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "post", servletURLH01B, false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send  "xml_request=" &pXML
XMLresult_TWO= xmlhttp.responsexml.xml
Set xd= Server.CreateObject ("Microsoft.XMLDOM")
  xd.async = "false"
  xd.loadXML(XMLresult_TWO)

'  xml 3

pXML=Server.URLencode(XML_REQUEST_THREE)
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "post", servletURLH01B, false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send  "xml_request=" &pXML
XMLresult_THREE= xmlhttp.responsexml.xml
Set xd= Server.CreateObject ("Microsoft.XMLDOM")
  xd.async = "false"
  xd.loadXML(XMLresult_THREE)
%>

Is it possible to send request and recive response in same time?

hoping ur support

Alex

A: 

Hi Alex, I'm not sure what you are asking for...

it is impossible to 'send request and recive response in same time' this is generally due to network latency. Each request over a network is delayed by the physical limitations of the speed of electricity (and server/network loads etc)

BUT i'm really not sure that this is what you are asking.

Do you want to be able to send all three requests simultaneously? and then wait for each response?

Harry
tks, Yes, i wand to send three requests simultaneously and wait for each response..
Alex