You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by David Blevins <da...@visi.com> on 2005/06/25 04:09:55 UTC

SOAPMessage vs. SOAPException in SOAPConnectionImpl

Hey all,

Dealing with a very interesting failure.   It seems that anytime you use a SOAPConnection to make a call, you only get a fault back if the the server sent it.  Anything that would be a valid fault as per the WSI basic profile is rewrapped as a SOAPException and the fault codes are lost.

SOAPConnectionImpl.java 
-----------------------------
    public SOAPMessage call(SOAPMessage request, Object endpoint) throws SOAPException {
	...
        try {
            Call call = new Call(endpoint.toString());
	    ...
            call.invoke((Message) request);
            return call.getResponseMessage();
        } catch (java.net.MalformedURLException mue){
            throw new SOAPException(mue);
        } catch (org.apache.axis.AxisFault af){
            throw new SOAPException(af);
        }
    }
-----------------------------

Shouldn't this code create a SOAPMessage containing the fault rather than rewrap and throw it as a SOAPException?

Thanks,
David

Re: SOAPMessage vs. SOAPException in SOAPConnectionImpl

Posted by Davanum Srinivas <da...@gmail.com>.
did it work?

-- dims

On 6/24/05, David Blevins <da...@visi.com> wrote:
> That's what I did, but seemed way too simple.  Thought I may have missed something or maybe there was some rule I wasn't aware of.
> 
> Submitted a patch:
>   http://issues.apache.org/jira/browse/AXIS-2087
> 
> 
> Thanks!
> 
> David
> 
> 
> On Fri, Jun 24, 2005 at 10:20:44PM -0400, Davanum Srinivas wrote:
> > try
> >
> > "return new Message(af);" instead of "throw new SOAPException(af);"
> > and see if that helps.
> >
> > -- dims
> >
> > On 6/24/05, David Blevins <da...@visi.com> wrote:
> > > Hey all,
> > >
> > > Dealing with a very interesting failure.   It seems that anytime you use a SOAPConnection to make a call, you only get a fault back if the the server sent it.  Anything that would be a valid fault as per the WSI basic profile is rewrapped as a SOAPException and the fault codes are lost.
> > >
> > > SOAPConnectionImpl.java
> > > -----------------------------
> > >     public SOAPMessage call(SOAPMessage request, Object endpoint) throws SOAPException {
> > >         ...
> > >         try {
> > >             Call call = new Call(endpoint.toString());
> > >             ...
> > >             call.invoke((Message) request);
> > >             return call.getResponseMessage();
> > >         } catch (java.net.MalformedURLException mue){
> > >             throw new SOAPException(mue);
> > >         } catch (org.apache.axis.AxisFault af){
> > >             throw new SOAPException(af);
> > >         }
> > >     }
> > > -----------------------------
> > >
> > > Shouldn't this code create a SOAPMessage containing the fault rather than rewrap and throw it as a SOAPException?
> > >
> > > Thanks,
> > > David
> > >
> >
> >
> > --
> > Davanum Srinivas -http://blogs.cocoondev.org/dims/
> 


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/

Re: SOAPMessage vs. SOAPException in SOAPConnectionImpl

Posted by David Blevins <da...@visi.com>.
That's what I did, but seemed way too simple.  Thought I may have missed something or maybe there was some rule I wasn't aware of.

Submitted a patch:
  http://issues.apache.org/jira/browse/AXIS-2087


Thanks!

David


On Fri, Jun 24, 2005 at 10:20:44PM -0400, Davanum Srinivas wrote:
> try 
> 
> "return new Message(af);" instead of "throw new SOAPException(af);"
> and see if that helps.
> 
> -- dims
> 
> On 6/24/05, David Blevins <da...@visi.com> wrote:
> > Hey all,
> > 
> > Dealing with a very interesting failure.   It seems that anytime you use a SOAPConnection to make a call, you only get a fault back if the the server sent it.  Anything that would be a valid fault as per the WSI basic profile is rewrapped as a SOAPException and the fault codes are lost.
> > 
> > SOAPConnectionImpl.java
> > -----------------------------
> >     public SOAPMessage call(SOAPMessage request, Object endpoint) throws SOAPException {
> >         ...
> >         try {
> >             Call call = new Call(endpoint.toString());
> >             ...
> >             call.invoke((Message) request);
> >             return call.getResponseMessage();
> >         } catch (java.net.MalformedURLException mue){
> >             throw new SOAPException(mue);
> >         } catch (org.apache.axis.AxisFault af){
> >             throw new SOAPException(af);
> >         }
> >     }
> > -----------------------------
> > 
> > Shouldn't this code create a SOAPMessage containing the fault rather than rewrap and throw it as a SOAPException?
> > 
> > Thanks,
> > David
> > 
> 
> 
> -- 
> Davanum Srinivas -http://blogs.cocoondev.org/dims/

Re: SOAPMessage vs. SOAPException in SOAPConnectionImpl

Posted by Davanum Srinivas <da...@gmail.com>.
try 

"return new Message(af);" instead of "throw new SOAPException(af);"
and see if that helps.

-- dims

On 6/24/05, David Blevins <da...@visi.com> wrote:
> Hey all,
> 
> Dealing with a very interesting failure.   It seems that anytime you use a SOAPConnection to make a call, you only get a fault back if the the server sent it.  Anything that would be a valid fault as per the WSI basic profile is rewrapped as a SOAPException and the fault codes are lost.
> 
> SOAPConnectionImpl.java
> -----------------------------
>     public SOAPMessage call(SOAPMessage request, Object endpoint) throws SOAPException {
>         ...
>         try {
>             Call call = new Call(endpoint.toString());
>             ...
>             call.invoke((Message) request);
>             return call.getResponseMessage();
>         } catch (java.net.MalformedURLException mue){
>             throw new SOAPException(mue);
>         } catch (org.apache.axis.AxisFault af){
>             throw new SOAPException(af);
>         }
>     }
> -----------------------------
> 
> Shouldn't this code create a SOAPMessage containing the fault rather than rewrap and throw it as a SOAPException?
> 
> Thanks,
> David
> 


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/