Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / May 2005

Tip: Looking for answers? Try searching our database.

Changing default response tag from soap request

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jan Jacobs - 26 Apr 2005 18:24 GMT
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 - 02 May 2005 16:34 GMT
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

> Hi there,
>
[quoted text clipped - 52 lines]
>
> Jan Jacobs

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.