|
|
|
|
|
Thank you, Wonde Tadesse.
|
|
|
|
|
Have a look at the definition of the XContainer.Elements method[^]. The type that this returns is an IEnumberable collection. This allows you to run a loop over the elements of the employees object you create. It actually has nothing to do with you implementing or not implementing the interface, since the class XContainer / XElement possibly itself takes care of this internally.
|
|
|
|
|
|
Thank you. This cleared up my confusion.
|
|
|
|
|
You are welcome. Vote if it helped.
|
|
|
|
|
Sorry if anyone gets annoyed by this question please don't mind i am just asking how can i provide good articles what should be the way of it & in which manner.
Please Suggest me something.
Thanks.
|
|
|
|
|
|
|
The first thing that you need to note is that a C# question answer forum.
This question is posted in the wrong forum.
Thus you should remember to write a well-formatted article that is properly categorized in its rightful place and has enough material to be classified as an article.
If you feel your article is too small or does not have enough material, write a tip / trick instead of an article.
|
|
|
|
|
here is my sample code
webservice code
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(Name = "TestService", ConformsTo = WsiProfiles.BasicProfile1_1)]
public class WebService : System.Web.Services.WebService {
// Add a member variable of the type deriving from SoapHeader.
public MyHeader timeStamp;
// Apply a SoapHeader attribute.
[WebMethod(Description = "A method that requires authentication")]
[SoapDocumentMethod(Binding = "TestService")]
[SoapHeader("timeStamp", Direction = SoapHeaderDirection.In)]
public string HelloWorld()
{
if (timeStamp == null)
timeStamp = new MyHeader();
timeStamp.MustUnderstand = true;
timeStamp.Expires = 60000;
timeStamp.Created = DateTime.UtcNow;
return "Hello World";
}
}
here is the client code
localhost.MyHeader header = new localhost.MyHeader();
// Populate the values of the SOAP header.
header.Expires = 60000;
header.Created = DateTime.UtcNow;
// Create a new instance of the proxy class.
localhost.WebService proxy = new localhost.WebService();
// Add the MyHeader SOAP header to the SOAP request.
proxy.MyHeaderValue = header;
// Call the method on the proxy class that communicates
// with your XML Web service method.
string results = proxy.HelloWorld();
i am getting result as "Hello World"
But i want it in format as
?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-; xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<MyHeader xmlns="http://tempuri.org/">
<Created>dateTime</Created>
<Expires>long</Expires>
</MyHeader>
</soap:Header>
<soap:Body>
<HelloWorld xmlns="http://tempuri.org/"
</soap:Body>
</soap:Envelope >
|
|
|
|
|
Don't cross post. Pick one forum and stick with it.
|
|
|
|
|
|
|
You're calling the service method. That means that you want to get the result of the service method. SOAP is a transport mechanism, it's as irrelevant to the service call as whether you use copper or fibre-optic cable to transfer the 1s and 0s.
If you want to see the transport XML for debugging purposes, point a browser at http://localhost/yourservice.svc. If you want to actually pass XML from the service to service clients, you need to return XML from your service methods.
|
|
|
|
|
hi dear
i draw a circle c# with GDI+ function
i set timer on my form
how can i move this circle in my form with this timer
???
thx
|
|
|
|
|
Create a function that you'll call with Invoke via a delegate .
That function (if called via invoke) should have access to the UI thread to update (redraw) the circle.
V.
|
|
|
|
|
can you write this code for me??
thx
|
|
|
|
|
Sure !
I charge about 400 € / day.
Does that sound reasonable to you?
V.
|
|
|
|
|
OOpsss ....
y are joking ?
this is jus sample ...
good luck !
|
|
|
|
|
yes I was joking, but I will not give you code. Please read the guidelines for posting in a forum.
V.
|
|
|
|
|
sorry
i dont know anything about rules !!
can u give me a test for this program ??
|
|
|
|