1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

serverXMLHTTP object

Discussion in 'C#' started by NewKidAPR, Nov 19, 2007.

  1. #1
    hi i am new to asp and i am playing around with the serxmlhttp.

    i am able to create the and send the xml request to the server. but i am unable to process the request on the server side. ho do i request the xml data on the server and process it.

    client code as follows:
    xmlRequest = "<GenerateRequest>" &_
    	"<UserId>" & User & "</UserId>" &_
    	"<PassWord>" & Password & "</PassWord>" &_
    	"<Number1>" & num1 & "</Number1>" &_
    	"<Number2>" & num2 & "</Number2>" &_
    	"<UrlSuccess>" & SuccessUrl & "</UrlSuccess>" &_
    	"<UrlFail>" & FailUrl & "</UrlFail>" &_
    	Dim objSrvHTTP, strReturn, xmlDoc
    	Set objSrvHTTP = server.Createobject("MSXML2.ServerXMLHTTP")
    	objSrvHTTP.open "POST",Url,False	
    	[COLOR="Red"]Note: 1[/COLOR]objSrvHTTP.send xmlRequest 
    	strReturn = objSrvHTTP.responseText
    	Set xmlDoc = server.CreateObject ("Msxml2.FreeThreadedDOMDocument.3.0")
    	xmlDoc.async = false
    	url = getField( "URI", xmlDoc)
    	valid = getField( "@valid", xmlDoc)
    	if( valid = "1") Then
    		Response.Redirect url
    		Response.Write "Transaction failed: "& strReturn
    	End If
    Code (markup):
    1: Server needs to get the xml data process it and write a request. how do i do this?
    Any help will be highly appreciated
    NewKidAPR, Nov 19, 2007 IP