Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Need some help for communication between WWW and .net

$
0
0
Re: Need some help for communication between WWW and .net
.NET Development
Re: Need some help for communication between WWW and .net
Dec. 14, 2012
07:35 am
3O10G97HCShow this entire thread in new window
Gratar Image based on email address
From:Tony
To:Brett Baggott
Ok thanks a lot for your help !
It seems to be a good solution.

I'll watch this, sleep this week-end and answer you monday ;-)

Again, thank you


I'll stop trying to help figure out a solution to what your doing and try to answer the question you're asking.

One of the best ways I know of to call .NET code from VFP is using Rick's free and open source wwDotnetBridge (http://west-wind.com/wwDotnetBridge.aspx).

Depending on the situation, that's not how I would call into a C# program. If it were me, I would most likely add a Web API project to my C# program and expose the functionality of that program via an HTTP API that my website could access. Especially if what I was trying to do was just to tell the C# program to "go".

Hope this helps.


lol yes that's a lot :-)
And it's very interesting really ! Unfortunately, it's not my subject... But I'll keep that in mind in case I must something like you did.

In my subject, users must create docx or xlsx documents and fill them with some tags.
i.e. : they want to have a list of all users in pdf, they create a docx, they create the model for one user with some tags like living in

with this model, my program in C# has to parse the docx, and replace all the tags by data found in a xml.

But the problem is not this one, now I know that I'll do this with OpenXML.
My problem now is that I don't know how to use a Windows Service created in C#. Our Website, developped with VFP and West Wind Web, must be able to ask this service to do something.
The thing I don't know, is how to say to our website "use this service".


Tony, if I understand you correctly, you want to show your user a printing statement (a report) online, and let them edit it, and then probably let them print that edited printing statement. There are many ways you can do this online but most of them depend on the format of the existing printing statement. For example, if your original statement is in PDF format, there are tools that will allow you to convert that to text and then maybe you could present that text on an HTML page as a form (i.e. http://www.w3schools.com/html/html_forms.asp), collect the data from the user online, and then create a new PDF with the users information inserted (again, using the same kind of tools you used to programmatically convert it to text).

I had a similar job where a sorority had about 700 existing forms in PDF format that they wanted their members to be able to complete online. If it was 10 forms, it wouldn't be a problem to do them all by hand but 700 required doing it as automated as possible. Another aspect to the problem was that they wanted to keep the look and feel of the original printed forms because these forms had become "known" to them.

We considered using Adobe Document Server (which is now Adobe LifeCycle) but when they learned the price, they decided keeping the look and feel of their paper forms wasn't so important. We eventually went to an all online format and created a traditional HTML form equivalent of each paper form.

I hope I understand correctly because that's a lot of typing if I'm not. :)


Yes sorry, I didn't know how to translate that from french to english

"Printing states" would be in fact a sort of mailing. We have a model, we have some data, we fill the model with the data.
VFP does something like that, with the *.FRT and *.FRX files. I think it's a report in english

~~~

Ce sont les états d'impression.

--------

Rick, here is my complete subject :

We have a website with VFP and West Wind Web.

This project must be able to generate some mailing like VFP does with the *.FRT and *.FRX files. I think it's a report in english...
These files, our customers must be able to create or modify them, which is not possible with web.
That's why we will create the models with Word and Excel and with tags in it.

For this, after a long talk with my boss, we decided to do it with a Windows Service. The only problem I have right now, is the way I make our website ask this Windows Service that we will create in C#.
We will use OpenXML to generate these reports.


Tony, in your first post, you said:

"This tool must be able to do what VFP can do with printing states."

Can you please explain that better?

~~~

Pouvez vous expliquez s'il vous plaît, ce qui vous voulez dire ici:

"This tool must be able to do what VFP can do with printing states."



We decided to create a Windows Service in c# to do that.
The problem is, I don't find how to call it in VFP with West Wind...

Any idea ?

Tony


Ok I'll get some informations about that.

Thanks a lot for your quick answer

Not really sure what you're trying to build based on your description of your application.

But to pass data from the .NET application to the FoxPro Web application the best way will be HTTP requests, POSTing data to the server and getting a response back.

You can use plain HTTP requests in .NET to call the Web Connection server. There are several classes built into .NET for this: HttpWebRequest is the old stalwarth for this, there's the simpler WebClient class, or the much more powerful HttpClient() class introduced in .NET 4.5.

+++ Rick ---



Hey,

First of all, sorry for my language mistakes, I'm french and not bilingual at all !

I need some help, here is my problem :
In my company, I need to develop a tool, accessible from our web application.
This tool must be able to do what VFP can do with printing states.

With my boss, we agreed that we should do it in c# with .NET and OpenXML Framework.
We imagined that we would create some tags to put in word documents and it should work like VFP.

But I don't know how my .NET application will communicate with our West Wind website.

Do you have any ideas for this ?

Or maybe another idea than OpenXML ?

Thanks a lot.

Tony







Viewing all articles
Browse latest Browse all 10393

Trending Articles