473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Is there away

Is there away to take a webservice connection with me to another project
like the code , I want to use the same web service connection .

If I do like the code I get error

Project 1

Public oWebb As New AdminNetWebService.Service

Dim oViewOrder As New Project2

With oViewOrder

.oWebb = oWebb (error here)

End With

---------------------------------------------------------

Project 2

Public WriteOnly Property oWebb() As AdminNetWebService.Service

Set(ByVal Value As AdminNetWebService.Service)

_oWebb = Value

End Set

End Property

//Kenneth
Nov 20 '05 #1
12 931
I dont' believe so, when you create a web service reference it uses CodeGen
to generate simple methods for communicating with the service via soap.

I don't have the greatest experience with web services, but I have the same
situation with a project at home. And I had to just do new services.

-CJ

"Kenneth" <ke*****@sagdalen.a.se> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
Is there away to take a webservice connection with me to another project
like the code , I want to use the same web service connection .

If I do like the code I get error

Project 1

Public oWebb As New AdminNetWebService.Service

Dim oViewOrder As New Project2

With oViewOrder

.oWebb = oWebb (error here)

End With

---------------------------------------------------------

Project 2

Public WriteOnly Property oWebb() As AdminNetWebService.Service

Set(ByVal Value As AdminNetWebService.Service)

_oWebb = Value

End Set

End Property

//Kenneth

Nov 20 '05 #2
Cor
Hi Kenneth,

Sorry, I do not see the problem.

The purpose from a webservice is that you from diverent situations easily
can made a new connection.

Just set a webrefrence and you are almost ready.

In my idea is copying the code more work.

Cor
Nov 20 '05 #3
my problem is that the my progarms whole backend is a webservice and the web
service is talking to the database
I have a project who deals with all printing funcktions.

I have a webservice connection in my base program and I don't want to make a
new one in my printing project because it only make a new database
connection and a new user session on the web server.

so I want to take the webservice object with me over to the other project, I
can to that with a database connection object so I hope I can do it with
this too.

//Kenneth

"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Kenneth,

Sorry, I do not see the problem.

The purpose from a webservice is that you from diverent situations easily
can made a new connection.

Just set a webrefrence and you are almost ready.

In my idea is copying the code more work.

Cor

Nov 20 '05 #4
Ahh

see remoting.
"Kenneth" <ke*****@sagdalen.a.se> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
my problem is that the my progarms whole backend is a webservice and the web service is talking to the database
I have a project who deals with all printing funcktions.

I have a webservice connection in my base program and I don't want to make a new one in my printing project because it only make a new database
connection and a new user session on the web server.

so I want to take the webservice object with me over to the other project, I can to that with a database connection object so I hope I can do it with
this too.

//Kenneth

"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Kenneth,

Sorry, I do not see the problem.

The purpose from a webservice is that you from diverent situations easily can made a new connection.

Just set a webrefrence and you are almost ready.

In my idea is copying the code more work.

Cor


Nov 20 '05 #5
Wait..

a web service connection...

Um... I may be wrong again, but aren't web services stateless as well? I
think you need to clarify what your trying to do... To transfer a connection
object is one thing, I understand that... however, transfering a connection
object, across programs, that doesn't necessarily retain state info is
another...

Second, the web service should be dealing with the number of connections to
the SQL server... not the project itself.

-CJ
"Kenneth" <ke*****@sagdalen.a.se> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
my problem is that the my progarms whole backend is a webservice and the web service is talking to the database
I have a project who deals with all printing funcktions.

I have a webservice connection in my base program and I don't want to make a new one in my printing project because it only make a new database
connection and a new user session on the web server.

so I want to take the webservice object with me over to the other project, I can to that with a database connection object so I hope I can do it with
this too.

//Kenneth

"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Kenneth,

Sorry, I do not see the problem.

The purpose from a webservice is that you from diverent situations easily can made a new connection.

Just set a webrefrence and you are almost ready.

In my idea is copying the code more work.

Cor


Nov 20 '05 #6
From what I heard I have my own Session for about 20 minutes on the
webservice and it die after 20 idle time minutes.
So my webservice have my database connection object, in my main prog there
is no one.
And I can keep the webservice alive by asking the webservice something every
10 minutes.

this works fine for me

Before I used webserver I had a project where I took the connection object
with me in to other projects and now I want to do the same with the
webservice
It's OK for me to make a web service reference but I want to use the same
session I already have in the IIS

IM I on deep water or what?

//Kenneth

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10*************@corp.supernews.com...
Wait..

a web service connection...

Um... I may be wrong again, but aren't web services stateless as well? I
think you need to clarify what your trying to do... To transfer a connection object is one thing, I understand that... however, transfering a connection object, across programs, that doesn't necessarily retain state info is
another...

Second, the web service should be dealing with the number of connections to the SQL server... not the project itself.

-CJ
"Kenneth" <ke*****@sagdalen.a.se> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
my problem is that the my progarms whole backend is a webservice and the web
service is talking to the database
I have a project who deals with all printing funcktions.

I have a webservice connection in my base program and I don't want to make a
new one in my printing project because it only make a new database
connection and a new user session on the web server.

so I want to take the webservice object with me over to the other
project, I
can to that with a database connection object so I hope I can do it with
this too.

//Kenneth

"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Kenneth,

Sorry, I do not see the problem.

The purpose from a webservice is that you from diverent situations

easily can made a new connection.

Just set a webrefrence and you are almost ready.

In my idea is copying the code more work.

Cor



Nov 20 '05 #7
I think my trouble comes from the idea of keeping the webservice alive.
Which would imply a stateful connectoin, and in all my understanding of the
web this doesn't exist.

yes, a session object can be kept alive inside IIS for a specified period of
time and dissolve with certain amount of inactivity...

However, this is NOT a consisitant connection (there is no "stream" of data
between the two...). A web service in all my understanding transmits a SOAP
envelope that conforms to the WDSL contract when it was created. The
response object then writes back another SOAP envelope that is received by
the program for processing. at this point, the connection between the web
server and the client is dead. Now, by using cookies and IP tracking and
all sorts of other methods you can maintain the concept of a persistant
session state, but its not.

Now, IE can uses cookies across windows to maintain state, however I don't
know how its done (could be built in, could not, again, I don't have a clear
answer on it.)

So the best way to do so would be to use remoting to transfer the object to
your other program. I can't guaruntee it will work, but it would be the way
I would approach it.

-CJ

"Kenneth" <ke*****@sagdalen.a.se> wrote in message
news:uh**************@tk2msftngp13.phx.gbl...
From what I heard I have my own Session for about 20 minutes on the
webservice and it die after 20 idle time minutes.
So my webservice have my database connection object, in my main prog there
is no one.
And I can keep the webservice alive by asking the webservice something every 10 minutes.

this works fine for me

Before I used webserver I had a project where I took the connection object
with me in to other projects and now I want to do the same with the
webservice
It's OK for me to make a web service reference but I want to use the same
session I already have in the IIS

IM I on deep water or what?

//Kenneth

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10*************@corp.supernews.com...
Wait..

a web service connection...

Um... I may be wrong again, but aren't web services stateless as well? I think you need to clarify what your trying to do... To transfer a

connection
object is one thing, I understand that... however, transfering a

connection
object, across programs, that doesn't necessarily retain state info is
another...

Second, the web service should be dealing with the number of connections

to
the SQL server... not the project itself.

-CJ
"Kenneth" <ke*****@sagdalen.a.se> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
my problem is that the my progarms whole backend is a webservice and the
web
service is talking to the database
I have a project who deals with all printing funcktions.

I have a webservice connection in my base program and I don't want to

make
a
new one in my printing project because it only make a new database
connection and a new user session on the web server.

so I want to take the webservice object with me over to the other

project,
I
can to that with a database connection object so I hope I can do it

with this too.

//Kenneth

"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> Hi Kenneth,
>
> Sorry, I do not see the problem.
>
> The purpose from a webservice is that you from diverent situations

easily
> can made a new connection.
>
> Just set a webrefrence and you are almost ready.
>
> In my idea is copying the code more work.
>
> Cor
>
>



Nov 20 '05 #8
Cor
Hi CJ,

I agree with almost all, except with the last alinea.

When you think to a webservice or any webapplication than in my opinion you
have always to think that the Server is in Europe and the Client in the US
or visa versa or any other place on the world.

I think that it would not work with remoting (although Internet becomes
faster and faster so maybe I am wrong in that).

