Soap Requests不适用于Apache Camel http4组件,为什么?

时间:2015-04-14 14:39:30

标签: spring apache apache-camel

我在使用带有http4组件的SOAP Web服务时遇到问题。我得到Socket expcetion。

以下是我的详细信息。

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:camel="http://camel.apache.org/schema/spring"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
       ">

    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
    <bean id="myNameStrategy" class="org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy">
        <constructor-arg value="com.inova_software.vap.webservice.dataservice.definition.DataService"/>
        <constructor-arg value="true"/>
    </bean>

    <camelContext xmlns="http://camel.apache.org/schema/spring">
        <camel:template id="camelTemplate"/>
        <dataFormats>
            <jaxb id="myJaxb" prettyPrint="true"
                  contextPath="com.inova_software.vap.webservice.dataservice.definition"/>
            <soapjaxb id="soapJaxb" contextPath="com.inova_software.vap.webservice.dataservice.definition" elementNameStrategyRef="myNameStrategy"/>
        </dataFormats>

        <route>
            <from uri="direct:start"/>
            <marshal ref="soapJaxb"/>
            <to uri="https://xx.xx.com/xx-deal-xx/xx-xx/ctx/authbasic/ws/DataService?authMethod=Basic&amp;authUsername=xxxxx&amp;authPassword=xxxxxx&amp;authHost=https://xxxxx.com/xx-deal-xx/xx-xx/ctx/authbasic/ws/DataService"/>
            <unmarshal ref="soapJaxb"/>
        </route>
    </camelContext>
</beans>

我使用它时遇到了麻烦。我得到以下异常,但如果我使用https它的工作原理。 但是该项目要求这两个Web服务一起存在。

  

引起:   org.apache.camel.component.http4.HttpOperationFailedException:HTTP   操作失败调用   https://xxx.xxxx.com/xxxx-deal-xx/xx-xx/ctx/authbasic/ws/DataService?authMethod=Basic   statusCode:500 at   org.apache.camel.component.http4.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:236)     在   org.apache.camel.component.http4.HttpProducer.process(HttpProducer.java:163)     在   org.apache.camel.util.AsyncProcessorConverterHelper $ ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)     在   org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)     在   org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)     在   org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)     在   org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)     在org.apache.camel.processor.Pipeline.process(Pipeline.java:118)at   org.apache.camel.processor.Pipeline.process(Pipeline.java:80)at   org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)     在   org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)     在   org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)     在   org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:74)     在   org.apache.camel.impl.ProducerCache $ 2.doInProducer(ProducerCache.java:375)     在   org.apache.camel.impl.ProducerCache $ 2.doInProducer(ProducerCache.java:343)     在   org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:233)     在   org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:343)     在org.apache.camel.impl.ProducerCache.send(ProducerCache.java:201)     在   org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128)     在   org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:253)

1 个答案:

答案 0 :(得分:3)

HTTP状态码500是服务器端错误,错误发生在Camel之外。检查服务器端那边出了什么问题。