Link to home
Start Free TrialLog in
Avatar of sasha85
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


<%
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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of _Stilgar_
_Stilgar_
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85
sasha85

ASKER

like this:
<%
Dim objXMLHTTP, URL, params
URL = "http://00.000.000.00:1111"
 
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
 
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.Open "POST", URL & "?q=s" & params, False
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=US-ASCII"
objXMLHTTP.setRequestHeader "Content-Location", "http://www.domain.com"

objXMLHTTP.Send params
 
Response.Write objXMLHTTP.responseText
%>

i am sure i got you wrong...
???
URL obfuscated by modus_operandi, EE Moderator

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

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?
Avatar of sasha85

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
%>

Open in new window

Avatar of sasha85

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.
<%
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 
%>

Open in new window

Avatar of sasha85

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;charset=US-ASCII

Type=alert&Title=anything&URL= http://www.domain.com
URL obfuscated by modus_operandi, EE Moderator

Open in new window

>>i am need to http post to another server ip: 00.000.000.00 port 1111

Not with XMLHTTP, you don't :-(
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
oh, sorry - same DOMAIN, different servers - my bad.
Avatar of sasha85

ASKER

friends, any chance that you can help me here?:)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Have you seen the links I posted above?

Stilgar.
Avatar of sasha85

ASKER

stilgar, ethat the same as mt xml code...what exactly do i need to change?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

ASKER

msxml4.dll error '80072efd'

A connection with the server could not be established


why??
Avatar of sasha85

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?

URL obfuscated by modus_operandi, EE Moderator

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

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
?
Avatar of sasha85

ASKER

 xmlServerHttp.send "x-up-ntfn-channel=push&x-up-ntfn-ttl=0&x-up-subno=123456789_yuc3.vont.com&Type=alert&Title=anything&URL="& Server.URLEncode("http://abc.potam.com")"

?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

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

Open in new window

Avatar of sasha85

ASKER

msxml4.dll error '80072efd'

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

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

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)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

ASKER

why do i need "http:/"
when i remove it i get:

msxml4.dll error '80072ee6'

The URL does not use a recognized protocol

Avatar of sasha85

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.
Avatar of sasha85

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?
Avatar of sasha85

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?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

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)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

ASKER

yes but i don't know what i got to do than?
Avatar of sasha85

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...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

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"
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

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("MSXML2.ServerXMLHTTP.4.0")
  xmlServerHttp.Open "POST", sourceURL, False  

  Set xmlServerHttp = Nothing
end function



%>
Avatar of sasha85

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?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sasha85

ASKER

msxml4.dll error 'c00c023f'

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
%>

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Where is your "xmlServerHttp.send" statement?
Sorry, hielo, I'll bow out.
Avatar of sasha85

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?
<%
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
%>

Open in new window

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.
Avatar of sasha85

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.
One last comment:

getPage = xmlServerHttp.responsetext

should be:

getPage = xmlServerHttp.responseText
Avatar of sasha85

ASKER

t>T?
why?
Because that is how the property is accessed, that's why. "responsetext" is not a valid property name; "responseText" is.
Avatar of sasha85

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.