Posting ASP null character to XML Socket Server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shawn

    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>t est
    </MESSAGE><USERID >+19024894124 </USERID>"
  • Jeff Dillon

    #2
    Re: Posting ASP null character to XML Socket Server

    Try ....</USERID>" + ""

    "Shawn" <shawn@rampaget echnology.com> wrote in message
    news:9842568f.0 410200717.66253 aed@posting.goo gle.com...[color=blue]
    > 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>t est
    > </MESSAGE><USERID >+19024894124 </USERID>"[/color]


    Comment

    • Shawn

      #3
      Re: Posting ASP null character to XML Socket Server

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

      "Jeff Dillon" <jeff@removeeme rgencyreporting .com> wrote in message news:<#9VF64rtE HA.3448@TK2MSFT NGP09.phx.gbl>. ..[color=blue]
      > Try ....</USERID>" + ""
      >
      > "Shawn" <shawn@rampaget echnology.com> wrote in message
      > news:9842568f.0 410200717.66253 aed@posting.goo gle.com...[color=green]
      > > 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>t est
      > > </MESSAGE><USERID >+19024894124 </USERID>"[/color][/color]

      Comment

      • Mark Schupp

        #4
        Re: Posting ASP null character to XML Socket Server

        You can append nulls like this:

        strTmp = string(2,0) 'some win32 routines expect 2 nulls
        newdoc="<USER>
        +19024894124</USER><MESSAGE>t est</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>t est</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



        "Shawn" <shawn@rampaget echnology.com> wrote in message
        news:9842568f.0 410210357.473fc 051@posting.goo gle.com...[color=blue]
        > Nope didn't work.. spaces, chr() or even %20's don't work.. any other
        > ideas?
        >
        > "Jeff Dillon" <jeff@removeeme rgencyreporting .com> wrote in message
        > news:<#9VF64rtE HA.3448@TK2MSFT NGP09.phx.gbl>. ..[color=green]
        >> Try ....</USERID>" + ""
        >>
        >> "Shawn" <shawn@rampaget echnology.com> wrote in message
        >> news:9842568f.0 410200717.66253 aed@posting.goo gle.com...[color=darkred]
        >> > 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>t est
        >> > </MESSAGE><USERID >+19024894124 </USERID>"[/color][/color][/color]


        Comment

        Working...