|
Send the string as a normal program argument and in your C# program retrieve that from the "string[] args" parameter of the Main method.
Or if your string is very large, write it in a file and send the file path as an argument to your C# program.
|
|
|
|
|
Thanks,
I can reconstruct the args table as following to give me the whole text :
public static void Main(String[] args)
{
String strParameters = "";
for (int intCounter = 0; intCounter < args.Length; intCounter++)
{
strParameters = strParameters + " " + args[intCounter];
}
But the other part of my question is : how can I retrieve the result of my programm as a variable (I don't want to save anything in a file) ?
|
|
|
|
|
Dinglewood wrote: how can I retrieve the result of my programm as a variable (I don't want to save anything in a file) ?
This is not clear. Do you want to get result of another program?
|
|
|
|
|
I apology :
My C# programm make text manipulations with the content of the long text I want to send him.
So I want to send him a long text variable and have the result (the modified content) back.
Hope it is more understable so.
|
|
|
|
|
Dinglewood wrote: I want to send him.
To whom?
I guess you are trying to do inter-process communication. If yes, use WM_COPYDATA[^]. You need to use p-invoke for using this in C#. Check this[^]
|
|
|
|
|
Don't pass entire text documents as an argument. instead write it to a file and pass the path of that file...
Besides, you can pass only "text" as an argument. If you need the byte codes behind the text (bold, italic, tables,...) you'll have difficulty anyway...
|
|
|
|
|
You could pipe it in:
type somefile | myprogram
myprogram then reads it as input.
Or have a TextBox or RichTextBox and paste it in.
|
|
|
|
|
Yeah I'd second that (ignoring the WTF from having what seems to be a word adding piping text around).
You can also capture stdio using Process.* methods.
|
|
|
|
|
how can bind combo box in window application in c# using sql database
damodar singh
ASE in datainfosys limited jaipur
|
|
|
|
|
Use datasource property to set the data. Use DisplayMember to set the field which will be shown to user ans use valuemember to set the field which will represents values.
|
|
|
|
|
you have to know first how to connect to a database.
Search for it, when you get stuck ask here.
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
anyone have links, magazine articles, book titles, or open source project references
what are some algorithms available to simulate how ms word draws each page as i scroll through 1000+ page document. Assuming the whole document cannot be loaded+drawn in memory all at once. How does the buffering work?
Suppose, I create an application that doesn't provide zoom in/out capabilities but i want to show a rectangle with a gradient for grass the size of a football field at a scale 1 to 1.
thanks,
-lm
|
|
|
|
|
You'll probably have better luck in the graphics forum
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
|
Hello everyone,
Reading the W3 Spec of WS-Addressing is boring. Any recommendations for any easy to read/learn documents/samples?
thanks in advance,
George
|
|
|
|
|
|
Thanks cpkilekofp,
The wiki document is really good. But it is short.
Do you have any documents which is more comprehensive than the wiki document, but more readable than the Spec to recommenda?
regards,
George
|
|
|
|
|
George_George wrote: The wiki document is really good. But it is short.
Do you have any documents which is more comprehensive than the wiki document, but more readable than the Spec to recommenda?
Sadly, at this time I do not. However, I did note that Google produced quite a few documents (the Wikipedia article was simply the first).
|
|
|
|
|
Thanks cpkilekofp,
A further question, in the wikipedia page,
http://en.wikipedia.org/wiki/WS-Addressing
how do you understand "It essentially consists of two parts: a structure for communicating a reference to a Web service endpoint, and a set of Message Addressing Properties which associate addressing information with a particular message."?
1.
My confusion is, what means "a structure for communicating a reference to a
Web service endpoint"?
2.
and what are the so-called "Message Addressing Properties"? Do they mean the
To, Action, ReplyAction headers?
regards,
George
|
|
|
|
|
George_George wrote: 1.
My confusion is, what means "a structure for communicating a reference to a
Web service endpoint"?
2.
and what are the so-called "Message Addressing Properties"? Do they mean the
To, Action, ReplyAction headers?
George, I wish I could tell you off the top of my head. Perhaps some Web Service/SOAP guru will come to your aid at this point (I am NOT that guru); I could figure it out, but I'm in the process of moving to a new position with a government organization and, while I'm introducing my fellow developer to the apps I maintain, the time I can devote to researching answers in topics I don't know that well is quite limited. Sorry, and good luck.
|
|
|
|
|
Thanks cpkilekofp!
It is fine. Just share when on your demand you feel ok.
Anyway, besides this forum, do you have think there is any more specific forums which is more suitable for my web services detailed question?
regards,
George
|
|
|
|
|
Hello George,
Message Addressing properties are the properties or attributes of a particular WS-Addressing implementation objects. In runtime execution they hold the data in the memory before you serialize them as headers within a SOAP envelope for the "wire" transport. The other way around, the dispatcher of SOAP messages with WSA deserializes the headers' information into runtime objects or properties from the transport protocol.
EPR is an XML element of type wsa:EndpointReferenceType. It is a structure which you can use to convey specific endpoint instance information, or just reach particular endpoint or instance of a service endpoint. The ReplyTo, From, FaultTo headers are types of EPR. They bring information how to reach an endpoint in different ways and cases.
Best regards,
choopie
|
|
|
|
|
Thanks choopie,
1.
Could I understand EPR as URL/URI for an endpoint?
2.
"Message Addressing properties are the properties or attributes of a particular WS-Addressing implementation objects." -- I am confused about what do you mean "a particular WS-Addressing implementation objects"? Any other or more words about what do you mean please?
3.
"In runtime execution they hold the data in the memory before you serialize them as headers within a SOAP envelope for the "wire" transport." -- do you mean it is our developer's responsibility to generate WS-Address information other than underlying web services stack generates them automatically?
regards,
George
|
|
|
|
|
Hello George,
consider EPRs as a way to connect a service endpoint. If you look at some examples you might see ReplyTo header which contains Address, reference parameters or metadata. This means that the client which sends such request to a provider, expects a response to the specified address in the ReplyTo, with supplied reference parameters and maybe some metadata. Like the client, the provider may also offer special communication with endpoint instances. The wsdl contains the information for provider's endpoints. Different bindings could be set for calling endpoints with reference parameters for example. Consider such provider as an EPR itself. The request's wsa:To maps directly to the provider's destination URL. Reference parameters are set directly as separate headers with wsa:IsReferenceParameter attribute set and so on.
You need to look for some ws communication with all of the combination and headers in use. You can find a part of the W3C org tests of WS-A here: http://dev.w3.org/2004/ws/addressing/testsuite/testcases/#test1100
Particular implementation means that you can write your own Addressing SOAP feature with any language. You can write it as you like. You can follow the specification or you may not follow everything in the specification, but if you don't, you risk to have not an interopable implementation with third party vendors. Interoperability is a key moment in web service communication.
Endpoint address information could be found in the wsdl or some metadata or address of an EPR. If the anonymous client URI is used (SOAP over HTTP) then the Reply is returned on the same HTTP connection. Serialization is transformation from the property data to an XML infoset. Deserialization is the oposite.
Best regards,
choopie
|
|
|
|
|
I am writting a async HTTP post program, here is some code:
int c,cc=4096;
public static ManualResetEvent allDone = new ManualResetEvent(false);
FileStream fs = new FileStream( "file to post",.......);
asyncResult = request.BeginGetRequestStream(new AsyncCallback(GetRequestStreamCallback), requestState);
allDone.WaitOne();
allDone.Reset();
c = fs.Read(b, 0, cc);
AsyncCallback callback = new AsyncCallback(WriteCallback);
int n = 0;
while (c > 0)
{
asyncResult = requestState.dataStream.BeginWrite(b, 0, c, callback, requestState);
requestState.waitHandle = ThreadPool.RegisterWaitForSingleObject(allDone, new WaitOrTimerCallback(TimeoutCallback), requestState, 3000, true);
allDone.WaitOne();
allDone.Reset();
c = fs.Read(b, 0, cc);
}
requestState.dataStream.Close();
Thread.Sleep(1000);
asyncResult = request.BeginGetResponse(new AsyncCallback(GetResponseCallback), requestState);
allDone.WaitOne();
allDone.Reset();
The code above I tested ok, it can upload file to the http server, and I also can get the http server's response.
but If I post some file that will cause HTTP server generate 500 error, the code will hang in BeginGetResponse call, never return until I kill it's process.
I hope that BeginGetResponse can get error message from http server, not hang and dead....
|
|
|
|