Hello,
I've used wsdl.exe, to generate stub code for a WS at work. an example
of the stub code is:
=============== ===========
/// <remarks/>
[System.Web.Serv ices.WebService BindingAttribut e(
Name="NavigateP ublicationTarge tBinding",
Namespace="http ://rep.oio.dk/gentofte.dk/xml/wsdl/2005/09/12/")]
public abstract class NavigatePublica tionTarget :
System.Web.Serv ices.WebService
{
/// <remarks/>
[System.Web.Serv ices.WebMethodA ttribute()]
[System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute(
"http://rep.oio.dk/gentofte.dk/xml/wsdl/2005/09/12/GetChildNodes",
Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,
ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Bare)]
[return: System.Xml.Seri alization.XmlEl ementAttribute(
"PublicationNod eCollectionResp onse",
Namespace="http ://rep.oio.dk/gentofte.dk/xml/schemas/2005/09/12")]
public abstract PublicationNode CollectionRespo nseType
GetChildNodes([System.Xml.Seri alization.XmlEl ementAttribute(
Namespace="http ://rep.oio.dk/gentofte.dk/xml/schemas/2005/09/12",
DataType="anyUR I")] string NodeIdentifier) ;
..............
}
=============== ===========
There's alot of crap I'm not entirely sure what does. But the method
signature is abstract, and noted with a "WebMethodAttri bute" (need to
be "WebMethod" ? Why does wsdl.exe use the other?).
If I inherit from this, why does it not work? Do I need to do something
special in the inherited class? It could look like attributes does not
inherit. True?
Regards,
Svend 2 3486
Hi Svend,
I believe you question concerns attribute's usage:
1) Concerning you comment - "and noted with a "WebMethodAttri bute" (need to
be "WebMethod" ? Why does wsdl.exe use the other?).", notice that when
defining attributes on classes or class members you can simply ommit the
"Attribute" suffix of the full attribute name.
2) Concerning attributes inheritance: an attribute tag inherance depends of
the AttributeUsageA ttribute.Inheri ted property.
--
Best regards,
Abel Eduardo Pereira
<sv********@sve ndtofte.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. . Hello,
I've used wsdl.exe, to generate stub code for a WS at work. an example of the stub code is: =============== =========== /// <remarks/> [System.Web.Serv ices.WebService BindingAttribut e( Name="NavigateP ublicationTarge tBinding", Namespace="http ://rep.oio.dk/gentofte.dk/xml/wsdl/2005/09/12/")] public abstract class NavigatePublica tionTarget : System.Web.Serv ices.WebService {
/// <remarks/> [System.Web.Serv ices.WebMethodA ttribute()] [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute( "http://rep.oio.dk/gentofte.dk/xml/wsdl/2005/09/12/GetChildNodes",
Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,
ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Bare)] [return: System.Xml.Seri alization.XmlEl ementAttribute( "PublicationNod eCollectionResp onse", Namespace="http ://rep.oio.dk/gentofte.dk/xml/schemas/2005/09/12")] public abstract PublicationNode CollectionRespo nseType GetChildNodes([System.Xml.Seri alization.XmlEl ementAttribute(
Namespace="http ://rep.oio.dk/gentofte.dk/xml/schemas/2005/09/12", DataType="anyUR I")] string NodeIdentifier) ; ............. } =============== ===========
There's alot of crap I'm not entirely sure what does. But the method signature is abstract, and noted with a "WebMethodAttri bute" (need to be "WebMethod" ? Why does wsdl.exe use the other?).
If I inherit from this, why does it not work? Do I need to do something special in the inherited class? It could look like attributes does not inherit. True?
Regards, Svend
Hi Abel,
Thanks for your reply. Yes, I guess the fundamental question I'm
asking, is about inheritability of attributes. I posted in this group,
because I imagine that someone before me, have had to implement an
interface, specified by an externally delivered WSDL file, using the
stub code generated by wsdl.exe. As it looks, I can't figure out, if
the attributes that wsdl.exe puts into the stub code are ALL
inheritable or not. Apparently, since it's not working, something would
seem to indicate it's not inherited.
This is a little annoying, as I then cannot have a strong typing
between the stub generated code, and my own derived code. Instead, I
need to take the actual generated file, and modify it, and hope I do
not modify it incorrectly.
Regards,
Svend This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: phl |
last post by:
hi,
I am kind of confused aobut interfaces and abstract classes.
In short as I understand it, an interface is like a contract between
the class and the interface, so that certain funtions must be
implemented. So if you have a class which inherits base class that
inherts an interface, then your classes will have a standard. I suppose
you can also check for interface at run time say when dll is loaded and
see if it implememts whats...
|
by: Brett |
last post by:
I'm still trying to figure out concrete reasons to use one over the other.
I understand the abstract class can have implementation in its methods and
derived classes can only inherit one abstract class. The interface has
implied abstract methods/properties and derived classes can inherit multiple
interfaces. The interface properties/methods have no implementation.
Besides definitions of the two, what are some conceptual reasons to use...
|
by: Sean Kirkpatrick |
last post by:
To my eye, there doesn't seem to be a whole lot of difference between
the two of them from a functional point of view. Can someone give me a
good explanation of why one vs the other?
Sean
|
by: D Witherspoon |
last post by:
Coming up with a scenario here. For example there is the standard .NET
MailMessage class.
I am creating a project (let's call it CommonBase) that has the following 2
classes
EmailMessage_Base ( inherits System.Net.Mail.MailMessage
and provides additional methods and properties)
EmailMessage_Abstract ( inherits EmailMessage_Base and
adds some business logic including what default return addresses are and
|
by: Tony Johansson |
last post by:
Hello!!
Assume you have an Interface called ITest with these three method
declarations.
interface ITest
{
void foo1();
void foo2();
void foo3();
}
| |
by: jason |
last post by:
In the microsoft starter kit Time Tracker application, the data access
layer code consist of three cs files.
DataAccessHelper.cs
DataAcess.cs
SQLDataAccessLayer.cs
DataAcccessHelper appears to be checking that the correct data type is
used
DataAcess sets an abstract class and methods
|
by: emin.shopper |
last post by:
I had a need recently to check if my subclasses properly implemented
the desired interface and wished that I could use something like an
abstract base class in python. After reading up on metaclass magic, I
wrote the following module. It is mainly useful as a light weight tool
to help programmers catch mistakes at definition time (e.g., forgetting
to implement a method required by the given interface). This is handy
when unit tests or...
|
by: =?Utf-8?B?UmljaA==?= |
last post by:
Greetings,
I am actually a VB.Net guy, but I have worked somewhat with C++ and C#. I
just want to ask about the relationship between Abstract Classes and
Interfaces.
My first question is if C# even has Iinterfaces. I took some Java
programming classes and Interfaces are a main staple of Java. And in VB.Net
I use interfaces for setting up definitions of classes. I am guessing that
Abstract classes in C# do the same thing as...
|
by: Damodhar |
last post by:
When would you use an abstract class and when an interface?
whats the abstract class.?
please give me the sample .
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| | |