axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhongliang zhang" <zhangzho...@gmail.com>
Subject Re: [axis2] AxisFault Best Practices
Date Thu, 11 Oct 2007 00:55:33 GMT
I am new to web service,too.
In my opinion,AxisFault is just an implementation by Axis2,as you
know,the web service based on SOAP,so the real useful message is the
SOAPFault.
So,you can return a SOAPFault message rather than an AxisFault
instance,then the client side can catch an AxisFault,the same as you
throw an AxisFault instance,that is the situation when you use Axis2
as your client side,the same as the other client side,ie.C#,.Net.
You can define the error info in your wsdl,and put the error info into
the SOAPFault's detail element. for example,error code and error
information,which error code is for machine read,and error message for
human beings.
You can define namespace the same as that in your WSDL.

Hope it useful.

On 11/10/2007, Nathan Hook <hooknc@hotmail.com> wrote:
>
> I have a few questions about how to properly use the messaging of an AxisFault to clearly
explain our faults.
>
> First, is the correct use of QName.  I know that a QName represents a Qualified Name
and has to do with namespaces, but how important is it to set the namespaceURI, localPart,
and prefix?
>
> We're going to be throwing AxisFaults for data validation issues so what should our localParl
look like anyways?
>
> validation_error
>
> Should we use a prefix?
>
> error:validation
>
> Also, if needed how do we determine our namespaceURI?  Is it the same as our service
namespace that is defined in our WSDL?
>
> Finally what should be placed in the message vs in the detail?
>
> Since we're dealing with validation should the message state that there was a validation
error with all the found validation errors in the detail?  Or should we place all the validation
errors in the the message with the detail being blank?
>
> I'm fairly new to web services and really need any amount of friendly push in the right
direction.
>
> Thank you for your time.
> _________________________________________________________________
> Peek-a-boo FREE Tricks & Treats for You!
> http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message