Re: How to mantain the state between 2 call of the same WebService?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Manohar Kamath (mkamath_at_TAKETHISOUTkamath.com)
Date: 03/17/05


Date: Thu, 17 Mar 2005 11:19:21 -0600

As long as these custom classes have fundamental types, you should be able
to build a proxy in Java, and talk to a .NET web service. Although I haven't
worked on such architectures, I am guessing types like DataSet probably
won't be as easy.

-- 
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Alessandro Benedetti" <alessandro@mio.it> wrote in message
news:8540632466796225270821@news.tin.it...
> Hello Manohar, yours is the same solution as Brock Allen i think. I didn't
> know that it is possibile to do that with any type of object. I will try
> (and I'll read documentation about serialization because I don't know
nothing
> about it).
> My question is, if the client is a Java application for example, the app
> have to save the result in a generic object?
>
> Thank you
> Alessandro Benedetti
>
> > Allesandro,
> >
> > Why not simply do a:
> >
> > [WebMethod(EnableSession=true)]
> > public MyClass WM1()
> > {
> > //Assuming X is an object of type MyClass
> > return X;
> > }
> > The MyClass object will be serialized and sent across.
> >
> > "Alessandro Benedetti" <alessandro@mio.it> wrote in message
> > news:6697632466584359160262@news.tin.it...
> >
> >> Hi. I'm calling two methods of a .NET Webservice (A) from another
> >>
> > Webservice
> >
> >> (B).
> >>
> >> The A Webservice is made like this:
> >>
> >> [WebService(Namespace="WebServiceA")]
> >> public class WSA: System.Web.Services.WebService
> >> {
> >> private int X = 0;
> >> [WebMethod(EnableSession=true)]
> >> public void WM1()
> >> {
> >> X = 1;
> >> }
> >> [WebMethod(EnableSession=true)]
> >> public string WM2()
> >> {
> >> return(X);
> >> }
> >> }
> >> In B WebService I make only one instantion of the A Webservice's
> >> proxy
> >>
> > class
> >
> >> and then call first method (WM1) and then the second one (WM2) but
> >> WM2
> >>
> > always
> >
> >> return 0.
> >> So, I've used Session to save my variable, but I would like to know
> >> if
> > there
> >
> >> is another way that doesn't use session that I don't like.
> >>
> >> Thank you.
> >> Alessandro
>
>
>


Relevant Pages

  • Re: How to mantain the state between 2 call of the same WebService?
    ... to build a proxy in Java, and talk to a .NET web service. ... >> //Assuming X is an object of type MyClass ... >>> The A Webservice is made like this: ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: invoke a webservice with nillable value types
    ... invoke a webservice with nillable value types ... public ParteiVOPage find(ParteiSearchCriteria parteiSearch, int offset, int ... the soap ist correct, but it won´t interpreted by the proxy. ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: Setting web service timeout in vb.net
    ... Microsoft MSDN Online Support Lead ... class of the webservice proxy (you generate through "Add WebReference" ... webservice's method call Timeout through the ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Passing User Define class to web service.
    ... First, you should try to update your web reference, then go to the generated ... that when the new web service proxy is ... >> likely problem is that myClass is multiply defined in separate namespaces ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How does the client of a webservice figure out a complex type
    ... attribute with a hint for the client side proxy this is a DataSet. ... >if the wsdl does not contain any reference, ... >> As for how webservice client figure out a complex type, ...
    (microsoft.public.dotnet.framework.webservices)