camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Custom soap fault -adding more element
Date Fri, 28 Mar 2014 05:43:15 GMT
You need to build the soap fault object yourself.
Here is an example.

from(serviceURI).process(new Processor() {
                    public void process(final Exchange exchange) throws Exception
{
                        // set the fault message here
                        org.apache.camel.wsdl_first.types.UnknownPersonFault faultDetail
= new org.apache.camel.wsdl_first.types.UnknownPersonFault();
                        faultDetail.setPersonId("");
                        UnknownPersonFault fault = new UnknownPersonFault("Get
the null value of person name", faultDetail);
                        throw fault;
                    }
                }).to("log:myfaultlog");

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 28, 2014 at 1:39:12 PM, Gnanaguru S (gnanagurus@gmail.com) wrote:
> Hi Willem,
>  
> I am not using soap component. I am using CXF component.
>  
> I have set my fault body in my camel spring xml, but not sure how to set
> fault detail and fault actors. Any clues on my route below ?
>  
>  
>  
>  
>  
>  
> ${in.header.SOAPAction} contains
> '"http://test/test1/Enquiry"'
>  
>  
>  
>  
> Operation not yet implemented
>  
>  
>  
>  
>  
> Regards
> Guru
> gnanaguru.com
>  
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Custom-soap-fault-adding-more-element-tp5749431p5749464.html
 
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  


Mime
View raw message