Link to home
Create AccountLog in
Avatar of snowdog_2112
snowdog_2112Flag for United States of America

asked on

wsdl question - post file, read response

I've been given a visual c# (viz studio 2010 express) app which creates a file, and posts it to a remote website and reads the response (seding username/password for authentication in the process).

The C# app has one GUI form, an "Add Line" button to add detail lines, and an "Execute" button which POSTs the detail lines, a header, and logon information to the remote web site.

I'm looking to have another internal process generate the file (rather than this GUI form).  This other process can't push the XML or POST to a remote server directly.

I'm wondering how I can have this application be "triggered" by the existince of a file.

In other words, I need to have another internal process dump the file to the server where c# is installed, and have this app push it off to the remote site and get the response back, and ideally create some sort of text file with the success or error for my other internal process to deal with.

I can hard code user/password - username/password is not dynamic.

Please let me know if you need more information.
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of snowdog_2112

ASKER

any suggestions on how to launch the desired application from within a filesystemwatcher service?

Fortunately, I've done one of those filesystemwatcher services - but it was ugly.  Any pointers would be greatly appreciated.  Thanks.
>>  any suggestions on how to launch the desired application from within a filesystemwatcher service?

Use System.Diagnostics.Process.Start(filename_string, arguments_string).


>>  Any pointers would be greatly appreciated

I haven't had the need to write one, but I'm sure I, or the other experts here, could assist you in writing a streamlined version. Is there anything specific your curious about?
Yes - as I mentioned, I hacked together a filesystemwatcher, but it was only after a lot of reading, trial-error-error-error...

I guess I first need to see if I can call the sample code which does the POST and have that do the POST without opening the GUI.  The sample GUI I have to work with is a basic "enter part number, hit Add to add the line, then hit Submit after lines are all added".  In my case, I will have all the detail, I just need to force the "Submit" button - preferably without the GUI, as it will not run in an interactive session.

Thanks!