473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Posting ASP null character to XML Socket Server

Hey there i'm trying to post a section of XML code to an XMLSocket
Server via ASP I can successfully connect to the server, but it won't
disconnect because the string needs a null character inserted at the
end in order for the socket server to terminate the connection. how
would i do this? i've tried chr(32), chr(0).. anyother ideas?

newdoc="<USER> +19024894124</USER><MESSAGE>test
</MESSAGE><USERID>+19024894124 </USERID>"
Jul 21 '05 #1
3 1704
Try ....</USERID>" + ""

"Shawn" <sh***@rampagetechnology.com> wrote in message
news:98**************************@posting.google.c om...
Hey there i'm trying to post a section of XML code to an XMLSocket
Server via ASP I can successfully connect to the server, but it won't
disconnect because the string needs a null character inserted at the
end in order for the socket server to terminate the connection. how
would i do this? i've tried chr(32), chr(0).. anyother ideas?

newdoc="<USER> +19024894124</USER><MESSAGE>test
</MESSAGE><USERID>+19024894124 </USERID>"

Jul 21 '05 #2
Nope didn't work.. spaces, chr() or even %20's don't work.. any other ideas?

"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message news:<#9**************@TK2MSFTNGP09.phx.gbl>...
Try ....</USERID>" + ""

"Shawn" <sh***@rampagetechnology.com> wrote in message
news:98**************************@posting.google.c om...
Hey there i'm trying to post a section of XML code to an XMLSocket
Server via ASP I can successfully connect to the server, but it won't
disconnect because the string needs a null character inserted at the
end in order for the socket server to terminate the connection. how
would i do this? i've tried chr(32), chr(0).. anyother ideas?

newdoc="<USER> +19024894124</USER><MESSAGE>test
</MESSAGE><USERID>+19024894124 </USERID>"

Jul 21 '05 #3
You can append nulls like this:

strTmp = string(2,0) 'some win32 routines expect 2 nulls
newdoc="<USER>
+19024894124</USER><MESSAGE>test</MESSAGE><USERID>+19024894124 </USERID>" &
strTmp

Here's a vbscript test page that demos this

<%
Option Explicit

dim strtmp, i

strtmp = string(2,0)
Response.Write strtmp & "<br>"
Response.write len(strtmp) & "<br>"
for i = 1 to len(strtmp)
response.write asc(mid(strtmp,i,1)) & "-"
next
Response.Write "<br><br>"

strTmp = "<USER>
+19024894124</USER><MESSAGE>test</MESSAGE><USERID>+19024894124 </USERID>" &
strtmp
Response.Write strtmp & "<br>"
Response.write len(strtmp) & "<br>"
for i = 1 to len(strtmp)
response.write asc(mid(strtmp,i,1)) & "-"
next

%>

However, if the object you are calling was intended to be called from ASP
then I would expect it to append a null to the input string itself. Don't be
surprised it the above doesn't help.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Shawn" <sh***@rampagetechnology.com> wrote in message
news:98**************************@posting.google.c om...
Nope didn't work.. spaces, chr() or even %20's don't work.. any other
ideas?

"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:<#9**************@TK2MSFTNGP09.phx.gbl>...
Try ....</USERID>" + ""

"Shawn" <sh***@rampagetechnology.com> wrote in message
news:98**************************@posting.google.c om...
> Hey there i'm trying to post a section of XML code to an XMLSocket
> Server via ASP I can successfully connect to the server, but it won't
> disconnect because the string needs a null character inserted at the
> end in order for the socket server to terminate the connection. how
> would i do this? i've tried chr(32), chr(0).. anyother ideas?
>
> newdoc="<USER> +19024894124</USER><MESSAGE>test
> </MESSAGE><USERID>+19024894124 </USERID>"

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: BlueDragon | last post by:
I don't know enough math to demonstrate that any numerical operation with a null should yield a null; although I would guess that it's true. I just don't buy it, however, when dealing with strings...
4
by: zbcong | last post by:
Hello: I write a multithread c# socket server,it is a winform application,there is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting for a...
1
by: Danny | last post by:
I am posting xml to a server and get the above error returned. The client code is listed below, it works until say a "<" character is put in XmlData. On the server page I try to pick up the XmlData...
0
by: Stefan Schwarzer | last post by:
Hi all! For my FTP library module ftputil , some users have asked for a way to avoid server timeouts (FTP status code 421). But I haven't found out yet how I can do this in all cases. I try...
7
by: AmitKu | last post by:
I am trying to do a URL post using HttpWebRequest, but it fails because I am hosting on Network Solutions, and their servers are all medium trust. Apparently HttpWebRequest doesn't work on medium...
12
by: Mohitz | last post by:
How do you write a function in C++ which returns a class object in some cases and in others, returns something like a NULL pointer so that i can know in the callee function that the object doesnt...
1
by: Sparky74 | last post by:
Hi Everybody. I have been searching for many hours for an answer to this problem. I hope somebody can help me. I have a C# .NET client application that connects to a TCP/IP C++ server application...
8
by: A. Anderson | last post by:
Howdy everyone, I'm experiencing a problem with a program that I'm developing. Take a look at this stack report from GDB - #0 0xb7d782a3 in strlen () from /lib/tls/i686/cmov/libc.so.6 #1 ...
1
by: starter08 | last post by:
Hi, I have a C++ routine(client-side) which uploads an xml file to a web server by making a socket connection and sending all the post request through that socket. On the server side I have a cgi...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.