473,385 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

WSDL and Faults

Hello,

I have been provided a wsdl file for a webservice that i would like to call
with .net. Everything works fine however if the method throws an exception
(fault) no SoapException is thrown and no response is visible from the
generated class.

2 questions.

1. From within the wsdl generated class file how do i see the actually soap
request/response in its entirety?

2. I've read that wsdl.exe cannot deal with custom faults:
wsdl snippet:
<portType name="MethodSoap">
<operation name="Method">
<input message="MethodIn/>
<output message="MethodOut/>
<fault name="Fault" message="Fault"/>
</operation>
</fault>

Soap response that .net can't handle:
<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<faultcode xmlns="http://psfttemp.org">200</faultcode>
<faultstring>Custom Fault Error.</faultstring>
<runcode>0</runcode>
<detail>
<keyinformation><PERSON_ID>1</PERSON_ID></keyinformation>
<messages><type>Message</type>
<messagesetnumber>15</messagesetnumber>
<messagenumber>11</messagenumber>
<messagetext>Invalid value -- press the prompt button or
hyperlink for a list of valid values (15,11)</messagetext>
<explaintext>The value entered in the field does not match one
of the allowable values. You can see the allowable values by pressing the
Prompt button or hyperlink.</explaintext>
</messages>
</detail>
</soap:Body>
</soap:Envelope>
How can i modify the generated wsdl or generated class to properly read this
fault?

Any help is greatly appreciated!!!

Ryan
Nov 21 '05 #1
2 4172

"Ryan Folstad" <ry**@crmkb.net> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Hello,

I have been provided a wsdl file for a webservice that i would like to call with .net. Everything works fine however if the method throws an exception (fault) no SoapException is thrown and no response is visible from the
generated class.

2 questions.

1. From within the wsdl generated class file how do i see the actually soap request/response in its entirety?
I know of no way to see the request/response from within the generated proxy
class. However, you can use e.g., proxyTrace
(http://www.pocketsoap.com/tcptrace/pt.aspx) to see what goes on the wire,
or use a SoapExtension
(http://www.gotdotnet.com/Community/R...Path=/Resource
%5b@ResourceId='8F3213F6-1B6C-4711-97C0-0E2072E10ED3'%5d) to trace the Soap
messages.

2. I've read that wsdl.exe cannot deal with custom faults:
wsdl snippet:
<portType name="MethodSoap">
<operation name="Method">
<input message="MethodIn/>
<output message="MethodOut/>
<fault name="Fault" message="Fault"/>
</operation>
</fault>

Soap response that .net can't handle:
<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<faultcode xmlns="http://psfttemp.org">200</faultcode>
<faultstring>Custom Fault Error.</faultstring>
<runcode>0</runcode>
<detail>
<keyinformation><PERSON_ID>1</PERSON_ID></keyinformation>
<messages><type>Message</type>
<messagesetnumber>15</messagesetnumber>
<messagenumber>11</messagenumber>
<messagetext>Invalid value -- press the prompt button or
hyperlink for a list of valid values (15,11)</messagetext>
<explaintext>The value entered in the field does not match one
of the allowable values. You can see the allowable values by pressing the
Prompt button or hyperlink.</explaintext>
</messages>
</detail>
</soap:Body>
</soap:Envelope>


The <soap:Fault> element that should come right after <soap:Body> appears to
be missing. I know this may not be of much help, but the message does not
seem to be valid Soap.

Regards,
Sami

Nov 21 '05 #2
Thank you Sami,

I looked at the spec and you are correct this is invalid for SOAP 1.2. I'm
wondering if anyone has any ideas for workarounds?

Maybe i can modify the wsdl generated so that everthing in the body is
returned as xml? This way i could still use the generated proxy class while
writing my own fault catcher..

Any suggestions on how to use the proxy class and not write the soap
interface myself to handle this messed up Soap message?

Cheers,

Ryan
"Sami Vaaraniemi" <sa**********@pleasejippii.fi> wrote in message
news:uu*************@TK2MSFTNGP11.phx.gbl...

"Ryan Folstad" <ry**@crmkb.net> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Hello,

I have been provided a wsdl file for a webservice that i would like to call
with .net. Everything works fine however if the method throws an

exception
(fault) no SoapException is thrown and no response is visible from the
generated class.

2 questions.

1. From within the wsdl generated class file how do i see the actually

soap
request/response in its entirety?


I know of no way to see the request/response from within the generated

proxy class. However, you can use e.g., proxyTrace
(http://www.pocketsoap.com/tcptrace/pt.aspx) to see what goes on the wire,
or use a SoapExtension
(http://www.gotdotnet.com/Community/R...Path=/Resource %5b@ResourceId='8F3213F6-1B6C-4711-97C0-0E2072E10ED3'%5d) to trace the Soap messages.

2. I've read that wsdl.exe cannot deal with custom faults:
wsdl snippet:
<portType name="MethodSoap">
<operation name="Method">
<input message="MethodIn/>
<output message="MethodOut/>
<fault name="Fault" message="Fault"/>
</operation>
</fault>

Soap response that .net can't handle:
<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<faultcode xmlns="http://psfttemp.org">200</faultcode>
<faultstring>Custom Fault Error.</faultstring>
<runcode>0</runcode>
<detail>
<keyinformation><PERSON_ID>1</PERSON_ID></keyinformation>
<messages><type>Message</type>
<messagesetnumber>15</messagesetnumber>
<messagenumber>11</messagenumber>
<messagetext>Invalid value -- press the prompt button or
hyperlink for a list of valid values (15,11)</messagetext>
<explaintext>The value entered in the field does not match one of the allowable values. You can see the allowable values by pressing the Prompt button or hyperlink.</explaintext>
</messages>
</detail>
</soap:Body>
</soap:Envelope>
The <soap:Fault> element that should come right after <soap:Body> appears

to be missing. I know this may not be of much help, but the message does not
seem to be valid Soap.

Regards,
Sami


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ffhansix | last post by:
Hi, I am having problems with generating a c# proxy class from a IBM websphere WSDL file, when running the wsdl.exe to create the c# proxy file command i recieve an error: Warning: one or...
1
by: tbatwork828 | last post by:
I've PerfMon-ed our application for several days now and it consistently averages 2000 Page Faults/sec, and accumulates on average about 4 mill page faults during 35 mins. During the same...
4
by: tbatwork828 | last post by:
Related to my other post on Graphics.FillRectangle and a lot of page faults caused by this call... We determine that when Control.DoubleBuffer=true to avoid the flicker effect,...
1
by: Dan A | last post by:
Why can't .NET generate stubs to correspond to the exceptions that are thrown by a webservice? The exceptions that are thrown by an API are just as importantant as the return objects, etc. ...
0
by: Elhanan | last post by:
hi.. i have a small Web Service which is consumed by dotnet application the webservice is located in 2 places. the first is my local tomcat, and the second is in websphere server. problems is...
2
by: David Morgan | last post by:
Hi Have 4Gb of RAM and plenty of free disk. Those page faults are for DLLHOST.EXE using ~370Mb RAM. inetinfo.exe has 403,106,036 page faults at the time of writing and is using ~145Mb RAM. ...
9
by: Cesar | last post by:
Hello there, A java programmer sent me a wsdl file, which I have to use to consume his web methods. When I run the wsld.exe tool to generate the class' code, I get the following message: ...
3
by: scotp | last post by:
Does anyone know what would cause excessive page faults running the js function below? The most common browser used is IE 6. The page has records that include text & checkbox inputs. Each...
3
by: =?Utf-8?B?TWFucHJlZXQgU3VzaGls?= | last post by:
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"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.