I have already seen this:
>> And I should point out that wsdl.exe ignores fault messages in the
>> <portType> operations. You can manually insert them, but the wsdl tool
>> will
>> ignore them when it generates classes. There is currently no way that I
>> know
>> of to have VS .NET or the command line tools automatically generate wsdl
>> that includes fault message references.
and I assume that this is still correct. I had been hoping to see a
generated class definition relating to the fault element already definined
in the WSDL - but apparently not!
I will be returning effectively an array of Error Codes and Error
Descriptions. What is the recommended way to make sure that my (contract
first) WSDL correctly represents what I am going to return from ASP.NET? Or
is plan B to not actually formally define the error format in the WSDL?
Thanks, Nick.
John Saunders - 21 Oct 2006 18:36 GMT
>I have already seen this:
>
[quoted text clipped - 14 lines]
> first) WSDL correctly represents what I am going to return from ASP.NET?
> Or is plan B to not actually formally define the error format in the WSDL?
What I did is to define my fault messages in a separate schema, which is
referenced in the wsdl. I then ran that schema through XSD.EXE to get me
class definitions I could use in my code. When I wanted to generate a
SoapException corresponding to those faults, I serialized the generated
class into the Detail property of the SoapException.
John