CodeSmith Community
Your Code. Your Way. Faster!

WebServiceClient

Latest post 12-11-2006 4:27 PM by Lampous. 0 replies.
  • 12-11-2006 4:27 PM

    • Lampous
    • Not Ranked
    • Joined on 12-08-2006
    • Posts 7
    • Points 275

    WebServiceClient

    I am new to NetTiers and so far love it.

    I am trying to learn it in the following scenario:  My Windows App -> Service Layer -> WebServiceClient -> WebServices -> SqlClient -> Data.

    I want to insert two different types of entities within a database transaction.  I noticed that I possibly can do this three ways:
     

    1.  EntityService newService = new EntityService();
         newService.Insert( TransactionManager, Entity );

    2.  DataRepository.EntityProvider.Insert( Entity );

    or

    3.  WsEntityProvider newWsProvider = new WsEntityProvider();
        newWsProvider.Insert( TransactionManager mgr, Entity );

     
    When I first saw that the WsEntityProvider had overrides on some methods that supported a transaction manager I was pretty excited at that, but when I try to create a transaction using the web service provider configured in my app.config I get exceptions.  When I call mgr = ConnectionScope.ValidateOrCreateTransaction() I get "Not set to instance of object" message in the exception, and when I call mgr = ConnectionScope.CreateTransaction(), I get "Transactions are not supported with WebServices"

     
    I figured that it would be difficult to make atomic operations on a database via webservices but I thought that since the overrides had transaction managers in them that it was a feature of NetTiers. 

    Am I doing something wrong?  Are transactions really supported using the WebServiceClient?, or is this planned feature? or should I just ignore those overrides?  I am a bit confused as even the .asmx file is looking for transaction managers.

    Can anyone clear this up for me?


    Thanks!
    -Mike

     

    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems