You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Omprakash Bachu <om...@mphasis.com> on 2002/10/31 22:53:51 UTC

RE: how to override code in SOAP-ENV:Server tag

Hi Scott, I'm setting xsi:type in the elements which you suggested.  But
still finding null if I System.out.println( fault.getDetailEntries() ) where
as if I see System.out.println(fault) then I can see at client side its
getting received below fault block.  This is some thing very similar to, if
I compare with addressbook example getAllListings which gives the entire
XML.  But where as fault.getDetailEntries() api is trying to make Vector out
of that detail block and its failing at that point in time.

 Please correct me if I'm wrong, in this case why do we need to set xsi:type
for strings and map to BeanSerializer if they are supported by default.

 ...
<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 xsi:type="xsd:string">
     <name xsi:type="xsd:string">postDt</name>
     <error xsi:type="xsd:string">date is not correct</error>
    </field>
 </detail>
</SOAP-ENV:Fault>
 ...

thanks in advance
 :o)m

-----Original Message-----
From: Scott Nichol [mailto:snicholnews@scottnichol.com]
Sent: Wednesday, October 30, 2002 6:06 PM
To: om@mphasis.com; soap-user@xml.apache.org
Subject: Re: how to override code in
<faultcode>SOAP-ENV:Server</faultcode> tag


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" <om...@mphasis.com>
To: "Scott Nichol" <sn...@scottnichol.com>;
<so...@xml.apache.org>; <om...@mphasis.com>
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: soap-user@xml.apache.org; om@mphasis.com
> 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" <om...@mphasis.com>
> To: <so...@xml.apache.org>; <ro...@sega.com>
> 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: soap-user@xml.apache.org
> > 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:
> <ma...@xml.apache.org>
> > > For additional commands, e-mail:
> <ma...@xml.apache.org>
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@xml.apache.org>
> > For additional commands, e-mail:
> <ma...@xml.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@xml.apache.org>
> > For additional commands, e-mail:
> <ma...@xml.apache.org>
> >
> >
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Issues with the HTTP implementation provided with Apache SOAP.

Posted by Scott Nichol <sn...@scottnichol.com>.
I think proxy support was in by 2.2.  I know 2.3.1 has it.  There are
methods on SOAPHTTPConnection for setProxyHost, setProxyPort,
setProxyUser, setProxyPassword.  The nightly builds now also read System
properties http.proxyHost, http.proxyPort, http.ProxyUser,
http.proxyPassword (among others), so that you do not have to code proxy
information into your application.

Scott Nichol

----- Original Message -----
From: "Joe Ryan" <jo...@engitech.ie>
To: <so...@xml.apache.org>
Sent: Friday, November 01, 2002 9:02 AM
Subject: Issues with the HTTP implementation provided with Apache SOAP.


> I am curious about the HTTP implementation provided with Apache SOAP,
as I
> need to go through a proxy server.
>
> Browsing the net I saw an article which pointed out the following
isssues
> with the HTTP implementation provided with Apache SOAP V2.0
>
> - No Proxy/Socks support.
> (If you need to use a http proxy or socks server to reach the server
then it
> won't work. Assumption is client can directly open a socket to the
server.)
>
> - HTTP Security support missing.
> - HTTP/SSL support with certificate based authentication is missing
(only
> support standard HTTP, no SSL)
> - No cookie support.
> - It opens a new socket for every RPC.
>
>
> Can somebody let me know if SOAP 2.2 or 2.3 has Proxy/Socks support?
This is
> the main concern I have. If not then presumably I must implement my
own Http
> Transport class?
>
> thanks, Joe.
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Issues with the HTTP implementation provided with Apache SOAP.

Posted by Scott Nichol <sn...@scottnichol.com>.
I think proxy support was in by 2.2.  I know 2.3.1 has it.  There are
methods on SOAPHTTPConnection for setProxyHost, setProxyPort,
setProxyUser, setProxyPassword.  The nightly builds now also read System
properties http.proxyHost, http.proxyPort, http.ProxyUser,
http.proxyPassword (among others), so that you do not have to code proxy
information into your application.

Scott Nichol

----- Original Message -----
From: "Joe Ryan" <jo...@engitech.ie>
To: <so...@xml.apache.org>
Sent: Friday, November 01, 2002 9:02 AM
Subject: Issues with the HTTP implementation provided with Apache SOAP.


