Changing default response tag from soap request

J

Jan Jacobs

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
 
E

erymuzuan

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top