on 04-05-2006 11:07 PM
Hi all,
I'm developing a web service using DI API (DI Server won't for what i'm trying to do). One of the main things the program must do is copy a business object from one company to another.
The client just send the company names and the business object code and the web service makes the copy. I think the best way to achieve this is using saving the BO to a XML file and GetBusinessObjectFromXML to load the BO. The problem is that the web service doesn't have the permissions to write a file.
So does anyone know that permission?, or does anyone know another way to copy business objects without writing files?, or is there a workaround here? i really don't want to copy BO field by field, that would be my very last option.
Thanks very much in advance,
Ian Defilippi
Hi,
Ibai´s idea is very interesting, and you should try it (see my comment below). I think, there is also another approach to your problem:
If you can´t change the security settings, try programming a method that returns a FileStream in .NET and call the webservice address method in the string parameter of the GetBusinessObjectFromXML. I have done this loading XML documents and you may try it in your web service as well.
Ibai idea of using serialization is very interesting if you have permissions to write in the remote computer. If I follow Ibai idea you could send through the web service the serialized object and then write it in the remote computer. I don't know if this is Ibai idea but it may work this way also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ian,
Can you tell me what programming language are you using?
-M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ian,
The problem with writting files has to do with permissions, as you know. I will try to find a solution this way.
But there is another choice, without saving the objects to a file. You could use serialization. Here you have a good example:
http://www.vbdotnetheaven.com/Code/May2004/object_serialization.asp
Moreless what it does is take an object, and convert it into lineal byte sequences (Sender). Then you can easyly send this sequence, and the only thing the receiver has to do is convert the byte sequence back into a known object.
This works through webservices. Hope helps,
Ibai Peñ
Hi Ibai,
Thanks for your answer. I have some doubts about doing this with serialization. First, when I deserialize the object (hopefully) I can use the Add() method, but just for the particular company, when what I need is to copy that object to the others companies.
Maybe you see things in a different way. Could you be a little more specific about this choice?
Thanks again Ibai,
Ian Defilippi
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.