:-)

I keep it with my first answer, and when Kenneth has procedures in his
program that uses the webservice I do not see why he cannot just copy that.

Cor

I think my trouble comes from the idea of keeping the webservice alive.
Which would imply a stateful connectoin, and in all my understanding of the web this doesn't exist.

yes, a session object can be kept alive inside IIS for a specified period of time and dissolve with certain amount of inactivity...

However, this is NOT a consisitant connection (there is no "stream" of data between the two...). A web service in all my understanding transmits a SOAP envelope that conforms to the WDSL contract when it was created. The
response object then writes back another SOAP envelope that is received by
the program for processing. at this point, the connection between the web
server and the client is dead. Now, by using cookies and IP tracking and
all sorts of other methods you can maintain the concept of a persistant
session state, but its not.

Now, IE can uses cookies across windows to maintain state, however I don't
know how its done (could be built in, could not, again, I don't have a clear answer on it.)

So the best way to do so would be to use remoting to transfer the object to your other program. I can't guaruntee it will work, but it would be the way I would approach it.

-CJ

Nov 20 '05 #9
Cor,

I understand your statement with the two server locations... My
understanding was that the two programs he is developing are on the same
machine... Including in deployment... So overall... 3 programs (1 WS, 2 .NET
Executable Assemblies).

But maybe I'm getting it wrong. Kenneth are you trying to transfer an
object between prgrams on the same machine or different locations... I
thought it was the same location with a web service somewhere else.

-CJ
"Cor" <no*@non.com> wrote in message
news:OE**************@TK2MSFTNGP10.phx.gbl...
Hi CJ,

I agree with almost all, except with the last alinea.

When you think to a webservice or any webapplication than in my opinion you have always to think that the Server is in Europe and the Client in the US
or visa versa or any other place on the world.

I think that it would not work with remoting (although Internet becomes
faster and faster so maybe I am wrong in that).

:-)

I keep it with my first answer, and when Kenneth has procedures in his
program that uses the webservice I do not see why he cannot just copy that.
Cor

I think my trouble comes from the idea of keeping the webservice alive.
Which would imply a stateful connectoin, and in all my understanding of the
web this doesn't exist.

yes, a session object can be kept alive inside IIS for a specified period of
time and dissolve with certain amount of inactivity...

However, this is NOT a consisitant connection (there is no "stream" of

data
between the two...). A web service in all my understanding transmits a

SOAP
envelope that conforms to the WDSL contract when it was created. The
response object then writes back another SOAP envelope that is received

by the program for processing. at this point, the connection between the web server and the client is dead. Now, by using cookies and IP tracking and all sorts of other methods you can maintain the concept of a persistant
session state, but its not.

Now, IE can uses cookies across windows to maintain state, however I don't know how its done (could be built in, could not, again, I don't have a

clear
answer on it.)

So the best way to do so would be to use remoting to transfer the object

to
your other program. I can't guaruntee it will work, but it would be the

way
I would approach it.

-CJ


Nov 20 '05 #10
I try to share the webservice connection between one exe file and one dll in
my client program

the webS connection is in the exe file and I want to use that in my dll
file.

If I make a new webS connection in my dll for every print job it will be
very many sessions in the IIS and I want no avoid that.

In my exe file I have the webS public so I can use it in all classes.

//Kenneth

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10*************@corp.supernews.com...
Cor,

I understand your statement with the two server locations... My
understanding was that the two programs he is developing are on the same
machine... Including in deployment... So overall... 3 programs (1 WS, 2 ..NET Executable Assemblies).

But maybe I'm getting it wrong. Kenneth are you trying to transfer an
object between prgrams on the same machine or different locations... I
thought it was the same location with a web service somewhere else.

-CJ
"Cor" <no*@non.com> wrote in message
news:OE**************@TK2MSFTNGP10.phx.gbl...
Hi CJ,

I agree with almost all, except with the last alinea.

When you think to a webservice or any webapplication than in my opinion you
have always to think that the Server is in Europe and the Client in the US
or visa versa or any other place on the world.

I think that it would not work with remoting (although Internet becomes
faster and faster so maybe I am wrong in that).

:-)

I keep it with my first answer, and when Kenneth has procedures in his
program that uses the webservice I do not see why he cannot just copy

that.

Cor

I think my trouble comes from the idea of keeping the webservice alive. Which would imply a stateful connectoin, and in all my understanding of
the
web this doesn't exist.

yes, a session object can be kept alive inside IIS for a specified period
of
time and dissolve with certain amount of inactivity...

However, this is NOT a consisitant connection (there is no "stream" of

data
between the two...). A web service in all my understanding transmits

a SOAP
envelope that conforms to the WDSL contract when it was created. The
response object then writes back another SOAP envelope that is
received by the program for processing. at this point, the connection between the web server and the client is dead. Now, by using cookies and IP tracking and all sorts of other methods you can maintain the concept of a
persistant session state, but its not.

Now, IE can uses cookies across windows to maintain state, however I

don't know how its done (could be built in, could not, again, I don't have a

clear
answer on it.)

So the best way to do so would be to use remoting to transfer the

object to
your other program. I can't guaruntee it will work, but it would be
the way
I would approach it.

-CJ



Nov 20 '05 #11
Cor
Hi Kenneth,

What is a connection with your webservice.

There can be a session with your client on the IIS but not a connection.

CJ did write that already very carefully to you.

So I do not see the problem, as far as I know stays the client the client
and the IIS has a session with that what ever he sends or retrieves.

Cor
I try to share the webservice connection between one exe file and one dll in my client program

the webS connection is in the exe file and I want to use that in my dll
file.

If I make a new webS connection in my dll for every print job it will be
very many sessions in the IIS and I want no avoid that.

In my exe file I have the webS public so I can use it in all classes.

Nov 20 '05 #12
thanks for all reply, I think I have to make my prog another way

//Kenneth
"Cor" <no*@non.com> wrote in message
news:u2**************@tk2msftngp13.phx.gbl...
Hi Kenneth,

What is a connection with your webservice.

There can be a session with your client on the IIS but not a connection.

CJ did write that already very carefully to you.

So I do not see the problem, as far as I know stays the client the client
and the IIS has a session with that what ever he sends or retrieves.

Cor
I try to share the webservice connection between one exe file and one
dll in
my client program

the webS connection is in the exe file and I want to use that in my dll
file.

If I make a new webS connection in my dll for every print job it will be
very many sessions in the IIS and I want no avoid that.

In my exe file I have the webS public so I can use it in all classes.


Nov 20 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John | last post by:
This does a little beyond PHP, but I'm looking for a script to use on a php website that will grab my current away message from either AIM, IRC, ICQ, Jabber, Yahoo, or MSN; as I use trillian pro...
0
by: mkent | last post by:
I'm trying to use signal.alarm to stop a run-away os.system command. Can anyone exlain the following behavior? Given following the trivial program: import os import signal def...
15
by: Trevor Lango | last post by:
I want to be able to cast away the constness of a private member variable in a member function of a class. I have the private data member declared as follows: const double x; I have an...
4
by: J. Campbell | last post by:
From reading this forum, it is my understanding that C++ doesn't require the compiler to keep code that does not manifest itself in any way to the user. For example, in the following: { for(int...
7
by: Simon Harvey | last post by:
Hi everyone, I'm having a frustrating problem and I don't know how to fix it without totally redoing a very complicated couple of pages on my site. I really hope some kind soul can help me :-) ...
5
by: Patrick Vanden Driessche | last post by:
Hi All, I'm currently writing an in-house Form validation framework (WinForms) which is based on 'Component'-inheriting object. So basically, I have a small hierarchy. FormValidator +--...
8
by: Markus Henschel | last post by:
Hello, this is a test case of something I just can't explain myself: ...
2
by: PythonistL | last post by:
I have MySql server version: 5.0.22-community-nt. When I try to import data with this command mysql --default-character-set=utf8 mimi < c:\django\mujserver\mimi.sql I will get the error ...
2
by: Laurent Deniau | last post by:
I am looking for the "cleanest" way to cast away the constness of a pointee in C89, something like const_cast<T*>() in C++. Actually, I am using: #define CONST_CAST(typename,value) \ (((union {...
0
by: robboll | last post by:
I am trying to set up a VBA routine that counts the number of days HERE vs AWAY. The sample events start (e.g., a_s) and end (e.g., a_e) at random dates within the period: July 1 thru Aug 6 ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.