You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by nono <ya...@db-is.com> on 2014/01/10 20:32:52 UTC
camel-cxf problem exception
Dear all,I encounter a camel-cxf 's cxf:bean problemit seems , it works with
return type as pojo but failed with ListI got example at karaf like Below.
Could anyone give some hints?Thanks in advance!WARNING: Interceptor for
{http://ws.foo.com/}FileServiceService#{http://ws.fuse.emerald.dbis.com/}getPDFs
has thrown exception, unwinding noworg.apache.cxf.interceptor.Fault
at
org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:107)
at
org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:26Below
are my blueprint and example
code##################################################################define
web service Endpoint //define route , using cxf:bean , the real
web service will be implemented by com.foo.camel.FileProcessor
public class FileProcessor implements Processor { @Override public
void process(Exchange exchng) throws Exception { //
....... it works with return type as pojo but failed with List
// List fileList = results;
exchng.getOut().setBody( fileList ); } catch (Exception e) {
throw new FileNotFoundException("Something goes wrong in "
+this.getClass().getName(), e); } }}// proxy web serivce, cxf:bean
refers to itimport javax.jws.WebMethod;import javax.jws.WebParam;import
javax.jws.WebResult;import javax.jws.WebService;import java.util.List;/** *
*/@WebServicepublic class FileService { /** * Web service operation
*/ @WebMethod(operationName = "getfile") @WebResult(name = "file")
public ReceivedPDF getfile(@WebParam(name = "fileName") String fileName)
throws Exception{ //TODO write your implementation code here:
return null; } /** * Web service operation */
@WebMethod(operationName = "getfiles") @WebResult(name = "files")
public List getfiles(@WebParam(name = "fileNames") List fileNames) throws
Exception{ return null; } }
--
View this message in context: http://camel.465427.n5.nabble.com/camel-cxf-problem-exception-tp5745851.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-cxf problem exception
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
I don’t found the getPDFs operation for the SEI.
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On January 11, 2014 at 4:15:46 PM, nono (yan.wang@db-is.com) wrote:
>
> Dear all,I encounter a camel-cxf 's cxf:bean problemit seems
> , it works with
> return type as pojo but failed with ListI got example at karaf
> like Below.
> Could anyone give some hints?Thanks in advance!WARNING: Interceptor
> for
> {http://ws.foo.com/}FileServiceService#{http://ws.fuse.emerald.dbis.com/}getPDFs
> has thrown exception, unwinding noworg.apache.cxf.interceptor.Fault
> at
> org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:107)
> at
> org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:26Below
> are my blueprint and example
> code##################################################################define
> web service Endpoint //define route , using cxf:bean , the real
> web service will be implemented by com.foo.camel.FileProcessor
> public class FileProcessor implements Processor { @Override
> public
> void process(Exchange exchng) throws Exception { //
> ....... it works with return type as pojo but failed with List
> // List fileList = results;
> exchng.getOut().setBody( fileList ); } catch (Exception e)
> {
> throw new FileNotFoundException("Something goes wrong in
> "
> +this.getClass().getName(), e); } }}// proxy web serivce,
> cxf:bean
> refers to itimport javax.jws.WebMethod;import javax.jws.WebParam;import
> javax.jws.WebResult;import javax.jws.WebService;import
> java.util.List;/** *
> */@WebServicepublic class FileService { /** * Web service operation
> */ @WebMethod(operationName = "getfile") @WebResult(name
> = "file")
> public ReceivedPDF getfile(@WebParam(name = "fileName")
> String fileName)
> throws Exception{ //TODO write your implementation code here:
> return null; } /** * Web service operation */
> @WebMethod(operationName = "getfiles") @WebResult(name
> = "files")
> public List getfiles(@WebParam(name = "fileNames") List fileNames)
> throws
> Exception{ return null; } }
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-cxf-problem-exception-tp5745851.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-cxf problem exception
Posted by nono <ya...@db-is.com>.
I tried. it does not work
--
View this message in context: http://camel.465427.n5.nabble.com/camel-cxf-problem-exception-tp5745851p5746473.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-cxf problem exception
Posted by Sanjay Bhattacharya <sa...@gmail.com>.
You can do this:
MessageContentsList msgContentList =
exchange.getOut().getBody(MessageContentsList.class);
msgContentList.add(fileList);
Thanks,
Sanjay
On Sat, Jan 11, 2014 at 1:02 AM, nono <ya...@db-is.com> wrote:
> Dear all,I encounter a camel-cxf 's cxf:bean problemit seems , it works
> with
> return type as pojo but failed with ListI got example at karaf like Below.
> Could anyone give some hints?Thanks in advance!WARNING: Interceptor for
> {
> http://ws.foo.com/}FileServiceService#{http://ws.fuse.emerald.dbis.com/}getPDFs
> has thrown exception, unwinding noworg.apache.cxf.interceptor.Fault
> at
>
> org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:107)
> at
>
> org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
> at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at
>
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
> at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:26Below
> are my blueprint and example
>
> code##################################################################define
> web service Endpoint //define route , using cxf:bean , the real
> web service will be implemented by com.foo.camel.FileProcessor
> public class FileProcessor implements Processor { @Override public
> void process(Exchange exchng) throws Exception { //
> ....... it works with return type as pojo but failed with List
> // List fileList = results;
> exchng.getOut().setBody( fileList ); } catch (Exception e) {
> throw new FileNotFoundException("Something goes wrong in "
> +this.getClass().getName(), e); } }}// proxy web serivce,
> cxf:bean
> refers to itimport javax.jws.WebMethod;import javax.jws.WebParam;import
> javax.jws.WebResult;import javax.jws.WebService;import java.util.List;/** *
> */@WebServicepublic class FileService { /** * Web service operation
> */ @WebMethod(operationName = "getfile") @WebResult(name = "file")
> public ReceivedPDF getfile(@WebParam(name = "fileName") String fileName)
> throws Exception{ //TODO write your implementation code here:
> return null; } /** * Web service operation */
> @WebMethod(operationName = "getfiles") @WebResult(name = "files")
> public List getfiles(@WebParam(name = "fileNames") List fileNames) throws
> Exception{ return null; } }
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-cxf-problem-exception-tp5745851.html
> Sent from the Camel - Users mailing list archive at Nabble.com.