PDA

View Full Version : Export/Import with WebServices?



Anders Öhrt
21-Jun-2005, 02:42 AM
> I´m new to webApp and webservices.
> I have made my first custom project in webapp ( VDF 11.0 ), that works
> fine.
>
> To export and import information to webapp from the VDF application I have
> been told to use
> WebServices.
>
> Is it the right way to go?
> Any ideas/ hints to make the WS?
>
> I have 5 tables to export to the web and one to export to the VDF
> application

Do you need to have separate data directories for the two applications? If
you can merge them, you don't need export/import at all, since the webapp
would write where the windows app can read. That's how our systems work, and
it's a huge improvement over having two systems that export/import.

If you really _need_ to keep them seperate, WS is the way to go. You need a
new webapp to go with the windows application as a WS server, and then you
create a client WS that you use in the old webapp. WS is documented in the
help with some good examples, start there.

// Anders

Joacim Eriksson
21-Jun-2005, 03:25 AM
Hi

I´m new to webApp and webservices.
I have made my first custom project in webapp ( VDF 11.0 ), that works fine.

To export and import information to webapp from the VDF application I have
been told to use
WebServices.

Is it the right way to go?
Any ideas/ hints to make the WS?

I have 5 tables to export to the web and one to export to the VDF
application

regards

joacim

Magnus Bergh
21-Jun-2005, 04:02 AM
In article <Ldk#4midFHA.3408@dacmail.dataaccess.com>, je@prosmart.se
says...

> To export and import information to webapp from the VDF application I have
> been told to use
> WebServices.
>
> Is it the right way to go?
> Any ideas/ hints to make the WS?
>
> I have 5 tables to export to the web and one to export to the VDF
> application

I am in the same situation. I need to move data from a VDF app to a
stand-alone webapplication.

I think the best way is to use web services even if it is possible to do
it with other methods.

I think the best way is to create a XML document with the record and
pass the document to the webservice. Another option when using VDF 11 is
to use structures/arrays to pass the data.

It would be nice to have a wizard that could create the code for
creating the webservice client and webservice automatically by reading a
data definition and create the code to write a XML document to include
all fields and also to parse it.

It might be less work to write a wizard to generate the code than it is
to write the code manually.

Magnus Bergh
21-Jun-2005, 04:10 AM
In article <c3pxITjdFHA.3408@dacmail.dataaccess.com>,
Anders.Ohrt@capslock.se says...

> Do you need to have separate data directories for the two applications? If
> you can merge them, you don't need export/import at all, since the webapp
> would write where the windows app can read. That's how our systems work, and
> it's a huge improvement over having two systems that export/import

Even if data is same there might be several good reasons to keep the
webapp and vdf application's database separate:

- Webapplication does not have direct access to the vdf database. This
might be the case when the webserver is outside local network. This
might be for security reasons, don't want to expose the server the
database is on to the web server. ANother case is when the web server is
run by someone else (for example if you provide the service to your
customers to host the web server).

- Data might not be ready for the web user to see/read. Maybe you only
want to show finished records. Of course this can be solved by excluding
records but there might be reasons why this is not that easy to do.

- Data definition might be slightly different. Perhaps other indices
used for better performance or you need to add other data to improve
performance. For example if the web user should only be able to see his
own records (for example in an order system) then it might be necessary
to add fields and change index to achieve this (in many cases the
internal windows app don't need it).

Dan Walsh
21-Jun-2005, 04:36 AM
Joacim,

I'm currently doing this using the cXmlHttpTransfer class. I'll be
moving to Web Services soon, taking advantage of the new Struct & Array
variable types.

Joacim Eriksson wrote:
> Hi
>
> I´m new to webApp and webservices.
> I have made my first custom project in webapp ( VDF 11.0 ), that works fine.
>
> To export and import information to webapp from the VDF application I have
> been told to use
> WebServices.
>
> Is it the right way to go?
> Any ideas/ hints to make the WS?
>
> I have 5 tables to export to the web and one to export to the VDF
> application
>
> regards
>
> joacim
>
>

Joacim Eriksson
21-Jun-2005, 05:39 AM
Hi Anders

I will have my VDF application at my customer and my WebApp at ADB ( in
Stockholm )
therefor I need to sets of files ( I think ) and to export this files I will
try to use WS
I will look in to the examples tonight to see if I can understand how I will
move forward

// joacim
Prosmart


"Anders Öhrt" <Anders.Ohrt@capslock.se> skrev i meddelandet
news:c3pxITjdFHA.3408@dacmail.dataaccess.com...
>
> > I´m new to webApp and webservices.
> > I have made my first custom project in webapp ( VDF 11.0 ), that works
> > fine.
> >
> > To export and import information to webapp from the VDF application I
have
> > been told to use
> > WebServices.
> >
> > Is it the right way to go?
> > Any ideas/ hints to make the WS?
> >
> > I have 5 tables to export to the web and one to export to the VDF
> > application
>
> Do you need to have separate data directories for the two applications? If
> you can merge them, you don't need export/import at all, since the webapp
> would write where the windows app can read. That's how our systems work,
and
> it's a huge improvement over having two systems that export/import.
>
> If you really _need_ to keep them seperate, WS is the way to go. You need
a
> new webapp to go with the windows application as a WS server, and then you
> create a client WS that you use in the old webapp. WS is documented in the
> help with some good examples, start there.
>
> // Anders
>
>

Anders Öhrt
21-Jun-2005, 06:26 AM
> - Webapplication does not have direct access to the vdf database. This
> might be the case when the webserver is outside local network. This
> might be for security reasons, don't want to expose the server the
> database is on to the web server. ANother case is when the web server is
> run by someone else (for example if you provide the service to your
> customers to host the web server).

You can still merging the applications in both these cases, if you truly
want. If you host both applications at the same spot but in LAN/DMZ, you can
just go via load balancing. If you have someone else hosting the WebApp, you
can also do this by putting the Master remotely and the Slave locally, and
then setup a VPN between them. Of course these methods doesn't suite
everyone, but you can if you want to.


> - Data might not be ready for the web user to see/read. Maybe you only
> want to show finished records. Of course this can be solved by excluding
> records but there might be reasons why this is not that easy to do.

You must still be able to exclude the records when you export/import, should
not make any difference.


> - Data definition might be slightly different. Perhaps other indices
> used for better performance or you need to add other data to improve
> performance. For example if the web user should only be able to see his
> own records (for example in an order system) then it might be necessary
> to add fields and change index to achieve this (in many cases the
> internal windows app don't need it).

If the applications are built seperatly I see that this might be the case,
but otherwise you just add what's needed (whether it's indices or fields).

// Anders

Ben Weijers
21-Jun-2005, 07:23 AM
Alternatively you could use a database that supports replication. Seems to
me the whole point of your demand is to have a master database somewhere
that you want to publish on the web, publishing happens every month (or day
or week or ...) and you need the published database to be a copy of the
master. Just the thing replication is good at.

There are sevaral databases that do this. I know SQL Server does for
example.

Regards,

Ben Weijers
Data Access Worldwide