|
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....
|
|
|
|
|
The "requestState" is:
public class RequestState
{
public Stream dataStream;
public HttpWebRequest request;
public HttpWebResponse response;
public RegisteredWaitHandle waitHandle;
public RequestState()
{
dataStream = null;
request = null;
response = null;
waitHandle = null;
}
}
|
|
|
|
|
Hi all
I need to capture the the image from web cam and should save that image in sql server database.
I can save the image which is uploaded using fileupload control.
but how to deal when input is webcam captured image...
can you please give me any suggestions or links....
Thank You,
siri
|
|
|
|
|
sirisha guttikonda wrote: I need to capture the the image from web cam
Webcam provider has to give some API's which gives you the captured image.
sirisha guttikonda wrote: nd should save that image in sql server database.
You keep image as byte in database. Use VARBINARY(MAX) as your column type, get the byte array from the image and insert it.
|
|
|
|
|
Hey
Ive also been plying around with a web cam lately, and got my program to take pictures from it...
Google for "Windows Image Acquisition webcam".
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
|
|
|
|
|
Harvey Saayman wrote: Windows Image Acquisition webcam
does it provide an API?
|
|
|
|
|
WIA is an api
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
|
|
|
|
|
Greetings;
What is the best way with C#.net 2005 or 2008 to ...
I have a db that I only want to get info from (no updates) where the user's pick an ID number, start date and end date for the query. I would not know ahead of time what variables they choose.
So what is the best way to programatically form the query?
below is how we have always done it before.
In VB I have some query's that use variables they are setup this way.
I first added the single quotes i.e. I added sigle quotes i.e. ptID = "'"
& ptID & "'" then added " & ptID & " this gave me dbl,single quote variablename singl,dbl quote. All worked well in VB.
In C# I am trying the same thing SQL server requires the single quote so I am still getting the point with ptID = "'" + ptID + "'" then later " + ptID + ".
All works fine on the development box but on the test box I get errors that indicate that it is this formatting that is the problem.
So in C# what is the correct way to add in variables to the strSQL string. Am I doing it correctly now??
tia
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
<div class="ForumMod">modified on Tuesday, September 23, 2008 12:42 PM</div>
|
|
|
|
|
Use parametrized queries. Your code is open to SQL injection.
|
|
|
|
|
What is the exact error you getting?
Also constructing sql commands this way is not recommended. Instead use something like following:
SqlCommand cmd =new SqlCommand("select * from tablename where id=@id",connection);
cmd.Parameters.AddWithValue("@id",3);
cmd.ExecuteReader(); //or whatever you want.
Checkout my blog at
http://www.nirandas.com/blog/
|
|
|
|
|
System.Exception: Incorrect syntax near '12'.
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Paste the code you are using.
Nirandas,
a developer from India.
http://www.nirandas.com
|
|
|
|
|
here ya go. As I said this all worked fine in VB.net. Here is a typical query string
//
strSQL = "SELECT dbo.tblFloat.PointID AS ID, dbo.tblFloat.UTCDateTime, dbo.tblFloat.ActualValue
FROM dbo.tblFloat
WHERE (dbo.tblFloat.PointID = " + ptID + ")"
it is really just 1 line I have broken it up to make it easer to read.
I have found this in the ms knowledgebase
SqlConnection sqlConn;
SqlCommand sqlCommand;
String sQuery;
sQuery = "INSERT INTO DVD (ID, Type, Name) VALUES (@p1, @p2, @p3)";
SqlParameter p1 = new SqlParameter("@p1", this.txtID.Text);
SqlParameter p2 = new SqlParameter("@p2", this.cmbType.Text);
SqlParameter p3 = new SqlParameter("@p3", this.txtName.Text);
Is this the "new" way of doing this?
Would I add,
SqlParameter p1 = new SqlParameter("@ptID", ptID);
Where ptID is the variable that I am trying to pass.
and use that in my Where clause?
if so is there any where you can point me to get more info on doing this? I have lots of queries in the old VB system that will have to be upgraded along with the upgrade to C#.
thx in advance for any help
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
<div class="ForumMod">modified on Tuesday, September 23, 2008 12:17 PM</div>
|
|
|
|
|
Rafone wrote: Is this the "new" way of doing this?
No, unless by new you mean "less than ten years old"...ADODB supports parameterized queries and parameters for stored procedures, and has ever since I started using it (around 1998). It's also been known for at least that long that building query strings using the method you've been working with is unsafe in Web applications due to the possibility of a SQL injection attack. Additionally, this technique is prone to the very error you are now experiencing. Except for an ad-hoc query engine, I would not use the old technique. Whoever the VB programmer was, he shouldn't have been allowed to keep his queries in this form. As to resources, try searching for "SQL parameters" or "parameterized queries" in Google or Live Search and see what comes back.
|
|
|
|
|
Thanks to all who replied.
I found the error. my bad the code in VB had dbl quote then single quote. Apparently that has worked fine for years. In fact it worked fine on my development box. However once the code was starting through the conversion and being run on a test box we starting seeing the error.
I finally realized the the syntax should be single quote then dbl quote it all works fine.
This is a large scale project and these apps that I am upgrading only query for data in the Intranet. There is no writing back to the database.
Thanks for the info. I was really asking for some "best practices" info from you guys...thanks again
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Hello,
I have a cube drawn in OpenGl Tao framework.I want to rotate and zoom in/zoom out that cube.Please give me any sample.
regards
aurosikha
|
|
|
|
|
Take a steady grip with both your hands around the monitor.
Lift it up and move it closer to your face while twisting it from side to side.
|
|
|
|
|
You might 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
|
|
|
|
|
Have a look at view/world transformation matricies.
|
|
|
|
|
I have another problem that has me perplexed.
I have a ToolStripStatusLabel on a StatusStrip. I change the BackColor
of the form that the StatusStrip is on. The ToolStripStausLabel's
background is painted in the form's BackColor.
I created an event handler for the BackColorChanged event on the
ToolStripStatusLabel and it is never fired.
I then created an event handler for the Paint event of the
ToolStripStatusLabel. It gets fired. I check the BackColor of the
ToolStripStatusLabel and it is the same as that for the StatusStrip.
But the background of the ToolStripStatusLabel is still painted in the
BackColor of the containing form.
So I am either missing something, or I have discovered a bug in the .NET
framework.
Has anyone encountered something like this before?
Brian
|
|
|
|