Was my question too complex? Too simple? I really feel at a loss as to the solution as I feel I have tried several different options with no real luck. I would truly appreciate any help. Thanks very much in advance.
--- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring & Agile Consulting p. (855) BASE-LOGIC: (227-3564-42) p. (478) BASE-LOGIC (227-3564-42) f. (855) BASE-LOGIC: (227-3564-42) Website: http://www.baselogic.com Blog: http://www.baselogic.com/blog/ Linked IN: http://linkedin.com/in/mickknutson Twitter: http://twitter.com/mickknutson --- On Mon, Jun 13, 2011 at 10:53 AM, Mick Knutson <mknut...@baselogic.com>wrote: > I started with the camel-example-cxf from SVN and have the JAXWSClient and > JAXRSClient working to send a custom Object into Camel: > > from(REST_ENDPOINT_URI).routeId("REST_ENDPOINT_URI") > .process(new MappingProcessor(new > EventProcessorImpl(true))) > .wireTap(INPUT_CALL_SESSION).end() > ; > > What I want to do is take the CallSession object I am trying to pass in, > then: > > 1. Marshal to JSON like: > from(INPUT_CALL_SESSION).routeId("INPUT_CALL_SESSION") > .marshal().json(JsonLibrary.Jackson) > .to(INPUT_MARSHALED) > ; > > > > 2. UnMarshal from JSON back to a CallSession and use via a bean, and write > the JSON to a file like: > > from(INPUT_PROCESSED).routeId("INPUT_PROCESSED") > //.unmarshal().json().bean(new ValidationProcessor()) > .unmarshal(jacksonDataFormat).bean(new > ValidationProcessor()) > > .setHeader(Exchange.FILE_NAME, > constant(PROCESSED_FILE_NAME)) > .multicast() > .to(MOCK_RESULT, PROCESSED_FILE_DIR) > ; > > So when I us *.marshal().json() *and write to a file, I get something > like: > > > {"com.comcast.ivr.core.domain.CallSession":{"callProgression":{"@class":"linked-list"},"browserType":"AVAYA","dasSessionId":"3dceda7c-e04c-4fd0-9052- > > Then try to unmarshal with *.unmarshal().json().bean(new > ValidationProcessor())*, I get roll backs and no files written. > > > Next when I us *.marshal().json(JsonLibrary.Jackson)* and write to a file, > I get something like: > > > {"duration":0,"dasSessionId":"90d2a3e1-0535-4896-a74e-a077d27c3245","asyncResultsContainer":{"queryOutagesFuture":null},"lastCallProgressionState":null,"techSupportFunctionalArea":null, > > Then try to unmarshal with *.unmarshal().json(JsonLibrary.Jackson).bean(new > ValidationProcessor())*, I get roll backs and no files written. > > > > Then when I us *.marshal().json(jacksonDataFormat)* using this mapper: > > JacksonDataFormat jacksonDataFormat = new JacksonDataFormat(); > jacksonDataFormat.getObjectMapper().configure( > SerializationConfig.Feature.INDENT_OUTPUT, true); > jacksonDataFormat.getObjectMapper() > .enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); > jacksonDataFormat.getObjectMapper().viewWriter(CallSession.class); > > and write to a file, I get something like: > > [ "com.comcast.ivr.core.domain.CallSession", { > "duration" : 0, > "dasSessionId" : "2c1fb05a-f6d7-434f-b62d-73ce4244fc9e", > > Then try to unmarshal with *.unmarshal().json(jacksonDataFormat).bean(new > ValidationProcessor())*, I get roll backs and no files written. > > > > > > Can someone help me get this simple CXF to JSON to CallSession Object > example working and shed some light on what I seem to be missing here? > > Thanks in advance > > > --- > Thank You… > > Mick Knutson, President > > BASE Logic, Inc. > Enterprise Architecture, Design, Mentoring & Agile Consulting > p. (855) BASE-LOGIC: (227-3564-42) > p. (478) BASE-LOGIC (227-3564-42) > f. (855) BASE-LOGIC: (227-3564-42) > > Website: http://www.baselogic.com > Blog: http://www.baselogic.com/blog/ > Linked IN: http://linkedin.com/in/mickknutson > Twitter: http://twitter.com/mickknutson > --- > >