> I am curious about the HTTP implementation provided with Apache SOAP,
as I
> need to go through a proxy server.
>
> Browsing the net I saw an article which pointed out the following
isssues
> with the HTTP implementation provided with Apache SOAP V2.0
>
> - No Proxy/Socks support.
> (If you need to use a http proxy or socks server to reach the server
then it
> won't work. Assumption is client can directly open a socket to the
server.)
>
> - HTTP Security support missing.
> - HTTP/SSL support with certificate based authentication is missing
(only
> support standard HTTP, no SSL)
> - No cookie support.
> - It opens a new socket for every RPC.
>
>
> Can somebody let me know if SOAP 2.2 or 2.3 has Proxy/Socks support?
This is
> the main concern I have. If not then presumably I must implement my
own Http
> Transport class?
>
> thanks, Joe.
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Issues with the HTTP implementation provided with Apache SOAP.

Posted by Joe Ryan <jo...@engitech.ie>.
I am curious about the HTTP implementation provided with Apache SOAP, as I
need to go through a proxy server.

Browsing the net I saw an article which pointed out the following isssues
with the HTTP implementation provided with Apache SOAP V2.0

- No Proxy/Socks support.
(If you need to use a http proxy or socks server to reach the server then it
won't work. Assumption is client can directly open a socket to the server.)

- HTTP Security support missing.
- HTTP/SSL support with certificate based authentication is missing (only
support standard HTTP, no SSL)
- No cookie support.
- It opens a new socket for every RPC.


Can somebody let me know if SOAP 2.2 or 2.3 has Proxy/Socks support? This is
the main concern I have. If not then presumably I must implement my own Http
Transport class?

thanks, Joe.



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Issues with the HTTP implementation provided with Apache SOAP.

Posted by Joe Ryan <jo...@engitech.ie>.
I am curious about the HTTP implementation provided with Apache SOAP, as I
need to go through a proxy server.

Browsing the net I saw an article which pointed out the following isssues
with the HTTP implementation provided with Apache SOAP V2.0

- No Proxy/Socks support.
(If you need to use a http proxy or socks server to reach the server then it
won't work. Assumption is client can directly open a socket to the server.)

- HTTP Security support missing.
- HTTP/SSL support with certificate based authentication is missing (only
support standard HTTP, no SSL)
- No cookie support.
- It opens a new socket for every RPC.


Can somebody let me know if SOAP 2.2 or 2.3 has Proxy/Socks support? This is
the main concern I have. If not then presumably I must implement my own Http
Transport class?

thanks, Joe.



Re: how to override code in SOAP-ENV:Server tag

Posted by Scott Nichol <sn...@scottnichol.com>.
<field> is not a string; it is a complex type (struct) with name and
error members.  I would imagine you would do

FaultField.java:

public class FaultField {
    public String name;
    public String error;
}

Your SOAP client:

    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    BeanSerializer deser = new BeanSerializer();
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,
        new QName("http://tempuri.org", "field"),
        FaultField.class, null, deser);

Your SOAP service:

    emit <field xsi:type="nsx:field" xmlns:nsx="http://tempuri.org">

Or, just stop adding this stuff and handle fault.getDetailEntries() as a
Vector of Element.

Scott Nichol

----- Original Message -----
From: "Omprakash Bachu" <om...@mphasis.com>
To: <so...@xml.apache.org>; <so...@xml.apache.org>
Cc: "Scott Nichol" <sn...@scottnichol.com>
Sent: Thursday, October 31, 2002 4:53 PM
Subject: RE: how to override code in
<faultcode>SOAP-ENV:Server</faultcode> tag


> Hi Scott, I'm setting xsi:type in the elements which you suggested.
But
> still finding null if I System.out.println( fault.getDetailEntries() )
where
> as if I see System.out.println(fault) then I can see at client side
its
> getting received below fault block.  This is some thing very similar
to, if
> I compare with addressbook example getAllListings which gives the
entire
> XML.  But where as fault.getDetailEntries() api is trying to make
Vector out
> of that detail block and its failing at that point in time.
>
>  Please correct me if I'm wrong, in this case why do we need to set
xsi:type
> for strings and map to BeanSerializer if they are supported by
default.
>
>  ...
> <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 xsi:type="xsd:string">
>      <name xsi:type="xsd:string">postDt</name>
>      <error xsi:type="xsd:string">date is not correct</error>
>     </field>
>  </detail>
> </SOAP-ENV:Fault>
>  ...
>
> thanks in advance
>  :o)m
>
> -----Original Message-----
> From: Scott Nichol [mailto:snicholnews@scottnichol.com]
> Sent: Wednesday, October 30, 2002 6:06 PM
> To: om@mphasis.com; soap-user@xml.apache.org
> Subject: Re: how to override code in
> <faultcode>SOAP-ENV:Server</faultcode> tag
>
>
> 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" <om...@mphasis.com>
> To: "Scott Nichol" <sn...@scottnichol.com>;
> <so...@xml.apache.org>; <om...@mphasis.com>
> 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: soap-user@xml.apache.org; om@mphasis.com
> > 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" <om...@mphasis.com>
> > To: <so...@xml.apache.org>; <ro...@sega.com>
> > 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: soap-user@xml.apache.org
> > > 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:
> > <ma...@xml.apache.org>
> > > > For additional commands, e-mail:
> > <ma...@xml.apache.org>
> > > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@xml.apache.org>
> > > For additional commands, e-mail:
> > <ma...@xml.apache.org>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@xml.apache.org>
> > > For additional commands, e-mail:
> > <ma...@xml.apache.org>
> > >
> > >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: how to override code in SOAP-ENV:Server tag

