Server receiving HTTP POST

Discussion in 'ASP .Net' started by Christina, May 16, 2006.

  1. Christina

    Christina Guest

    Hello,

    I need to built a server which receives XML, parses it, and sends some
    other XML.

    The client (any XYZ) should be able to post his XML file into my server
    and my server should send an XML file back to the Client.

    Any help appreciated..

    TIA,
    Chris
    Christina, May 16, 2006
    #1
    1. Advertising

  2. Christina

    Winista Guest

    This should give you something to build on.

    http://www.netomatix.com/Development/XmlWebRequest.aspx


    "Christina" <> wrote in message
    news:...
    > Hello,
    >
    > I need to built a server which receives XML, parses it, and sends some
    > other XML.
    >
    > The client (any XYZ) should be able to post his XML file into my server
    > and my server should send an XML file back to the Client.
    >
    > Any help appreciated..
    >
    > TIA,
    > Chris
    >
    Winista, May 16, 2006
    #2
    1. Advertising

  3. Christina

    Joerg Jooss Guest

    Thus wrote Christina,

    > Hello,
    >
    > I need to built a server which receives XML, parses it, and sends some
    > other XML.
    >
    > The client (any XYZ) should be able to post his XML file into my
    > server and my server should send an XML file back to the Client.
    >
    > Any help appreciated..


    Unless you're in the business of writing application servers, simply implement
    a HttpHandler and use IIS as server. Here's a nice sample:
    http://www.hanselman.com/blog/ABoilerplateHttpHandler.aspx

    (Unless all of this XML is actually SOAP, in which case you should consider
    ASMX Web Services.)

    Cheers,
    --
    Joerg Jooss
    Joerg Jooss, May 16, 2006
    #3
  4. Christina

    Christina Guest

    Thanks guys!!

    I made a demo httphandler.

    Now i am trying Application Mapping in IIS :
    Right click the folder in IIS -> Properties -> Directory ->
    Configuration ->Add
    Here, when i try to add
    Executable : aspnet_isapi.dll
    Extention : .sample

    The problem is : The 'OK' button is diabled. Any idea, how can i
    configure the application mapping.

    I guess the next step should be :
    http://<ComputerName>/Handler/Default.sample.
    should return the response "Hello" from PocessReques().

    Thanks!!
    Christina, May 17, 2006
    #4
  5. Christina

    tdavisjr Guest

    Make sure the radio button for verbs is set to either All Verbs or in
    your Limit box you can place POST;HEAD. Hopefully, the ok box should be
    enabled.
    tdavisjr, May 17, 2006
    #5
  6. Christina

    Christina Guest

    Thanks Joerg,

    The link : http://www.netomatix.com/Development/XmlWebRequest.aspx was
    helpful.
    I have implemented it and I have a question :

    1) This sample given in yhr link, converts he xml file into bytes and
    then sends to the listening URL. Is it possible to send the XML file
    directly (not the XML file converted into bytes)?

    TIA,
    Cristina




    Winista wrote:
    > This should give you something to build on.
    >
    > http://www.netomatix.com/Development/XmlWebRequest.aspx
    >
    >
    > "Christina" <> wrote in message
    > news:...
    > > Hello,
    > >
    > > I need to built a server which receives XML, parses it, and sends some
    > > other XML.
    > >
    > > The client (any XYZ) should be able to post his XML file into my server
    > > and my server should send an XML file back to the Client.
    > >
    > > Any help appreciated..
    > >
    > > TIA,
    > > Chris
    > >
    Christina, Jun 9, 2006
    #6
  7. Christina

    Joerg Jooss Guest

    Thus wrote Christina,

    > Thanks Joerg,
    >
    > The link : http://www.netomatix.com/Development/XmlWebRequest.aspx was
    > helpful.
    > I have implemented it and I have a question :
    > 1) This sample given in yhr link, converts he xml file into bytes and
    > then sends to the listening URL. Is it possible to send the XML file
    > directly (not the XML file converted into bytes)?


    No. Networks transmit bytes, not objects.

    Cheers,
    --
    Joerg Jooss
    Joerg Jooss, Jun 11, 2006
    #7
  8. Christina

    Christina Guest

    Thanks Joerg,
    It worked for me..

    Joerg Jooss wrote:
    > Thus wrote Christina,
    >
    > > Thanks Joerg,
    > >
    > > The link : http://www.netomatix.com/Development/XmlWebRequest.aspx was
    > > helpful.
    > > I have implemented it and I have a question :
    > > 1) This sample given in yhr link, converts he xml file into bytes and
    > > then sends to the listening URL. Is it possible to send the XML file
    > > directly (not the XML file converted into bytes)?

    >
    > No. Networks transmit bytes, not objects.
    >
    > Cheers,
    > --
    > Joerg Jooss
    >
    Christina, Jun 15, 2006
    #8
  9. Christina

    Christina Guest

    I more question..

    When I try to post the xml file again and again, it suddenly give the
    error 'The operation has timed out' , for the line:
    Dim requestStream As System.IO.Stream = oWebRequest.GetRequestStream()

    Is there anything which I am missing here

    Thanks,
    Chris

    Joerg Jooss wrote:
    > Thus wrote Christina,
    >
    > > Thanks Joerg,
    > >
    > > The link : http://www.netomatix.com/Development/XmlWebRequest.aspx was
    > > helpful.
    > > I have implemented it and I have a question :
    > > 1) This sample given in yhr link, converts he xml file into bytes and
    > > then sends to the listening URL. Is it possible to send the XML file
    > > directly (not the XML file converted into bytes)?

    >
    > No. Networks transmit bytes, not objects.
    >
    > Cheers,
    > --
    > Joerg Jooss
    >
    Christina, Jun 15, 2006
    #9
  10. Christina

    Christina Guest

    Thanks guys !!

    Figured it out..
    I had to clear all objects..

    Christina wrote:
    > I more question..
    >
    > When I try to post the xml file again and again, it suddenly give the
    > error 'The operation has timed out' , for the line:
    > Dim requestStream As System.IO.Stream = oWebRequest.GetRequestStream()
    >
    > Is there anything which I am missing here
    >
    > Thanks,
    > Chris
    >
    > Joerg Jooss wrote:
    > > Thus wrote Christina,
    > >
    > > > Thanks Joerg,
    > > >
    > > > The link : http://www.netomatix.com/Development/XmlWebRequest.aspx was
    > > > helpful.
    > > > I have implemented it and I have a question :
    > > > 1) This sample given in yhr link, converts he xml file into bytes and
    > > > then sends to the listening URL. Is it possible to send the XML file
    > > > directly (not the XML file converted into bytes)?

    > >
    > > No. Networks transmit bytes, not objects.
    > >
    > > Cheers,
    > > --
    > > Joerg Jooss
    > >
    Christina, Jun 16, 2006
    #10
  11. Christina

    Joerg Jooss Guest

    Thus wrote Christina,

    > Thanks guys !!
    >
    > Figured it out..
    > I had to clear all objects..


    Both request and response streams as well as HttpWebResponse are IDisposables,
    so make sure you close them -- using blocks are really your best friend here
    :)

    Cheers,
    --
    Joerg Jooss
    Joerg Jooss, Jun 16, 2006
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ColinK
    Replies:
    0
    Views:
    529
    ColinK
    Jul 15, 2007
  2. TreatmentPlant
    Replies:
    4
    Views:
    411
    Default User
    Oct 17, 2007
  3. =?Utf-8?B?d2hpZ2dpbnNAbm9lbWFpbC5ub2VtYWls?=

    receiving post information

    =?Utf-8?B?d2hpZ2dpbnNAbm9lbWFpbC5ub2VtYWls?=, Nov 8, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    305
    =?Utf-8?B?d2hpZ2dpbnNAbm9lbWFpbC5ub2VtYWls?=
    Nov 13, 2007
  4. subeen
    Replies:
    2
    Views:
    590
    subeen
    Oct 4, 2009
  5. Frank Reiff

    receiving an XML POST via CGI

    Frank Reiff, Dec 7, 2007, in forum: Ruby
    Replies:
    1
    Views:
    115
    Frank Reiff
    Dec 7, 2007
Loading...

Share This Page