By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,133 Members | 1,113 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,133 IT Pros & Developers. It's quick & easy.

Adding SOAP:Fault elements within my WSDL.

P: n/a
I am having a Webservice within which i am throwing SOAP Exceptions and
therefore whenever something wrong happens a SOAP fault comes up in the
response - see below:

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap: Client</faultcode><faultstring>Fault
occurred</faultstring><faultactor>http://203.111.104.215/webservices/selcomm/selcomm.asmx</faultactor><detail><faultcode
xmlns="http://tempuri.org/">-102</faultcode><faultstring
xmlns="http://tempuri.org/">Database not
found</faultstring></detail></soap:Fault></soap:Body></soap:Envelope>

Now my Problem is that my WSDL does not define any SOAP Fault elements as it
is the one that is auto generated via the .NET Framework when we do ?WSDL.
How can i add the fault elements within my WSDL? where will the fault
elements come and how will they look like?
Aug 23 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Manpreet Sushil" <Ma************@discussions.microsoft.comwrote in
message news:57**********************************@microsof t.com...
>I am having a Webservice within which i am throwing SOAP Exceptions and
therefore whenever something wrong happens a SOAP fault comes up in the
response - see below:

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap: Client</faultcode><faultstring>Fault
occurred</faultstring><faultactor>http://203.111.104.215/webservices/selcomm/selcomm.asmx</faultactor><detail><faultcode
xmlns="http://tempuri.org/">-102</faultcode><faultstring
xmlns="http://tempuri.org/">Database not
found</faultstring></detail></soap:Fault></soap:Body></soap:Envelope>

Now my Problem is that my WSDL does not define any SOAP Fault elements as
it
is the one that is auto generated via the .NET Framework when we do ?WSDL.
How can i add the fault elements within my WSDL? where will the fault
elements come and how will they look like?
..NET will not generate fault elements in your WSDL. You will either have to
create your own WSDL file or do without fault elements.

Your other choice would be to switch to WCF, which does allow you to define
faults and will add them to the WSDL.
--
John Saunders [MVP]

Aug 23 '07 #2

P: n/a
Hi John,

Thanks for your reply. I have no idea at all about WCF. Can ypu please point
me to some resources where i can learn how to add fault elements within my
customer WSDL. Your help will be much appreciated.

"John Saunders [MVP]" wrote:
"Manpreet Sushil" <Ma************@discussions.microsoft.comwrote in
message news:57**********************************@microsof t.com...
I am having a Webservice within which i am throwing SOAP Exceptions and
therefore whenever something wrong happens a SOAP fault comes up in the
response - see below:

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap: Client</faultcode><faultstring>Fault
occurred</faultstring><faultactor>http://203.111.104.215/webservices/selcomm/selcomm.asmx</faultactor><detail><faultcode
xmlns="http://tempuri.org/">-102</faultcode><faultstring
xmlns="http://tempuri.org/">Database not
found</faultstring></detail></soap:Fault></soap:Body></soap:Envelope>

Now my Problem is that my WSDL does not define any SOAP Fault elements as
it
is the one that is auto generated via the .NET Framework when we do ?WSDL.
How can i add the fault elements within my WSDL? where will the fault
elements come and how will they look like?

..NET will not generate fault elements in your WSDL. You will either have to
create your own WSDL file or do without fault elements.

Your other choice would be to switch to WCF, which does allow you to define
faults and will add them to the WSDL.
--
John Saunders [MVP]

Aug 23 '07 #3

P: n/a
I have been able to resolve this by referring to the W3 Website. thanks for
your help anyway.

"Manpreet Sushil" wrote:
Hi John,

Thanks for your reply. I have no idea at all about WCF. Can ypu please point
me to some resources where i can learn how to add fault elements within my
customer WSDL. Your help will be much appreciated.

"John Saunders [MVP]" wrote:
"Manpreet Sushil" <Ma************@discussions.microsoft.comwrote in
message news:57**********************************@microsof t.com...
>I am having a Webservice within which i am throwing SOAP Exceptions and
therefore whenever something wrong happens a SOAP fault comes up in the
response - see below:
>
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap: Client</faultcode><faultstring>Fault
occurred</faultstring><faultactor>http://203.111.104.215/webservices/selcomm/selcomm.asmx</faultactor><detail><faultcode
xmlns="http://tempuri.org/">-102</faultcode><faultstring
xmlns="http://tempuri.org/">Database not
found</faultstring></detail></soap:Fault></soap:Body></soap:Envelope>
>
Now my Problem is that my WSDL does not define any SOAP Fault elements as
it
is the one that is auto generated via the .NET Framework when we do ?WSDL.
How can i add the fault elements within my WSDL? where will the fault
elements come and how will they look like?
..NET will not generate fault elements in your WSDL. You will either have to
create your own WSDL file or do without fault elements.

Your other choice would be to switch to WCF, which does allow you to define
faults and will add them to the WSDL.
--
John Saunders [MVP]
Aug 29 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.