So what is "self descriping"? That is the main question. That is missing
often.
Think about e.g. Identity number of the person in Air field.
Clerk is behind desk and a foreign passanger comes.
Clerk needs to know the format of the foreign passanger.
Ok, application tells to that clerk the rigth format but the programmer
of that application must know the excat format of the Identity number that
belongs to passanger depending his/hers nationality.
How can a programmer validate it? (S)he must just know it precisely. Like I
said
in multivendor projects documentation is quite often poor so a "self
descriping"
Web Service would offer the right format by showing the format that it
expects.
What I mean is that it would be nice that C# Web Service would show to
programmer
what kind (format) parameters is wants. This is how we cut down Web Service
calls that has
parameters in wrong format.
In e.g VS.NET by pressing F5 it would be nive if we could inform the excat
format of parameters that
that Service wants, not only name of the parameter.
Am I makíng myself more clear now?
Cheers!
> Sorry I don't follow, business rules? do you mean documentation for
> parameters, if so I don't know of any way. Web services are supposed to be
[quoted text clipped - 7 lines]
>>
>> Cheers!
Josh Twist - 14 Feb 2006 21:16 GMT
The WSDL is how Web Services are self describing. The WSDL contains
information that can be read by other computers including:
The endpoint (url) of the web service
The names of methods available in the service
The names of parameters
and... information about the type of parameters and return types
It's important to note that Web Services do not share Type they share
contract (or schema) - what that means is that the WSDL contains a
representation of your Types that can be understood by any programming
language that can interpret WSDL. It's what makes web services
interoperable.
Josh
http://www.thejoyofcode.com/
Simon Hart - 15 Feb 2006 09:31 GMT
OK. So I take it you have maybe a string field or a predefined type and it
has to be in a particular format.
One way you could offer help to the programmer by the means of in-line
documentation:
/// <summary>
/// Posts the current transaction data currently held in local stack
relevant to the passed
/// terminal ID.
/// </summary>
/// <param name="termID">The terminal identifier, not be greater than 10
bytes</param>
[WebMethod (Description="Posts the passed terminal identifier data into
Equator")]
public void Post(string termID)
{
}
Something like the above will work through intellisense.
Simon.
> So what is "self descriping"? That is the main question. That is missing
> often.
[quoted text clipped - 37 lines]
>>>
>>> Cheers!