Ask a Question related to ASP.NET Web Services, Design and Development.
-
alberto.decaro@gmail.com #1
needing help - constructor overloading
Hello everybody,
I'm developing a XML web service in VB, and I'd like to overload the
constructor to customize the service:
[...]
Private _tblParameters As datatable
'the default constructor
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
'the overloaded constructor
Public Sub New(parTable as datatable)
Me.New()
_tblParameters = parTable
End Sub
[...]
The project compiles correctly and I can add the web reference in the
test application. But when I create an object from the service class,
the overloaded constructor is not accepted.
Any clue? Thanks a lot.
alberto.decaro@gmail.com Guest
-
Needing Flash 7
I am installing a program which requires Flash 7.0. I can't seem to find it on the website here. Can anyone help me? -
needing help with shockwave 10
:confused; I have been trying to get this program working for about 3 days now. I have tried the link from the game site, and the standalone... -
newbie needing help
Guys, I've been learning for two weeks now, so bear with me :-) I'd like to know how to echo a formatted table using the results from three... -
Calling SUPER::constructor in the constructor
Is it possible to call the constructor that a function inherits from its parent? I tried calling SUPER:: and SUPER-> in a constructor and got... -
Needing Help with a webpage
Hi Some action should be done by user (such as button click) then only we know whether use has read it or not Ravikanth 2000 -
Brock Allen #2
Re: needing help - constructor overloading
Constructors are an aspect of object oriented programming environments. Web
services are not about objects. The fact that there's an object to host the
web service message handling should not taint your view of them -- it's just
an implementation detail. Web Services are about XML messages passed to an
endpoint that is going to do something with the message and perhaps hand
you a message back. Once you adjust your thinking to that model, then you'll
be in a better design position.
-Brock
DevelopMentor
[url]http://staff.develop.com/ballen[/url]
> Hello everybody,
> I'm developing a XML web service in VB, and I'd like to overload the
> constructor to customize the service:
> [...]
> Private _tblParameters As datatable
> 'the default constructor
> Public Sub New()
> MyBase.New()
> InitializeComponent()
> End Sub
> 'the overloaded constructor
> Public Sub New(parTable as datatable)
> Me.New()
> _tblParameters = parTable
> End Sub
> [...]
>
> The project compiles correctly and I can add the web reference in the
> test application. But when I create an object from the service class,
> the overloaded constructor is not accepted.
> Any clue? Thanks a lot.
Brock Allen Guest
-
alberto.decaro@gmail.com #3
Re: needing help - constructor overloading
Thanks for your reply.
So the only way to set the service is to pass parameter to any
webmethod the service expose? :-(
Something like this:
[...]
Private Sub InitService(parTable as datatable)
'initialize private members
End Sub
<webMethod()> Public Function AnyMethod(parDs as dataset) as String
'initializing the service
InitService(parDs.tables("parameters"))
'webmethod implementation
'...
End Function
[...]
Still OO thinking!!
alberto.decaro@gmail.com Guest
-
Brock Allen #4
Re: needing help - constructor overloading
So the idea of service oriented is that each invocation of an operation is
independant from another -- so no objects :) So if each invocation is independant,
then you'll have to pass whatever data for the operation to do its job.
Now, if you do want OO semantics, you should consider .NET Remoting. This
is a way to get distributed OO semantics.
Web Services is about distributed systems that interop with any technology
platform. .NET remoting is about distributed .NET to .NET communication.
-Brock
DevelopMentor
[url]http://staff.develop.com/ballen[/url]
> Thanks for your reply.
> So the only way to set the service is to pass parameter to any
> webmethod the service expose? :-(
> Something like this:
> [...]
> Private Sub InitService(parTable as datatable)
> 'initialize private members
> End Sub
> <webMethod()> Public Function AnyMethod(parDs as dataset) as String
> 'initializing the service
> InitService(parDs.tables("parameters"))
> 'webmethod implementation
> '...
> End Function
> [...]
> Still OO thinking!!
>
Brock Allen Guest
-
Dave Anderson #5
Re: needing help - constructor overloading
Yes maybe in a better design position to think about Web Services. But this
is a major setback in terms of application and systems design. Web Services
take us back to functional programming days and for me that is pre 1981!
Do we really have to start from scratch with a textual definition of a
remote procedure call?
Dave
Smalltalker
"Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message
news:889664632542633502736704@msnews.microsoft.com ...> Constructors are an aspect of object oriented programming environments.
> Web services are not about objects. The fact that there's an object to
> host the web service message handling should not taint your view of
> them -- it's just an implementation detail. Web Services are about XML
> messages passed to an endpoint that is going to do something with the
> message and perhaps hand you a message back. Once you adjust your thinking
> to that model, then you'll be in a better design position.
>
> -Brock
> DevelopMentor
> [url]http://staff.develop.com/ballen[/url]
>
>
>>>> Hello everybody,
>> I'm developing a XML web service in VB, and I'd like to overload the
>> constructor to customize the service:
>> [...]
>> Private _tblParameters As datatable
>> 'the default constructor
>> Public Sub New()
>> MyBase.New()
>> InitializeComponent()
>> End Sub
>> 'the overloaded constructor
>> Public Sub New(parTable as datatable)
>> Me.New()
>> _tblParameters = parTable
>> End Sub
>> [...]
>>
>> The project compiles correctly and I can add the web reference in the
>> test application. But when I create an object from the service class,
>> the overloaded constructor is not accepted.
>> Any clue? Thanks a lot.
>
>
Dave Anderson Guest
-
Brock Allen #6
Re: needing help - constructor overloading
> Do we really have to start from scratch with a textual definition of a
:)> remote procedure call?
Well, think of it this way -- Web Services are about interop. This interop
is done with XML, SOAP, XSD, WSDL and a bunch of other specs... but these
I listed are the basic ones. So, those specs give us the ability to express
the coupling point for the applications. Thus, that's the contract. So what
we can do in web services is limited by what those specs allow us to do.
There is not always a one-to-one mapping from those specs to an OO programming
environment, like .NET.
Now, you don't have to work at the WSDL level (though some people think you
do to get it 100% correct, and there's *some* virtue to that), but as long
as you understand the underlying fundamentals, then you'll know what you
can and can't do in your toolkit (VS.NET WebServices). The toolkit hides
many of these realities and lets you do bad things. That's good that it hides
the details since that XML stuff can be hard and time consuming, but it's
bad that it lets you do bad/incorrect things.
So go ahead and use the toolkit, but don't forget that at the end of the
day what you're expressing with your toolkit must be legal and interoperable
with other programming environments (Java, Perl, whatever running on Mac,
Linux, whatever). The big no-no is thinking in terms of objects and passing
back .NET-specific types that have no meaning in other programming environments
(these two points are related).
-Brock
DevelopMentor
[url]http://staff.develop.com/ballen[/url]
Brock Allen Guest



Reply With Quote

