that is apparently all the information I need to send to a specific address. In this case its wctp.usamobility.net/wctp
here is what I have now now I have the second XML string commented out because with it uncommented the page doesnt even load. If I comment it out I receive a message that says
so I am thinking that this may be the problem. However I dont know exactly what is causing the issue. I am pretty new to ASP.
<%
xmlString = "<?xml version=""1.0""?>" & vbcrlf
'xmlString = xmlString & "<!DOCTYPE wctp-Operation SYSTEM ""http://wctp.usamobility.net/DTD/wctp-dtd-v1r1.dtd"">" & vbcrlf
xmlString = xmlString & "<wctp-Operation wctpVersion=""wctp-dtd-v1r1"">" & vbcrlf
xmlString = xmlString & "<wctp-SubmitRequest>" & vbcrlf
xmlString = xmlString & "<wctp-SubmitHeader>" & vbcrlf
xmlString = xmlString & "<wctp-Originator senderID=""a pager id""/>" & vbcrlf
xmlString = xmlString & "<wctp-Recipient recipientID=""some number""/>" & vbcrlf
xmlString = xmlString & "</wctp-SubmitHeader>" & vbcrlf
xmlString = xmlString & "<wctp-Payload>" & vbcrlf
xmlString = xmlString & "<wctp-Alphanumeric>This is a test WCTP Message</wctp-Alphanumeric>" & vbcrlf
xmlString = xmlString & "</wctp-Payload>" & vbcrlf
xmlString = xmlString & "</wctp-SubmitRequest>" & vbcrlf
xmlString = xmlString & "</wctp-Operation>" & vbcrlf
'objHttpRequest.setoption(2,13056)
Set SendDoc = server.createobject("Microsoft.XMLDOM")
SendDoc.ValidateOnParse=True
SendDoc.LoadXML(xmlString)
sURL = "http://wctp.usamobility.net/wctp"
Set NewDoc = xmlSend (sURL, SendDoc) 'xmlString)
Response.Write "<b>XML sent!</b><br>"
Response.Write "SendDoc.XML & "<br>""
response.write "<b>Target URL:</b> " & sURL & "<br>"
private function xmlsend(url, docSubmit)
Set poster = Server.CreateObject("MSXML2.XMLHTTP")
poster.open "POST", url, false
poster.setRequestHeader "CONTENT_TYPE", "text/xml"
poster.send docSubmit
Set NewDoc = server.createobject("Microsoft.XMLDOM")
newDoc.ValidateOnParse= True
newDoc.LoadXML(poster.responseTEXT)
Set XMLSend = NewDoc
Set poster = Nothing
end function
%>
Question
Sophism
So working with some ASP (vbscript to be exact) and I am trying to setup some sort of form with the ability to send people pages.
I have the form written and working, but I would like to. If this is even possible, send the page using WCTP.
<?xml version="1.0"?>
<!DOCTYPE wctp-Operation SYSTEM "http://wctp.usamobility.net/DTD/wctp-dtd-v1r1.dtd">
<wctp-Operation wctpVersion="wctp-dtd-v1r1">
<wctp-SubmitRequest>
<wctp-SubmitHeader>
<wctp-Originator senderID="user@domain"/>
<wctp-Recipient recipientID="subscriberPIN"/>
</wctp-SubmitHeader>
<wctp-Payload>
<wctp-Alphanumeric>Message text goes here.
</wctp-Alphanumeric>
</wctp-Payload>
</wctp-SubmitRequest>
</wctp-Operation>
that is apparently all the information I need to send to a specific address. In this case its wctp.usamobility.net/wctp
here is what I have now now I have the second XML string commented out because with it uncommented the page doesnt even load. If I comment it out I receive a message that says
XML sent!
TrueTarget URL: http://wctp.usamobility.net/wctp
so I am thinking that this may be the problem. However I dont know exactly what is causing the issue. I am pretty new to ASP.
<% xmlString = "<?xml version=""1.0""?>" & vbcrlf 'xmlString = xmlString & "<!DOCTYPE wctp-Operation SYSTEM ""http://wctp.usamobility.net/DTD/wctp-dtd-v1r1.dtd"">" & vbcrlf xmlString = xmlString & "<wctp-Operation wctpVersion=""wctp-dtd-v1r1"">" & vbcrlf xmlString = xmlString & "<wctp-SubmitRequest>" & vbcrlf xmlString = xmlString & "<wctp-SubmitHeader>" & vbcrlf xmlString = xmlString & "<wctp-Originator senderID=""a pager id""/>" & vbcrlf xmlString = xmlString & "<wctp-Recipient recipientID=""some number""/>" & vbcrlf xmlString = xmlString & "</wctp-SubmitHeader>" & vbcrlf xmlString = xmlString & "<wctp-Payload>" & vbcrlf xmlString = xmlString & "<wctp-Alphanumeric>This is a test WCTP Message</wctp-Alphanumeric>" & vbcrlf xmlString = xmlString & "</wctp-Payload>" & vbcrlf xmlString = xmlString & "</wctp-SubmitRequest>" & vbcrlf xmlString = xmlString & "</wctp-Operation>" & vbcrlf 'objHttpRequest.setoption(2,13056) Set SendDoc = server.createobject("Microsoft.XMLDOM") SendDoc.ValidateOnParse=True SendDoc.LoadXML(xmlString) sURL = "http://wctp.usamobility.net/wctp" Set NewDoc = xmlSend (sURL, SendDoc) 'xmlString) Response.Write "<b>XML sent!</b><br>" Response.Write "SendDoc.XML & "<br>"" response.write "<b>Target URL:</b> " & sURL & "<br>" private function xmlsend(url, docSubmit) Set poster = Server.CreateObject("MSXML2.XMLHTTP") poster.open "POST", url, false poster.setRequestHeader "CONTENT_TYPE", "text/xml" poster.send docSubmit Set NewDoc = server.createobject("Microsoft.XMLDOM") newDoc.ValidateOnParse= True newDoc.LoadXML(poster.responseTEXT) Set XMLSend = NewDoc Set poster = Nothing end function %>Edited by SophismLink to comment
Share on other sites
2 answers to this question
Recommended Posts