Fault.getDetailEntries() just returns a Vector of Element unless it
knows how to deserialize the entries.  In your case, you would have to
add an xsi:type attribute to the <field> elements you write and map a
deserializer for that type if you want them deserialized.  Note that if
you use the BeanSerializer, you will also need xsi:type for the <name>
and <error> elements.

Scott Nichol

----- Original Message -----
From: "Omprakash Bachu" <[EMAIL PROTECTED]>
To: "Scott Nichol" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, October 30, 2002 5:56 PM
Subject: RE: how to override code in
<faultcode>SOAP-ENV:Server</faultcode> tag


> Hi Scott, System.out.println(fault), prints as belwo...
>
> ...
> [DetailEntries=
>  [(0)=<field><name>postDt</name><error>date is not
correct</error></field>]
>  [(1)=<field><name>acctNum</name><error>acctNum is not
> correct</error></field>]
> ]
> ...
>
> It seems that Fault.getDetailEntries() call and its sub calls may
unmarshall
> methods missing this out...
>
> please help me...
>
> thanks in advance
>  :o)m
> -----Original Message-----
> From: Scott Nichol [mailto:snicholnews@;scottnichol.com]
> Sent: Wednesday, October 30, 2002 5:44 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: how to override code in
> <faultcode>SOAP-ENV:Server</faultcode> tag
>
>
> What prints if you just do System.out.println(fault)?
>
> Scott Nichol
> ----- Original Message -----
> From: "Omprakash Bachu" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, October 30, 2002 5:29 PM
> Subject: RE: how to override code in
> <faultcode>SOAP-ENV:Server</faultcode> tag
>
>
> > Wow!!! thats a good idea and thanks a lot to Scott and rob.
> >
> > By the way one more question, I'm using the custom fault handler...
> > But in my SOAP Client, if I use fault.getDetailEntries() its not
> getting all
> > the child elements in the vector.
> >
> > For System.out.println("detail vector is..." +
> fault.getDetailEntries());
> > then my Client out put is
> >
> > [[field: null], [field: null]]
> >
> >
> >
> >
> > Though the SOAP Wire dump is,
> >
> > ...
> > <SOAP-ENV:Fault>
> > <faultcode>SOAP-ENV:Server</faultcode>
> > <faultstring>Exception from service object: Errors occurred while
> processing
> > the message.</faultstring>
> <faultactor>/soap/servlet/rpcrouter</faultactor>
> >  <detail>
> >      <field>
> >          <name>postDt</name>
> >          <error>date is not correct</error>
> >      </field>
> >      <field>
> >          <name>acctNum</name>
> >          <error>acctNum is not correct</error>
> >      </field>
> > </detail> </SOAP-ENV:Fault>
> > ...
> >
> > thanks in advance...
> >  :o)m
> >
> > -----Original Message-----
> > From: Robert Dietrick [mailto:rdietrick@;sega.com]
> > Sent: Wednesday, October 30, 2002 5:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: how to override code in
> > <faultcode>SOAP-ENV:Server</faultcode> tag
> >
> >
> > You can pass the fault code to the constructor of the SOAPException.
> >
> > e.g.,
> >
> > throw new SOAPException(org.apache.soap.Constants.FAULT_CODE_CLIENT,
> > "something went wrong");
> >
> > You may want to write a custom FaultHandler, if you want to provide
> more
> > detailed information to the
> > client.
> >
> >
> > Omprakash Bachu wrote:
> > > Hi, from RPC serivce I'm trying to set custom fault code and hence
> will be
> > > available to retrieve by using fault.getFaultCode() API, but it
> seems that
> > > Apache by default sets this as SOAP-ENV:Server, can anyone help me
> how to
> > > override this code?
> > >
> > > Sample:
> > >
> > > <faultcode>SOAP-ENV:Server</faultcode>
> > > <faultstring>I can set custom string, this is ok</faultstring>
> > >
> > > Cheers!!!
> > >  Om
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <mailto:soap-user-unsubscribe@;xml.apache.org>
> > > For additional commands, e-mail:
> <mailto:soap-user-help@;xml.apache.org>
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:soap-user-unsubscribe@;xml.apache.org>
> > For additional commands, e-mail:
> <mailto:soap-user-help@;xml.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:soap-user-unsubscribe@;xml.apache.org>
> > For additional commands, e-mail:
> <mailto:soap-user-help@;xml.apache.org>
> >
> >
>
>


--
To unsubscribe, e-mail:   <mailto:soap-user-unsubscribe@;xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@;xml.apache.org>

Reply via email to