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 / October 2006

Tip: Looking for answers? Try searching our database.

Adding namespace to element inside soap body

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rasika WIJAYARATNE - 26 Oct 2006 00:02 GMT
.NET FW 2.0, WSE 3.0

Hi Everyone,

I am calling a Java WS and at the moment they are having trouble with
the use of the default namespace in 'getValuationRequest' (see below).
What is the fastest way to add a namespace to this element and it's
children (preferrably without modifying the proxy, but I am open to all
options)?

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
... >
 <soap:Header>
   ...
 </soap:Header>
 <soap:Body>
   <getValuationRequest xmlns="http://www.sa...">
     <ValuationTransaction ProductionData="Yes"
xmlns="http://www.lixi.org.au/schema/cal1.3/ValuationTransaction">
       <RevisionNumber LIXIVersion="1.0" UserType="Valuer" />
       ...
     </ValuationTransaction>
   </getValuationRequest>
 </soap:Body>
</soap:Envelope>
Pablo Cibraro [MVP] - 27 Oct 2006 14:55 GMT
Hi,

The simplest solution is to modify the proxy class. You have to add the
namespace to the class definition using the WebServiceBinding attribute.

[System.Web.Services.WebServiceBindingAttribute(Namespace="http://www.sa...")]
public partial class ServiceWse

I hope this can help you.

Regards,
Pablo Cibraro.

> .NET FW 2.0, WSE 3.0
>
[quoted text clipped - 21 lines]
>  </soap:Body>
> </soap:Envelope>
Rasika WIJAYARATNE - 29 Oct 2006 22:41 GMT
Ironically the Java WS which I was calling that was having trouble with
default namespaces has now been amended to accept them. However this
maybe useful in future. Thank you!

Rasika.

> Hi,
>
[quoted text clipped - 34 lines]
> >  </soap:Body>
> > </soap:Envelope>

Rate this thread:







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.