Print Page | Close Window

Updating a Web Service

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1201
Printed Date: 18-Apr-2024 at 8:48am


Topic: Updating a Web Service
Posted By: *Calsy
Subject: Updating a Web Service
Date Posted: 05-Apr-2009 at 11:07pm
Hi All, Just reading the Developers Guide, and it says the following:

"It is not possible to update the business model through the published web service in this release of DevForce. We will add the ability to insert, update and delete business objects (and their graphs) in future version of DevForce. Of course you can write your own update methods today. This is not nearly as easy or convenient as it will be when DevForce can generate update methods for you. Hang in there."

Is there an ETA on this functionality at all?

Thanks



Replies:
Posted By: kimj
Date Posted: 06-Apr-2009 at 8:32am
There is no plan to implement this functionality.  You can implement this (albeit with modest difficulty) using a custom IAdapterProvider.  I can send you a sample of this if you're interested.


Posted By: *Calsy
Date Posted: 06-Apr-2009 at 2:36pm
Hi Kim, I will give you my scenario and you can let me know if this is the best way to do it.

I need the application to connect to a web based sql server hosted by us. This will be so we can send information straight to the customers database. Therefore the application can be connected to databases (multiple databases) over the following scenarios:
1. a) Connected Locally to their database (over rdbkey connection string)
b) Connected to our web based server

2. a) Connected over IIS to their database
b) connected to our web based server

I dont want the user to see the connection string (and therefore be able to connect to it) so we cant supply it as a straight sql database connection. And we cant go over IIS because the user could already be using the IIS connection for their own database (if we could have multiple IIS connection we would be home). This is why we went down the path of web services which is great if we just want to read information but we do require to do some writing to the database.

Is there anyway we can encrypt the database connection string the in the loose Ibconfig? If not have you got any other ideas?

Thanks in advance






Posted By: kimj
Date Posted: 06-Apr-2009 at 6:30pm
Matthew, I'm really not clear on what some of these terms mean or what you need.
 
"connected over IIS to their database" - Is this a DevForce application connected to a BOS running under IIS? 
 
"our web based server" - Is this a web service?
 
"if we could have multiple IIS connections ..." - ??
 
Although I don't understand the use case, here are a few things to look at which may help:
  • a custom DataSourceKeyResolver, which would allow you to hide connection strings from the user, and possibly encrypt the connection string (although you would be responsible for decrypting it)
  • use of the PersistenceServiceOption flag when creating the PersistenceManager to control whether it will use the BOS or not
  • directly calling the web service from your application w/o DevForce involvement
 
 
 
 


Posted By: *Calsy
Date Posted: 06-Apr-2009 at 9:00pm
Im quite sure the Custom DatasourcekeyResolver should do exactly what we want to do. Have you got any samples of using one at all. I have created a class that implements idatasourcekeyresolver but it never seems to jump into my GetKey function.

Thanks


Posted By: *Calsy
Date Posted: 06-Apr-2009 at 9:38pm
No need to worry. I worked it about by configuring the Ibconfig instance in memory

Dim x As IdeaBlade.Util.IdeaBladeConfig = IdeaBlade.Util.IdeaBladeConfig.Instance
            x.RdbKeys(1).Connection = "Provider=SQLOLEDB.1;Password=Test;Persist Security Info=True;User ID=Test;Initial Catalog=IdeaBladeTutorial;Data Source=."

Works a treat.



Print Page | Close Window