You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by iksrazal <ik...@gmail.com> on 2006/01/30 16:55:23 UTC

Re: [axis2] exception handling

Hi Juergen, 

I never have found a compleling use for wsdl:fault, as my last few projects 
I've  just done: 

  <complexType name="ReturnWebBase">
        <sequence>
          <element name="errorMessage" type="xsd:string"/>
          <element name="successErrorCode" type="xsd:int"/>
        </sequence>
      </complexType>
      <element name="wiseLogin">
        <complexType>
          <sequence>
            <element name="user_name" type="xsd:string"/>
            <element name="user_password" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
      <element name="wiseLoginResponse">
        <complexType>
          <complexContent>
            <extension base="tns:ReturnWebBase">
              <sequence>
                <element name="soap_session_id" type="xsd:string"/>
                <element name="web_user_name" type="xsd:string"/>
              </sequence>
            </extension>
          </complexContent>
        </complexType>
      </element>

Where each response just extends ReturnWebBase. 

However, recently I was doing some research on alternatives for an axis2 
tutorial I wrote (available soon, though its in português). I ran across this 
which may help: 

http://www.developer.com/java/web/article.php/3493491

HTH,
iksrazal
http://www.braziloutsource.com/


Em Segunda 30 Janeiro 2006 13:59, o Juergen Umbrich escreveu:
> Hi
>
> i have scanned the mailinglist for a example or explanation of the fault
> handling.But i didn´t find any solution for my problem.
>
> So what i didn´t understand is, how i can create a own exception and
> what i have to implement to get my exception as the standart exception.
>
> is it possible to get instead of the the <faultcode>-tag my
> <MyException> Message </MyException>-tag?
> Of which class should i extende my exception class ? perhaps i have to
> change the messagereciever class?
>
> i would be lucky if someone has an example for me.
>
> thanks in advance
> Jürgen

--