• 0

[ASP/XML] Sending a Page via WCTP


Question

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.

&lt;%
xmlString = "&lt;?xml version=""1.0""?&gt;" &amp; vbcrlf
'xmlString = xmlString &amp; "&lt;!DOCTYPE wctp-Operation SYSTEM ""http://wctp.usamobility.net/DTD/wctp-dtd-v1r1.dtd"">bcrlf
xmlString = xmlString &amp; "&lt;wctp-Operation wctpVersion=""wctp-dtd-v1r1""&gt;" &amp; vbcrlf
xmlString = xmlString &amp; "&lt;wctp-SubmitRequest&gt;" &amp; vbcrlf
xmlString = xmlString &amp; "&lt;wctp-SubmitHeader&gt;" &amp; vbcrlf
xmlString = xmlString &amp; "&lt;wctp-Originator senderID=""a pager id""/&gt;" &amp; vbcrlf
xmlString = xmlString &amp; "&lt;wctp-Recipient recipientID=""some number""/&gt;" &amp; vbcrlf
xmlString = xmlString &amp; "&lt;/wctp-SubmitHeader&gt;" &amp; vbcrlf
xmlString = xmlString &amp; "&lt;wctp-Payload&gt;" &amp; vbcrlf
xmlString = xmlString &amp; "&lt;wctp-Alphanumeric&gt;This is a test WCTP Message&lt;/wctp-Alphanumeric&gt;" &amp; vbcrlf
xmlString = xmlString &amp; "&lt;/wctp-Payload&gt;" &amp; vbcrlf
xmlString = xmlString &amp; "&lt;/wctp-SubmitRequest&gt;" &amp; vbcrlf
xmlString = xmlString &amp; "&lt;/wctp-Operation&gt;" &amp; 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 "&lt;b&gt;XML sent!&lt;/b&gt;&lt;br&gt;"
Response.Write "SendDoc.XML &amp; "&lt;br&gt;""
response.write "&lt;b&gt;Target URL:&lt;/b&gt; " &amp; sURL &amp; "&lt;br&gt;"


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
%&gt;

Edited by Sophism
Link to comment
https://www.neowin.net/forum/topic/812930-aspxml-sending-a-page-via-wctp/
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Thanks. i got this to work.

Basically this is the code I used.

Dim Pagernumbers, Pagernumbs, pager
Pagernumbers = Request.form("pagenumbsgernumbs = split(Pagernumbers,",")
	For Each pager in pagernumbs
		sURL = "http://wctp.metrocall.com/wctp"
		Set http = Server.CreateObject("msxml2.ServerXMLHTTP")
		http.Open "POST", sURL
			xmldata = "&lt;?xml version=""1.0""?&gt;"
			xmldata = xmldata &amp; "&lt;!DOCTYPE wctp-Operation SYSTEM ""http://wctp.usamobility.net/DTD/wctp-dtd-v1r1.dtd"">ata = xmldata &amp; "&lt;wctp-Operation wctpVersion=""wctp-dtd-v1r1""&gt;"
			xmldata = xmldata &amp; "&lt;wctp-SubmitRequest&gt;"
			xmldata = xmldata &amp; "&lt;wctp-SubmitHeader&gt;"
			xmldata = xmldata &amp; "&lt;wctp-Originator senderID=""Intranet""/&gt;"
			xmldata = xmldata &amp; "&lt;wctp-Recipient recipientID=""" &amp; pager &amp; """/&gt;"
			xmldata = xmldata &amp; "&lt;/wctp-SubmitHeader&gt;"
			xmldata = xmldata &amp; "&lt;wctp-Payload&gt;"
			xmldata = xmldata &amp; "&lt;wctp-Alphanumeric&gt;" &amp; Request.Form("MSSGmp; "&lt;/wctp-Alphanumeric&gt;"
			xmldata = xmldata &amp; "&lt;/wctp-Payload&gt;"
			xmldata = xmldata &amp; "&lt;/wctp-SubmitRequest&gt;"
			xmldata = xmldata &amp; "&lt;/wctp-Operation&gt;"
		http.Send xmldata
	Next

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I think it's bloody great, old chap!
    • Not the deal that 2nd hand purchasers tend to look for - no.  It's cheaper than the sum of it's parts new - yes.  But people looking for 2nd hand, pre-built computers are rarely looking for what you are selling. Don't misunderstand; as an informed enthusiast I like that computer, and as an informed enthusiast I am often asked "My son wants a gaming PC and here's my budget" - in which case, as an informed enthusiast I would totally point them in this sort of direction.  But I am not the mass market, hence you may well have to wait longer for a sale. If you're looking for speed - then breaking it into parts is likely to pay off better on that front, as there will be more people who suit that market and their likelihood of buying 2nd hand is more fruitful.  But - chore!
    • What is the purpose of this article? You didn't even mention that CPU is powering it, so we don't know what GPU/iGPU it has. We don't know if the memory is on chip, on the motherboard, is expandable or replaceable. And that's only the internals. Display type, resolution, brightest you didn't even mention the DPI. Without one or more if these capabilities no one who reads these strung together words will know if they should or shouldn't buy it. The only HINT is from the sticker on the photo of the laptop. Q: what do you get for wasting people's time? Their must be some value or you wouldn't have wasted your time either.
    • That is some storage. I have an old F4-210 and it works well for what it is, just a shame Terramaster will not update the software for it.
  • Recent Achievements

    • Week One Done
      Taylan earned a badge
      Week One Done
    • One Month Later
      Taylan earned a badge
      One Month Later
    • Week One Done
      Yianis earned a badge
      Week One Done
    • Veteran
      Travesty went up a rank
      Veteran
    • One Month Later
      somar86 earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      506
    2. 2
      ATLien_0
      260
    3. 3
      +Edouard
      186
    4. 4
      +FloatingFatMan
      176
    5. 5
      snowy owl
      132
  • Tell a friend

    Love Neowin? Tell a friend!