All,

I'm a newbie into ServiceMix but have a backgroup in IIB, WESB and (to a
lesser extent) Mule.  However, ServiceMix has been more java than I am
accustomed to and it has me flummoxed.  Of course, all of this is happening
under a deadline and I've reached the end of what google has to tell me.

My task is most likely pretty simple, but I'm thrown by some of the
particulars.  I'm trying to pull a message from a queue, call a webservice
and process the result(JSON) using a java class.  The first two things are
done, but when I try to unmarshal the JSON, I keep getting a stream closed
exception.  If I pass the JSON directly into the queue and avoid the WS
altogether, I can unmarshal the message.  (Still working out how to read it
as part of the exchange)

We are running ServiceMix 4.4.2 on Linux with Rational Application Developer
as the IDE.  As far as I know, I cannot debug ServiceMix code using RAD.

My route looks like this:

                <route>
                        <from uri="activemq:test"/>
                        <to uri="http4://{{websphere.wc.retailStore.url}}"/>
                        <to uri="log:output"/>
                        <log message="unmarshalling message"/>
                        <unmarshal ref="jack"/>   <---------------Fails here
                        <log message="unmarshalling complete"/>
                        <log message="${body}"/>
                        <to uri="bean:JavaBean?method=methodName"/>
                </route>

               <bean id="jack"
class="org.apache.camel.component.jackson.JacksonDataFormat">
               </bean>  
I've create POJO for my JSON, but have read I don't really have to.

Here is a stripped down response from the web service.

{​"​d​a​t​a​L​i​s​t​"​:​
[​
{​"​r​e​c​o​r​d​S​e​t​T​o​t​a​l​"​:​"​0​"​,​"​r​e​c​o​r​d​S​e​t​C​o​u​n​t​"​:​"​0​"​,​"​r​e​s​o​u​r​c​e​I​d​"​:​"http://redacted.com​"​,​"​r​e​c​o​r​d​S​e​t​C​o​m​p​l​e​t​e​"​:​"​t​r​u​e​"​,​"​r​e​c​o​r​d​S​e​t​S​t​a​r​t​N​u​m​b​e​r​"​:​"​0​"​,​"​r​e​s​o​u​r​c​e​N​a​m​e​"​:​"​s​t​o​r​e​l​o​c​a​t​o​r​"​}​,
​{​"​r​e​c​o​r​d​S​e​t​T​o​t​a​l​"​:​"​1​"​,​"​r​e​c​o​r​d​S​e​t​C​o​u​n​t​"​:​"​1​"​,​"​r​e​s​o​u​r​c​e​I​d​"​:​"​http://redacted.com​"​,​"​r​e​c​o​r​d​S​e​t​C​o​m​p​l​e​t​e​"​:​"​t​r​u​e​"​,​"​r​e​c​o​r​d​S​e​t​S​t​a​r​t​N​u​m​b​e​r​"​:​"​0​"​,​"​P​h​y​s​i​c​a​l​S​t​o​r​e​"​:​[​{​"​t​e​l​e​p​h​o​n​e​1​"​:​"​(555​)555​-5555​
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​"​,​"​a​d​d​r​e​s​s​L​i​n​e​"​:​[​"​123
Fake
Street"​,​"Somewhere​"​]​,​"​D​e​s​c​r​i​p​t​i​o​n​"​:​[​{​"​d​i​s​p​l​a​y​S​t​o​r​e​N​a​m​e​"​:​"FAKE"​,​"​f​u​l​l​I​m​a​g​e​"​:​"​s​t​o​r​e​_​8​2​.​j​p​g​"​}​]​,​"​s​t​a​t​e​O​r​P​r​o​v​i​n​c​e​N​a​m​e​"​:​"​N​C​"​,​"​s​t​o​r​e​N​a​m​e​"​:​"FAKE"​,​"​p​o​s​t​a​l​C​o​d​e​"​:​"12345
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​
​"​,​"​A​t​t​r​i​b​u​t​e​"​:​[​{​"​n​a​m​e​"​:​"​S​t​o​r​e​H​o​u​r​s​"​,​"​v​a​l​u​e​"​:​"​1​0​:​0​0​A​M​-​7​:​0​0​P​M​
​M​o​n​d​a​y​-​F​r​i​d​a​y​"​,​"​d​i​s​p​l​a​y​N​a​m​e​"​:​"​S​t​o​r​e​
​h​o​u​r​s​"​,​"​d​i​s​p​l​a​y​V​a​l​u​e​"​:​"​1​0​:​0​0​A​M​-​8​:​0​0​P​M​
​M​o​n​d​a​y​-​ ​F​r​i​d​a​y​<​b​r​\​/​>​1​0​:​0​0​A​M​-​8​:​0​0​P​M​
​S​a​t​u​r​d​a​y​<​b​r​\​/​>​1​2​:​0​0​P​M​-​6​:​0​0​P​M​
​S​u​n​d​a​y​<​b​r​\​/​>​A​l​l​ ​s​t​o​r​e​s​ ​c​l​o​s​e​d​
​T​h​a​n​k​s​g​i​v​i​n​g​ ​D​a​y​ ​a​n​d​ ​C​h​r​i​s​t​m​a​s​
​D​a​y​.​"​}​,​{​"​n​a​m​e​"​:​"​S​t​o​r​e​I​d​e​n​t​i​f​i​e​r​"​,​"​v​a​l​u​e​"​:​"​0​8​2​"​,​"​d​i​s​p​l​a​y​N​a​m​e​"​:​"​S​t​o​r​e​I​d​e​n​t​i​f​i​e​r​"​,​"​d​i​s​p​l​a​y​V​a​l​u​e​"​:​"​0​8​2​"​}​,​{​"​n​a​m​e​"​:​"​T​y​p​e​"​,​"​v​a​l​u​e​"​:​"​R​e​g​u​l​a​r​
​S​t​o​r​e​"​,​"​d​i​s​p​l​a​y​N​a​m​e​"​:​"​T​y​p​e​"​,​"​d​i​s​p​l​a​y​V​a​l​u​e​"​:​"​R​e​g​u​l​a​r​
​S​t​o​r​e​"​}​]​,​"​u​n​i​q​u​e​I​D​"​:​"44444"​,​"​l​o​n​g​i​t​u​d​e​"​:​"​-​4​8​.​444​5​6​"​,​"​l​a​t​i​t​u​d​e​"​:​"​23​.2333​6​"​,​"​c​i​t​y​"​:​"Fake"​,​"​c​o​u​n​t​r​y​"​:​"​U​S​A​"​}​]​,​"​r​e​s​o​u​r​c​e​N​a​m​e​"​:​"​s​t​o​r​e​l​o​c​a​t​o​r​"​}​
]​}




--
View this message in context: 
http://servicemix.396122.n5.nabble.com/Reading-Web-Service-Response-tp5724020.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Reply via email to