A
Arnold Huygens
I have a standard web method in a standard asmx web service. Say:
[WebMethod(Description="A simple method.")]
public string mySimpleMethod(string data){
try {
. . .
[do something smart here]
. . .
}
catch (Exception e) {
throw new MySimpleException(e);
}
}
The MySimpleException translates the standard exception into a
SoapException, following the guidelines described in the article
http://msdn.microsoft.com/library/d...handlingraisingexceptionsinxmlwebservices.asp: I
create a new SoapException, and I set the message, code, actor, and details.
Now, what I would like (actually my client is who would like), is some
information about this appearing as a "fault" element in the WSDL generated
by the asmx web service:
<portType name="aSimpleWebServiceSoap">
<operation name="mySimpleWebMethod">
<documentation>A simple method.</documentation>
<input message="s0:aSimpleWebServiceSoapIn" />
<output message="s0:aSimpleWebServiceSoapOut" />
<fault message="s0:aSimpleWebServiceSoapFault" />
</operation>
How to achieve this?
Regards,
A. H.
[WebMethod(Description="A simple method.")]
public string mySimpleMethod(string data){
try {
. . .
[do something smart here]
. . .
}
catch (Exception e) {
throw new MySimpleException(e);
}
}
The MySimpleException translates the standard exception into a
SoapException, following the guidelines described in the article
http://msdn.microsoft.com/library/d...handlingraisingexceptionsinxmlwebservices.asp: I
create a new SoapException, and I set the message, code, actor, and details.
Now, what I would like (actually my client is who would like), is some
information about this appearing as a "fault" element in the WSDL generated
by the asmx web service:
<portType name="aSimpleWebServiceSoap">
<operation name="mySimpleWebMethod">
<documentation>A simple method.</documentation>
<input message="s0:aSimpleWebServiceSoapIn" />
<output message="s0:aSimpleWebServiceSoapOut" />
<fault message="s0:aSimpleWebServiceSoapFault" />
</operation>
How to achieve this?
Regards,
A. H.