sasha85
asked on
asp post xml
what is the operation that will send this to another server getway?
i mean i want that when user will submit some operation-for example he will submit some form...
that this xml will be posted
i mean i want that when user will submit some operation-for example he will submit some form...
that this xml will be posted
<%
Dim objXMLHTTP, URL, params
URL = "http://00.000.000.00:1111"
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "POST", URL & "?q=s", False
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=US-ASCII"
objXMLHTTP.setRequestHeader "Content-Location", "http://www.domain.com"
params = "x-up-ntfn-channel=push&x-up-ntfn-ttl=0&x-up-subno=123456789_yuc3.vont.com"
params = params & "&x-up-upnotifyp-version=upnotifyp/3.0"
objXMLHTTP.Send params
Response.Write objXMLHTTP.responseText
%>
URL obfuscated by modus_operandi, EE Moderator
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
if i got your question right -then it got to be send to another server and not to be print on screen...
What are you trying to do exactly?
ASKER
error '80004005'
<%
Dim objXMLHTTP, URL, params
URL = "http://00.000.000.00:0000"
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
params = "&x-up-ntfn-channel=push&x-up-ntfn-ttl=0&x-up-subno=6778991584-177831_wpu.solyr.com"
params = params & "&x-up-upnotifyp-version=upnotifyp/3.0"
objXMLHTTP.Open "POST", URL & "?Type=alert&Title=anything&URL=http://adf.kolou.com" & params, False
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=US-ASCII"
objXMLHTTP.setRequestHeader "Content-Location", "http://adf.kolou.coml"
objXMLHTTP.Send params
Response.Write objXMLHTTP.responseText
%>
ASKER
its the same error i got before when i tested the code that i snipped here
when i use
URL = "http://ip:port"
without all ?Type=alert&Title=anything &URL=http://abc.domain.com"
i get
msxml3.dll error '800c0005'
The system cannot locate the resource specified.
when i use
URL = "http://ip:port"
without all ?Type=alert&Title=anything
i get
msxml3.dll error '800c0005'
The system cannot locate the resource specified.
<%
Dim objXMLHTTP, URL, params
URL = "http://00.00.00.00:0000?Type=alert&Title=anything&URL=http://abc.domain.com"
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "POST", URL, False
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=US-ASCII"
objXMLHTTP.setRequestHeader "Content-Location", "http://abc.domain.com"
params = "x-up-ntfn-channel=push&x-up-ntfn-ttl=0&x-up-subno=96761589-1131_wap.conty.com"
params = params & "&x-up-upnotifyp-version=upnotifyp/3.0"
objXMLHTTP.Send params
Set objXMLHTTP = Nothing
%>
ASKER
i am need to http post to another server ip: 00.000.000.00 port 1111
variables:
POST /ntfn/add HTTP/1.0
Content-Location: http://www.domain.com
Content-Length: 100
x-up-upnotifyp-version: upnotifyp/3.0
x-up-subno: 123456789_yuc3.vont.com
x-up-ntfn-ttl: 0
x-up-ntfn-channel: push
Content-Type: application/x-up-alert;cha rset=US-AS CII
Type=alert&Title=anything& URL= http://www.domain.com
variables:
POST /ntfn/add HTTP/1.0
Content-Location: http://www.domain.com
Content-Length: 100
x-up-upnotifyp-version: upnotifyp/3.0
x-up-subno: 123456789_yuc3.vont.com
x-up-ntfn-ttl: 0
x-up-ntfn-channel: push
Content-Type: application/x-up-alert;cha
Type=alert&Title=anything&
URL obfuscated by modus_operandi, EE Moderator
>>i am need to http post to another server ip: 00.000.000.00 port 1111
Not with XMLHTTP, you don't :-(
Not with XMLHTTP, you don't :-(
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
oh, sorry - same DOMAIN, different servers - my bad.
ASKER
friends, any chance that you can help me here?:)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you seen the links I posted above?
Stilgar.
Stilgar.
ASKER
stilgar, ethat the same as mt xml code...what exactly do i need to change?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
msxml4.dll error '80072efd'
A connection with the server could not be established
why??
A connection with the server could not be established
why??
ASKER
i need to send those:
Type=alert&Title=anything& URL=http://abc.domain.com
when i use:
URL = "http://00.00.00.00:0000?Type=alert&Title=anything&URL=http://abc.domain.com"
i have:
msxml4.dll error '80072ee5'
The URL is invalid
why?
Type=alert&Title=anything&
when i use:
URL = "http://00.00.00.00:0000?Type=alert&Title=anything&URL=http://abc.domain.com"
i have:
msxml4.dll error '80072ee5'
The URL is invalid
why?
URL obfuscated by modus_operandi, EE Moderator
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
what do you mean-my title need to have the word "anything"
and the type = "alert"
is that not the right way to send those words?
i tried that:
URL = "http://00.00.00.00:0000?Type=alert&Title=anything&URL="& Server.URLEncode("http://abc.potam.com")
=
msxml4.dll error '80072ee5'
The URL is invalid
and the type = "alert"
is that not the right way to send those words?
i tried that:
URL = "http://00.00.00.00:0000?Type=alert&Title=anything&URL="& Server.URLEncode("http://abc.potam.com")
=
msxml4.dll error '80072ee5'
The URL is invalid
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i masked the ip+port...
don't sure what i need to learn from your code, it is GET(i need post)+responsetext(i need server2server,no screen output)+do not iclude other needed variables(i got 10 of them- ID: 20858223),Server.URLEncode (i already told that i was having the same problem with it)...
those all variables need to be send via POST
don't sure what i need to learn from your code, it is GET(i need post)+responsetext(i need server2server,no screen output)+do not iclude other needed variables(i got 10 of them- ID: 20858223),Server.URLEncode
those all variables need to be send via POST
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
what with
x-up-subno: 123456789_yuc3.vont.com
x-up-ntfn-ttl: 0
x-up-ntfn-channel: push
what is the syntax for them
?
x-up-subno: 123456789_yuc3.vont.com
x-up-ntfn-ttl: 0
x-up-ntfn-channel: push
what is the syntax for them
?
ASKER
xmlServerHttp.send "x-up-ntfn-channel=push&x- up-ntfn-tt l=0&x-up-s ubno=12345 6789_yuc3. vont.com&T ype=alert& Title=anyt hing&URL=" & Server.URLEncode("http://abc.potam.com")"
?
?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
like this?
set xmlServerHttp = server.createObject("MSXML2.ServerXMLHTTP.4.0")
xmlServerHttp.Open "POST", "http://00.00.00.00:0000", False
xmlServerHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlServerHttp.setRequestHeader "x-up-subno", "123456789_yuc3.vont.com"
xmlServerHttp.setRequestHeader "x-up-ntfn-ttl", "0"
xmlServerHttp.setRequestHeader "x-up-ntfn-channel", "push"
xmlServerHttp.send "Type=alert&Title=anything&URL="& Server.URLEncode("http://abc.potam.com")"
Set xmlServerHttp = Nothing
Yes
ASKER
msxml4.dll error '80072efd'
A connection with the server could not be established
:(((((
A connection with the server could not be established
:(((((
Dim xmlServerHttp
set xmlServerHttp = server.createObject("MSXML2.ServerXMLHTTP.4.0")
xmlServerHttp.Open "POST", "http://00.00.00.00:0000", False
xmlServerHttp.setRequestHeader "Content-Type", "application/x-up-alert;charset=US-ASCII"
xmlServerHttp.setRequestHeader "Content-Location", "http://abc.potam.com"
xmlServerHttp.setRequestHeader "Content-Length", "100"
xmlServerHttp.setRequestHeader "x-up-upnotifyp-version", "upnotifyp/3.0"
xmlServerHttp.setRequestHeader "x-up-subno", "123456789_yuc3.vont.com"
xmlServerHttp.setRequestHeader "x-up-ntfn-ttl", "0"
xmlServerHttp.setRequestHeader "x-up-ntfn-channel", "push"
xmlServerHttp.send "Type=alert&Title=anything&URL="& Server.URLEncode("http://abc.potam.com")
Set xmlServerHttp = Nothing
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
if i will make response.redirect "http://00.00.00.00:0000" on asp page and save it on the server...and will view the page from another computer...will it count as connecting to this url?
(i am working from hpst acount)
(i am working from hpst acount)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
why do i need "http:/"
when i remove it i get:
msxml4.dll error '80072ee6'
The URL does not use a recognized protocol
when i remove it i get:
msxml4.dll error '80072ee6'
The URL does not use a recognized protocol
ASKER
i mean http:/ is port80 and i need to send to diffrent port...
No HTTP is the protocol. Ports 80, 81 and 8081 are its default ports. Keep it.
Stilgar.
Stilgar.
ASKER
POST /ntfn/add HTTP/1.0
i was told to include this but i got no idea wht it is, may be that is the reason - how we can set the protocol that is not recognized here?
i was told to include this but i got no idea wht it is, may be that is the reason - how we can set the protocol that is not recognized here?
ASKER
how can i make sure the XMLHTTP object on the server can connect to that IP and Port if i am connecting to the server via ftp from my home?
i can create a file that will check this...i asked i can check this with response.redirect?
i can create a file that will check this...i asked i can check this with response.redirect?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i will do everything you will tell me to do...
how can i check if my server can connecte the ip+port as you told me if if i am using web host acount?
(if it was my home server i would just open browser and view but here i got no access, i just can create files and store them on the server with ftp connection)
how can i check if my server can connecte the ip+port as you told me if if i am using web host acount?
(if it was my home server i would just open browser and view but here i got no access, i just can create files and store them on the server with ftp connection)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes but i don't know what i got to do than?
ASKER
when i am opening my browser and type:
http://00.00.00.00:0000 i get The page cannot be displayed
but my ip is not the servers ip...
http://00.00.00.00:0000 i get The page cannot be displayed
but my ip is not the servers ip...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
stilgar, please tell me how can i check this?
i told you when i open my browser at home and go to the http://ip:port , i see "The page cannot be displayed"
i told you when i open my browser at home and go to the http://ip:port , i see "The page cannot be displayed"
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i am sending this and get no error, does it means that the connection with the remote server is fine?
<%
Dim params,mydata
params = "Type=alert&Title=anything &URL=http://opo.soltek.com"
mydata = getPage("http://00.000.000.00:4445",params)
function getPage(sourceURL,params)
set xmlServerHttp = server.createObject("MSXML 2.ServerXM LHTTP.4.0" )
xmlServerHttp.Open "POST", sourceURL, False
Set xmlServerHttp = Nothing
end function
%>
<%
Dim params,mydata
params = "Type=alert&Title=anything
mydata = getPage("http://00.000.000.00:4445",params)
function getPage(sourceURL,params)
set xmlServerHttp = server.createObject("MSXML
xmlServerHttp.Open "POST", sourceURL, False
Set xmlServerHttp = Nothing
end function
%>
ASKER
by the way,
i used : getPage = xmlServerHttp.responsetext
in my original code...
why do i have to sent responsetext if i don't wait for response and not sending via\to screen?
i used : getPage = xmlServerHttp.responsetext
in my original code...
why do i have to sent responsetext if i don't wait for response and not sending via\to screen?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
msxml4.dll error 'c00c023f'
This method cannot be called until the send method has been called.
This method cannot be called until the send method has been called.
<%
Dim params,mydata
params = "Type=alert&Title=anything&URL=http://anm.domain.co.il"
mydata = getPage("http://00.000.000.00:4445",params)
Response.Write( "Returned data from remote server : " & mydata)
function getPage(sourceURL,params)
set xmlServerHttp = server.createObject("MSXML2.ServerXMLHTTP.4.0")
xmlServerHttp.Open "POST", sourceURL, False
getPage = xmlServerHttp.responsetext
Set xmlServerHttp = Nothing
end function
%>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Where is your "xmlServerHttp.send" statement?
Sorry, hielo, I'll bow out.
ASKER
sorry i try to learn by heart all the commands and i write them, this time i fix it...
i recieved the error:
msxml4.dll error '80072efd'
A connection with the server could not be established
where is the problem than? my server\remote server?
i recieved the error:
msxml4.dll error '80072efd'
A connection with the server could not be established
where is the problem than? my server\remote server?
<%
Dim params,mydata
params = "Type=alert"
mydata = getPage("http://00.000.000.00:4445",params)
Response.Write( "Returned data from remote server : " & mydata)
function getPage(sourceURL,params)
set xmlServerHttp = server.createObject("MSXML2.ServerXMLHTTP.4.0")
xmlServerHttp.Open "POST", sourceURL, False
xmlServerHttp.send params
getPage = xmlServerHttp.responsetext
Set xmlServerHttp = Nothing
end function
%>
Sasha, it all comes to the same error every time, and both me and hielo told you what to do with it. As far as I can tell, your URL is invalid/not connected.
Stilgar.
Stilgar.
ASKER
i just have to ask one more time to be sure, can it be the problem of my server?
I'm 99% sure the problem is with the server you're posting TO, and not FROM.
Stilgar.
Stilgar.
One last comment:
getPage = xmlServerHttp.responsetext
should be:
getPage = xmlServerHttp.responseText
getPage = xmlServerHttp.responsetext
should be:
getPage = xmlServerHttp.responseText
ASKER
t>T?
why?
why?
Because that is how the property is accessed, that's why. "responsetext" is not a valid property name; "responseText" is.
ASKER
that could be the problem for : "A connection with the server could not be established "?
It could be the problem where the server appears to not return data from the Ajax call.
ASKER
<%
Dim objXMLHTTP, URL, params
URL = "http://00.000.000.00:1111"
Set objXMLHTTP = Server.CreateObject("Micro
params = "&x-up-ntfn-channel=push&x
params = params & "&x-up-upnotifyp-version=u
objXMLHTTP.Open "POST", URL & "?q=s" & params, False
objXMLHTTP.setRequestHeade
objXMLHTTP.setRequestHeade
objXMLHTTP.Send params
Response.Write objXMLHTTP.responseText
%>
i am sure i got you wrong...
???
Open in new window