• 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

    • Hey folks, I've recently noticed my iPhone (13 Pro) getting insanely hot while playing certain games — especially ones with high graphics like COD Mobile or even during long FaceTime calls. Battery drops fast, the back heats up, and the phone starts lagging a bit too. It honestly reminds me of that GTA San Andreas mission where CJ runs through a burning building with the fire extinguisher — except I don’t have one for my phone 😂 Jokes aside, I’ve: Turned off background app refresh Reduced brightness Closed unnecessary apps Updated to the latest iOS But the issue still pops up during intense tasks. 👉 Anyone else facing this? 👉 Is this normal with newer iPhones or something I should worry about long term? 👉 Could using a MagSafe charger regularly have anything to do with it? Would love to hear your experience or if you’ve got tips to cool things down (besides playing San Andreas. on low graphics haha). Cheers! 
    • It's funny how easy he is to emulate because of such a limited verbal vocabulary.
    • No, moderators and staff can not be blocked for obvious reasons. Individuals with bad intent could block moderators from doing their jobs. We have lots of spam/ users who sign up with bad intent and we are constantly cleaning the board of these troublemakers. The ability to block us would severely hamper us from doing our job. If any member has an issue with a staff member or moderator, you may PM a Supervisor, Steven P. or me to look into the matter.  Best, Barney
    • Would you be open to allowing users to ignore/block staff/moderators here? When trying to do so now, you cannot add a mod/global mod to your ignore/block list. Curious why this is setup this way, is there any way around this?
    • If youre going to delete my comment from this thread, calling out your poor attitude, you should also remove this comment.
  • Recent Achievements

    • Conversation Starter
      Jamie Smith earned a badge
      Conversation Starter
    • First Post
      NeoToad777 earned a badge
      First Post
    • Week One Done
      JoeV earned a badge
      Week One Done
    • One Month Later
      VAT Services in UAE earned a badge
      One Month Later
    • First Post
      LsDmT earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      575
    2. 2
      ATLien_0
      253
    3. 3
      +Edouard
      162
    4. 4
      +FloatingFatMan
      152
    5. 5
      Michael Scrip
      114
  • Tell a friend

    Love Neowin? Tell a friend!