spring-integration

ID Attribute missing while marshaling during webservicetemplate.convertandsend(…)

女生的网名这么多〃 提交于 2019-12-25 12:46:38
问题 I am using jaxb2Marshaller for consuming a SOAP service. I am using it inside Spring webServiceTemplate. The marhsalling works fine on windows but not on linux. The issue only comes for attribute named "ID". Changing the attribute name to "id" or something else works fine. Is there any difference between marshaling done on windows and linux? Spring WebserviceTemplate configuration: <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate"> <property name=

Rest Template - XML Indentation

♀尐吖头ヾ 提交于 2019-12-25 12:07:14
问题 I need my generated XML to be indented with new lines and tabs when using Rest Template in Spring Boot application. How can I set the indentation property of JAXB Marshaller in this REST Template. Spring REST template code: HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_XML); headers.add("Authorization", "Basic " + Base64Utility.encode(userAndPass.getBytes())); Xml documentDefinition = myfactory.createObjects(StudentBean, ClassBean, CollegeBean);

Context of class with listener - spring-rabbitmq, internals and injecting beans based on contain of message

依然范特西╮ 提交于 2019-12-25 09:47:40
问题 I am using spring-boot and spring-rabbitmq package. I have some config class and class representing client. This client class has one listener annotated with @RabbitListener . Everything is fine with my config and client - it does work. However, I need to know some details about internals of this client class. Is something special set in a context ? I would like to be able to inject one of three available datasources (three beans). I mean that I would like to be able based on the first symbol

DataAccessException not wrapped in MessagingException

≯℡__Kan透↙ 提交于 2019-12-25 09:19:42
问题 This is a follow up question to this post The flow looks like this: <int:channel id="myapp.input"> <int:queue/> </int:channel> <int:channel id="myapp.output"> <int:queue/> </int:channel> <int:chain input-channel="myapp.input" output-channel="myapp.output"> <int:poller error-channel="baseFlow.error"> <int:transactional/> </int:poller> <int:service-activator ref="jmsService1"/> <int:service-activator ref="dbService2"/> <int:service-activator ref="jmsService2"/> <int:service-activator ref=

How to set the override on a compound trigger?

你离开我真会死。 提交于 2019-12-25 08:49:25
问题 I have a Spring integration application that normally polls daily for a file via SFTP using a cron trigger. But if it doesn't find the file it expects, it should poll every x minutes via a periodic trigger until y attempts. To do this I use the following component: @Component public class RetryCompoundTriggerAdvice extends AbstractMessageSourceAdvice { private final static Logger logger = LoggerFactory.getLogger(RetryCompoundTriggerAdvice.class); private final CompoundTrigger compoundTrigger;

Spring-Integration-Kafka outbound-channel-adapter Send message

江枫思渺然 提交于 2019-12-25 08:30:09
问题 Using Spring-Integration-Kafka, With outbound-channel-adapter I am trying to send messages to a topic with name " test " Through command line terminal, I started zookeeper, kafka and created topic with name "test" Spring XML configuration <int:publish-subscribe-channel id="inputToKafka" /> <int-kafka:outbound-channel-adapter id="kafkaOutboundChannelAdapter" auto-startup="false" channel="inputToKafka" kafka-template="template" sync="true" topic="test"> </int-kafka:outbound-channel-adapter>

How to overcome Invalid token character caused by Content-Type=[text/xml; subtype=gml/2.1.2] in Spring HttpMessageConverterExtractor?

最后都变了- 提交于 2019-12-25 08:25:13
问题 I'm stuck at exception java.lang.IllegalArgumentException: Invalid token character '/' in token "gml/2.1.2" at org.springframework.http.MediaType.checkToken(MediaType.java:354) I'm using Spring Integration 3.0 RC1 and http outbound gateway to send request to Geoserver. Unfortunately the exception is thrown from inside of org.springframework.web.client.RestTemplate which I cannot override (outbound gateway manages it), so it's to deep for me to change the headers by some HeaderMapper as I've

how to resolve Dispatcher has no subscribers for channel?

不羁岁月 提交于 2019-12-25 07:58:41
问题 my configuration is as below , i am getting no subscriber exception , how can i resolve ? <bean id="Beani" class="org.util.Beani" init-method="init" /> <int:gateway id="configHelper" service-interface="org.ncb.quickpay.grs.util.PartnerConfigReader" default-request-timeout="5000" default-reply-timeout="5000"> <int:method name="getConfiguration" request-channel="configChannel" /> </int:gateway> <int-jpa:retrieving-outbound-gateway entity-manager="entityManager" request-channel="configChannel"

SpringXD: ClassCastException of same class between modules in a stream

五迷三道 提交于 2019-12-25 07:52:02
问题 I have a custom Spring XD source module that uses Spring Social for Twitter and outputs Tweet objects. This is working just fine. I can log the output of the source and see the Tweet objects listed. I can change the output type of the source for that stream to application/json to see the output at JSON. This works as expected. I then created a processor module that will create a new object from that Tweet and output it. The transform message expects a GenericMessage containing a Tweet object

Messages are not requeue-ing on thrown exception

狂风中的少年 提交于 2019-12-25 06:45:03
问题 I am using Spring Integration 4.1.2.RELEASE Spring AMQP 1.4.3.RELEASE When an exception is thrown, I am expecting the message to be requeued. I believe that I have all the conditions met for this as I gleaned from this post In the post, I learned that there are three conditions to ensure a requeue: 1) The acknowledge-mode must be AUTO. 2) The requeue-rejected must be TRUE. 3) Throw any exception BUT AmqpRejectAndDontRequeueException . I believe I am meeting these conditions in some test code