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.

access to NameSpace attrib from SoapExtension

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
alex bean - 19 May 2005 00:42 GMT
How do i get them value of the web service namespace from inside a
SoapExtension?

For example my web service is defiend as:

[ WebService(Namespace="http://www.test.com/ws/")]
public class MyTest: WebService
{
    [WebMethod]
    public string HelloWorld(y)
    {

. . .

From inside a SoapExtension I want to assign a string var the value of
"http://www.test.com/ws/"
alex bean - 19 May 2005 01:22 GMT
I found a way but it seems a little convoluted.  Is there a more readable way
of doing it?

public override object GetInitializer(System.Type serviceType)
{

object[] wsa = serviceType.GetCustomAttributes(typeof(WebServiceAttribute),
true);           
string x = ((WebServiceAttribute)wsa[0]).Namespace;

}

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.