Posted by Scott Nichol <sn...@scottnichol.com>.
<field> is not a string; it is a complex type (struct) with name and
error members.  I would imagine you would do

FaultField.java:

public class FaultField {
    public String name;
    public String error;
}

Your SOAP client:

    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    BeanSerializer deser = new BeanSerializer();
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,
        new QName("http://tempuri.org", "field"),
        FaultField.class, null, deser);

Your SOAP service:

    emit <field xsi:type="nsx:field" xmlns:nsx="http://tempuri.org">

Or, just stop adding this stuff and handle fault.getDetailEntries() as a
Vector of Element.

Scott Nichol

----- Original Message -----
From: "Omprakash Bachu" <om...@mphasis.com>
To: <so...@xml.apache.org>; <so...@xml.apache.org>
Cc: "Scott Nichol" <sn...@scottnichol.com>
Sent: Thursday, October 31, 2002 4:53 PM
Subject: RE: how to override code in
<faultcode>SOAP-ENV:Server</faultcode> tag


> Hi Scott, I'm setting xsi:type in the elements which you suggested.
But
> still finding null if I System.out.println( fault.getDetailEntries() )
where
> as if I see System.out.println(fault) then I can see at client side
its
> getting received below fault block.  This is some thing very similar
to, if
> I compare with addressbook example getAllListings which gives the
entire
> XML.  But where as fault.getDetailEntries() api is trying to make
Vector out
> of that detail block and its failing at that point in time.
>
>  Please correct me if I'm wrong, in this case why do we need to set
xsi:type
> for strings and map to BeanSerializer if they are supported by
default.
>
>  ...
> <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 xsi:type="xsd:string">
>      <name xsi:type="xsd:string">postDt</name>
>      <error xsi:type="xsd:string">date is not correct</error>
>     </field>
>  </detail>
> </SOAP-ENV:Fault>
>  ...
>
> thanks in advance
>  :o)m
>
> -----Original Message-----
> From: Scott Nichol [mailto:snicholnews@scottnichol.com]
> Sent: Wednesday, October 30, 2002 6:06 PM
> To: om@mphasis.com; soap-user@xml.apache.org
> Subject: Re: how to override code in
> <faultcode>SOAP-ENV:Server</faultcode> tag
>
>
> 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" <om...@mphasis.com>
> To: "Scott Nichol" <sn...@scottnichol.com>;
> <so...@xml.apache.org>; <om...@mphasis.com>
> 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: soap-user@xml.apache.org; om@mphasis.com
> > 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" <om...@mphasis.com>
> > To: <so...@xml.apache.org>; <ro...@sega.com>
> > 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: soap-user@xml.apache.org
> > > 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:
> > <ma...@xml.apache.org>
> > > > For additional commands, e-mail:
> > <ma...@xml.apache.org>
> > > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@xml.apache.org>
> > > For additional commands, e-mail:
> > <ma...@xml.apache.org>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@xml.apache.org>
> > > For additional commands, e-mail:
> > <ma...@xml.apache.org>
> > >
> > >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>