Skip to content

Instantly share code, notes, and snippets.

@jonashackt
Created May 12, 2015 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonashackt/98a5c92b95809e2a5525 to your computer and use it in GitHub Desktop.
Save jonashackt/98a5c92b95809e2a5525 to your computer and use it in GitHub Desktop.
Define Custom Exception in WSDL (import the Exception Definition from another XSD - not included here)
<!-- ... -->
<wsdl:message name="WeatherException">
<wsdl:part name="parameters" element="datatypes:WeatherException" />
</wsdl:message>
<!-- ... -->
<wsdl:portType name="WeatherSoap">
<wsdl:operation name="GetWeatherInformation">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Gets Information for each WeatherID</wsdl:documentation>
<wsdl:input message="tns:GetWeatherInformationSoapIn"/>
<wsdl:output message="tns:GetWeatherInformationSoapOut"/>
<wsdl:fault name="WeatherException" message="tns:WeatherException"/>
</wsdl:operation>
</wsdl:portType>
<!-- ... -->
<wsdl:binding name="WeatherSoap" type="tns:WeatherSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetWeatherInformation">
<!-- ... -->
<wsdl:fault name="WeatherException">
<soap:fault name="WeatherException" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<!-- ... -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment