Changing default response tag from soap request

Discussion in 'ASP .Net Web Services' started by Jan Jacobs, Apr 26, 2005.

  1. Jan Jacobs

    Jan Jacobs Guest

    Hi there,

    I have a webservice which has a method called "DeliverReq". The soap
    envelope looks like this (simplified)

    <envelope>
    <header>
    ...
    </header>
    <body>
    <deliverReq>
    <param1/>
    <param2/>
    </deliverReq>
    </body>
    </envelope>

    This method should return a complex type called "DeliverRsp". The
    returning soap envelope looks like this (overly simplified too ;):

    <envelope>
    <header>
    ...
    </header>
    <body>
    <deliverReqResponse>
    <deliverRsp>
    <complexField1/>
    <complexField2/>
    </deliverRsp>
    </deliverReqResponse>
    </body>
    </envelope>


    However, although I'm the server, I have no control over the layout of
    the soap messages, I have to follow the client here. This client
    requires me to put the DeliverRsp directly under the Body tag, without
    the deliverReqResponse tag. How can I accomplish this?

    (the next xml is how i want the soap message to be formatted)


    <envelope>
    <header>
    ...
    </header>
    <body>
    <deliverRsp>
    <complexField1/>
    <complexField2/>
    </deliverRsp>
    </body>
    </envelope>


    Any help here would be greatly appreciated!


    Jan Jacobs
     
    Jan Jacobs, Apr 26, 2005
    #1
    1. Advertising

  2. Jan Jacobs

    erymuzuan Guest

    Yu'll have to tweak the WSDL, look at the message element, instead of
    deliverReqResponse element you change the name and the element attribute
    to deliverRsp. bear in mind that a good ws only have one body element so
    make sure deliverRsp. Then you'll have to generate the asmx.cs file
    using wsdl /server switch


    regards
    erymuzuan mustapa


    Jan Jacobs wrote:
    > Hi there,
    >
    > I have a webservice which has a method called "DeliverReq". The soap
    > envelope looks like this (simplified)
    >
    > <envelope>
    > <header>
    > ...
    > </header>
    > <body>
    > <deliverReq>
    > <param1/>
    > <param2/>
    > </deliverReq>
    > </body>
    > </envelope>
    >
    > This method should return a complex type called "DeliverRsp". The
    > returning soap envelope looks like this (overly simplified too ;):
    >
    > <envelope>
    > <header>
    > ...
    > </header>
    > <body>
    > <deliverReqResponse>
    > <deliverRsp>
    > <complexField1/>
    > <complexField2/>
    > </deliverRsp>
    > </deliverReqResponse>
    > </body>
    > </envelope>
    >
    >
    > However, although I'm the server, I have no control over the layout of
    > the soap messages, I have to follow the client here. This client
    > requires me to put the DeliverRsp directly under the Body tag, without
    > the deliverReqResponse tag. How can I accomplish this?
    >
    > (the next xml is how i want the soap message to be formatted)
    >
    >
    > <envelope>
    > <header>
    > ...
    > </header>
    > <body>
    > <deliverRsp>
    > <complexField1/>
    > <complexField2/>
    > </deliverRsp>
    > </body>
    > </envelope>
    >
    >
    > Any help here would be greatly appreciated!
    >
    >
    > Jan Jacobs
     
    erymuzuan, May 2, 2005
    #2
    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. plork

    SOAP response/request

    plork, Apr 21, 2005, in forum: Java
    Replies:
    3
    Views:
    1,084
  2. shruds
    Replies:
    1
    Views:
    957
    John C. Bollinger
    Jan 27, 2006
  3. comp.text.xml
    Replies:
    0
    Views:
    544
    comp.text.xml
    Sep 20, 2006
  4. Ivan S
    Replies:
    0
    Views:
    559
    Ivan S
    Aug 13, 2008
  5. Frederik Vanderhaegen

    Soap Extension problem (seems that soap request is not sent to server)

    Frederik Vanderhaegen, Oct 20, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    296
    Frederik Vanderhaegen
    Oct 20, 2006
Loading...

Share This Page