Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 20, 2012 05:14 AM by oak_silver
Nov 18, 2012 09:55 AM|LINK
I have two projects. One is a simple login application and other is a hosted WCF Service that connects to a database.
The WCF service has two methods: "Administrator_Login" and "User_Login".
Whenever each of the methods are called, they execute some code respective to the method: Administrator.Login.Execute and User.Login.Execute (I am organising my code into namespaces, Administrator.Login and User.Login being the class names and Execute being
the name of the method).
Both operations return a "LoginOut" object that exist within the User.Login class or Administrator.Login class.
My issue is this: Although each operation is organised into namespaces on the WCF service, when I add a service reference from the client application to the service and look at the names of types of objects returned, I am seein "LoginOut and "LoginOut1".
Is there a way to reference the returned the objects in the client application returned by the WCF service by the namespace?
I am currently having to do this:
Dim loginOut As Service.LoginOut = Service.Administrator_Login().Execute()
Dim loginOut As Service.LoginOut1 = Service.User_Login().Execute()
But I would like to be able to do:
Dim loginOut As Service.Administrator.LoginOut = Service.Administrator_Login().Execute()
Dim loginOut As Service.User.LoginOut = Service.User_Login().Execute()
Nov 20, 2012 05:14 AM|LINK
When you add the service reference, it change one of the method name to avoid confusion since they are at the same namespace. If refine LoginOut1 to LoginOut, they will both call the Service.User_Login().Execute().