I have an n-tier system as follows:
Business
Data Access
Web Services
Basically the Business layer has all the functionality and I want to
expose that functionality thru web services. As an example, I have a
class called AddressTypes, and a method on it called GetAddressType.
I want to expose that method, GetAddressType thru a web service.
This is what I have:
<WebMethod()_
Public Function GetAddressType( ByVal AddressTypeID As String) As
Auxiliar.Addres sType
Dim AddressType As New Auxiliar.Addres sType
Try
Return AddressType.Get AddressType(Add ressTypeID)
Catch ex As Exception
Return Nothing
End Try
End Function
In the client side though, when I call the web service method, I try to
assign its result to an instance of Auxiliar.Addres sType, but I got an
error, which says basically that the Web service AddressType returned
cannot be converted to Auxiliar.Addres sType.
What seems to be the problem here?
Thanks 4 1372
On Aug 22, 1:26 pm, "Mike" <m...@hitnext.c omwrote:
I have an n-tier system as follows:
Business
Data Access
Web Services
Basically the Business layer has all the functionality and I want to
expose that functionality thru web services. As an example, I have a
class called AddressTypes, and a method on it called GetAddressType.
I want to expose that method, GetAddressType thru a web service.
This is what I have:
<WebMethod()_
Public Function GetAddressType( ByVal AddressTypeID As String) As
Auxiliar.Addres sType
Dim AddressType As New Auxiliar.Addres sType
Try
Return AddressType.Get AddressType(Add ressTypeID)
Catch ex As Exception
Return Nothing
End Try
End Function
In the client side though, when I call the web service method, I try to
assign its result to an instance of Auxiliar.Addres sType, but I got an
error, which says basically that the Web service AddressType returned
cannot be converted to Auxiliar.Addres sType.
What seems to be the problem here?
Thanks
post the code you are using on the client to invoke the web service.
You must make the returning type public availlable in your webclass
in the client you assign a varibale pointer to the public exposed type
now it should work .
regards
Michel
"kelphis" <am******@hotma il.comschreef in bericht
news:11******** *************@i 38g2000prf.goog legroups.com...
On Aug 22, 1:26 pm, "Mike" <m...@hitnext.c omwrote:
>I have an n-tier system as follows:
Business
Data Access
Web Services
Basically the Business layer has all the functionality and I want to expose that functionality thru web services. As an example, I have a class called AddressTypes, and a method on it called GetAddressType.
I want to expose that method, GetAddressType thru a web service.
This is what I have:
<WebMethod() _
Public Function GetAddressType( ByVal AddressTypeID As String) As Auxiliar.Addre ssType
Dim AddressType As New Auxiliar.Addres sType
Try
Return AddressType.Get AddressType(Add ressTypeID)
Catch ex As Exception
Return Nothing
End Try
End Function
In the client side though, when I call the web service method, I try to assign its result to an instance of Auxiliar.Addres sType, but I got an error, which says basically that the Web service AddressType returned cannot be converted to Auxiliar.Addres sType.
What seems to be the problem here?
Thanks
post the code you are using on the client to invoke the web service.
'This is the web service
Dim WSCommon As New WSCommon.Common
'This is a class en Business
Dim AddressType As New Auxiliar.Addres sType
'Here I try to assign whatever the webservice returns to the instance of
my class
AddressType = WSCommon.GetAdd ressType("BILL" )
I get a design time error saying that
Value of type Webservice.Addr essType cannot be converted to
Business.GetTyp e
-----Original Message-----
From: kelphis [mailto:am****** @hotmail.com]
Posted At: Wednesday, August 22, 2007 2:35 PM
Posted To: microsoft.publi c.dotnet.langua ges.vb
Conversation: Web service and business logic
Subject: Re: Web service and business logic
On Aug 22, 1:26 pm, "Mike" <m...@hitnext.c omwrote:
I have an n-tier system as follows:
Business
Data Access
Web Services
Basically the Business layer has all the functionality and I want to
expose that functionality thru web services. As an example, I have a
class called AddressTypes, and a method on it called GetAddressType.
I want to expose that method, GetAddressType thru a web service.
This is what I have:
<WebMethod()_
Public Function GetAddressType( ByVal AddressTypeID As String) As
Auxiliar.Addres sType
Dim AddressType As New Auxiliar.Addres sType
Try
Return AddressType.Get AddressType(Add ressTypeID)
Catch ex As Exception
Return Nothing
End Try
End Function
In the client side though, when I call the web service method, I try
to
assign its result to an instance of Auxiliar.Addres sType, but I got an
error, which says basically that the Web service AddressType returned
cannot be converted to Auxiliar.Addres sType.
What seems to be the problem here?
Thanks
post the code you are using on the client to invoke the web service.
HI,
What do you mean by public available, can you provide an example?
Thanks
-----Original Message-----
From: Michel Posseth [MCP] [mailto:MS**@pos seth.com]
Posted At: Wednesday, August 22, 2007 2:59 PM
Posted To: microsoft.publi c.dotnet.langua ges.vb
Conversation: Web service and business logic
Subject: Re: Web service and business logic
You must make the returning type public availlable in your webclass
in the client you assign a varibale pointer to the public exposed type
now it should work .
regards
Michel
"kelphis" <am******@hotma il.comschreef in bericht
news:11******** *************@i 38g2000prf.goog legroups.com...
On Aug 22, 1:26 pm, "Mike" <m...@hitnext.c omwrote:
>I have an n-tier system as follows:
Business
Data Access
Web Services
Basically the Business layer has all the functionality and I want to expose that functionality thru web services. As an example, I have a class called AddressTypes, and a method on it called GetAddressType.
I want to expose that method, GetAddressType thru a web service.
This is what I have:
<WebMethod() _
Public Function GetAddressType( ByVal AddressTypeID As String) As Auxiliar.Addre ssType
Dim AddressType As New Auxiliar.Addres sType
Try
Return AddressType.Get AddressType(Add ressTypeID)
Catch ex As Exception
Return Nothing
End Try
End Function
In the client side though, when I call the web service method, I try
to
>assign its result to an instance of Auxiliar.Addres sType, but I got
an
>error, which says basically that the Web service AddressType returned cannot be converted to Auxiliar.Addres sType.
What seems to be the problem here?
Thanks
post the code you are using on the client to invoke the web service. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ray5531 |
last post by:
We have a solution consists of an O/R mapper project,Business Logice layer
and a Web application.I need to add a windows service to this solution and
add the business logic layer as a reference to my windows service.We are in
development phase and it's very probable that the business layer is
changed.They promise to keep the interface intact.I mean they promise to
keep the name of the method I need always "Upload" ,but they might change...
|
by: Mythran |
last post by:
I have a custom Principal (implements System.Security.Principal.IPrincipal
interface) that I need to access from a WebService. My web application has
the Thread.CurrentPrincipal set to this new Principal object, as well as
HttpContext.Current.User. But when I access either Thread.CurrentPrincipal
or HttpContext.Current.User from the Web Service, they are not the same as
those set in the Web Application (and I can see why). My question...
|
by: Noel |
last post by:
Hello,
I'm currently developing a web service that retrieves data from an employee
table. I would like to send and retrieve a custom employee class to/from the
webservice. I have currently coded the custom employee class and have built
it as a separate library (employee.dll). This employee.dll is being
referenced by both the web service and the windows application.
I face the following problem when I send this class to the webservice.
|
by: Eric Guthmann |
last post by:
Hello all
We have an SOA application that includes an ASP.NET webservice and WinForms
client. My question is regarding the use of Add Web Reference in Visual
Studio. The tool is nice because it easilly creates and updates the
client-side proxies that we need to communicate with the webservice. The
problem is that our webservice methods accept and return business objects
and when generating the proxies, VS creates scoped versions of...
|
by: Nate |
last post by:
We are attempting to make a request to a web service (we will refer to it as
XXXServices) hosted on a Web Logic server from a C# SOAP client. The server
responds with a 401 Unauthorized error (that appears in plain text), and
causes the client to crash. This C# code has been deployed both as an
ASP.NET application and a WinForms app, each of which produced the same
result. Further, moving the clients from a Windows XP machine to Windows...
| |
by: deko |
last post by:
When to use a privileged user thread rather than a windows service?
That's the question raised in a previous post . It was suggested that if the service needs to interact
with a WinForms app (which is the UI used to adjust the actions taken by,
and the schedule of the service), then a privileged user thread should be
used in the UI - no service required.
But...
"A windows service enables the creation of long-running executable
|
by: deko |
last post by:
I'm trying to finalize a windows service design any would appreciate any
comments - I'm new to windows services.
Essentially my UI app relies on a service to schedule IO tasks. The service
does nothing but keep track of elapsed time.
The reason I need a service is because the IO tasks are login agnostic. It
doesn't matter if anyone, or no one, is logged in. The IO tasks are defined
in the UI.
|
by: Bill Davidson |
last post by:
All:
I have a Win32 service that takes about 30 seconds to shutdown (give or take
a few seconds). I shut the service down via the 'Services' console on
Windows Server 2003. When the service shuts down in under 30 seconds,
everything is fine. However if the service takes over 30 seconds to shut
down, I get the following error in the System Event Log:
"Timeout (30000 milliseconds) waiting for a transaction response from the
XYZ...
|
by: mbmccormick |
last post by:
I have a web service in the same project as the rest of my website. I am able to call my web service without any trouble from the Javascript on my page using the Script Manager. Now, I want to have my web service access some of my business logic, and in order to do that I need to access the current Principal. The Principal object is set for the rest of the website, but not on my web service (where it uses WindowsIdentity instead of my...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |