On Tue, Feb 15, 2011 at 10:25 AM, Johnny <[email protected]> wrote:
> Hi NG
>
> I am about to create a webservice to access a database from the web.
> I have made serveral simple webservices - but this will have more
> than
> 1000 types (WebMethods) therefore I would like to be able to
> categorize the types into serveral clases or into serveral services.
>
>
> In Visual Studio 2010 the way to make WebService has changed a
> bit.First I create a empty website. Add a WebService (Service1).
> Setting the Service1 as the startup page - stats the application and
> I
> can see the service with the HeloWorld method.
--------------------
Why would you see a start up page?  You mean the WSDL?

This is a WCF and not an older ASMX page so your methods and not
presented like they use to be.  Try to make a testing web site and all
the WCF reference to that new site.  Do you now see the methods?


>
>
> I have tryed to add more webservices to the application, but they
> don't start so i never see the methods they holds. So is there a way
> to start all the webservices in this WebApplication? by that i can
> have one service for each category.
------------------

How many categories do you have 2,3,4 or more.  I wouldn't go to an
extreme in category / WCF generation.


>
> Other solution could be to be able to have properies in the
> (Service1)
> that the enduser could call by using connection like:
>
>
> {host].Service1 srv = new {host}.Service1()
> srv.Category1.Method1
> srv.Category1.Method2
> srv.Category2.Method1, ect ect
>
>
> Would that be possible
--------------

I have never tried to do that.  What will the category give you that a
direct call to the method won't?

srv.getCustomerList()
srv.getCustomer(custID);

You could do it:
srv.getCategory1CustomerList()
srv.getCategory2Customer(custID);

Just a heads up.  always have a string component for errMsg in all
data object arrays that you present allowing the back end to
communicate with the front end if something didn't work properly.

In a catch:

 List<Orgs> ORG = new List<Orgs>();
                    Orgs org = new Orgs();
                    org.errorMsg = ex.Message;
                    ORG.Add(org);
                    return ORG;

HTH
-- 
Stephen Russell

Sr. Production Systems Programmer
CIMSgts

901.246-0159 cell

Reply via email to