By the way, I think I used to use: < bean ref="StoreLoadBean" method="loadRetailStoreDataFromMap"/>
On Tue, Sep 27, 2016 at 6:26 PM, Brad Johnson <[email protected]> wrote: > I'm going to assume that the method named there is on the bean. The log > messages may be getting ignored due to the logger not being set up > correctly. You can temporarily replace with System.out until you have time > to go back and make sure the logger is setup up correctly. As for the > loading of the bean, try instead of: > > <to uri="bean:StoreLoadBean?method=loadRetailStoreDataFromMap"/> > > <to uri="StoreLoadBean?method=loadRetailStoreDataFromMap"/> > > You could also try: > <method ref="StoreLoadBean" method="loadRetailStoreDataFromMap"/> > > You may not even need to specify the method depending on what the data > type it is getting and if it matches only one method on your bean. > > I've switched lately from using blueprint XML to the Java DSL so trying to > dredge that up in my memory is a little difficult. > > On Tue, Sep 27, 2016 at 5:12 PM, jeffz <[email protected]> wrote: > >> Hi Ranx, >> >> You are correct that I need to get call a web service, get the response, >> transform it, and send it to another system. The integration gets >> information about stores and forwards it to a marketing system. We are >> making the change because the database is going away. >> >> Old: AutoStart -> Query database for store info -> Format & Send >> New: AutoStart -> Hit URL for store info -> Format & Send >> >> My route replaces autostart with a queue so that I can test. I built two >> routes (one to call the service, the other to format), because I kept >> getting stream closed when trying to unmarshal the web service response. >> >> When I hit the http4{url}, I am getting back a JSON string as a result; so >> that part is working. >> if I use the below defined "jack" bean, it will unmarshal the message and >> appears to invoke the java bean. I say appears because all of my log >> statements inside the java method are ignored. >> >> If I use the "tst" bean, pointing to my java POJO, the route won't even >> start. There, I get: Caused by: java.lang.IllegalArgumentException: >> Cannot >> find data format in registry with ref: tst >> >> >> Here is my trace from the jack invocation >> 8 >>> (route665) bean://LoadBean?method=loadRetailStoreDataFromMap --> >> log[complete] <<< Pattern:InOnly, Headers:{Transfer-Encoding=chunked, >> JMSPriority=4, Cache-Control=max-age=86400, JMSDeliveryMode=2, >> JMSXGroupID=null, JMSTimestamp=1475007004112, JMSMessageID=ID:, >> Content-Type=application/json, JMSRedelivered=false, >> X-Powered-By=Servlet/3.0, JMSType=null, Content-Language=en-US, >> JMSReplyTo=null, CamelHttpResponseCode=200, JMSCorrelationID=null, >> Connection=Keep-Alive, Keep-Alive=timeout=15, JMSExpiration=0, >> JMSDestination=queue://retailout, Vary=Accept,Accept-Encoding, Date=Tue, >> 27 >> Sep 2016 20:10:04 GMT, Expires=Wed, 28 Sep 2016 20:10:04 GMT, >> breadcrumbId=ID-}, BodyType:java.util.HashMap, Body:{recordSetTotal=2, >> recordSetCount=2, resourceId=http:url, recordSetComplete=true, >> recordSetStartNumber=0, PhysicalStore=[{telephone1=(444)444-4444 >> , addressLine=[123 Fake Street, Square Shopping Center], >> Description=[{displayStoreName=GARY, fullImage=store_82.jpg}], >> stateOrProvinceName=NC, storeName=GARY, postalCode=12344 >> , Attribute=[{name=StoreHours, value=10:00AM-7:00PM Monday-Friday, >> displayName=Store hours, displayValue=10:00AM-8:00PM Monday- >> Friday<br/>10:00AM-8:00PM Saturday<br/>12:00PM-6:00PM Sunday<br/>All >> stores >> closed Thanksgiving Day and Christmas Day.}, {name=StoreIdentifier, >> value=082, displayName=StoreIdentifier, displayValue=082}, {name=Type, >> value=Regular Store, displayName=Type, displayValue=Regular Store}], >> uniqueID=11557, longitude=-78.76756, latitude=35.77546, city=Gary, >> country=US... [Body clipped after 1000 chars, total length is 1811] >> >> >> >> -- >> View this message in context: http://camel.465427.n5.nabble. >> com/Help-with-JSON-to-POJO-using-XML-Routes-tp5788130p5788139.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> > >
