Java camel cxf代理不适用于http端点

Java camel cxf代理不适用于http端点,java,http,cxf,apache-camel,Java,Http,Cxf,Apache Camel,我的要求是有一个代理web服务,它将接收来自客户端的请求,然后通过camel路由,充实它并将其转发到其他客户端的真实web服务,获得响应并将其发送回原始请求者 我基本上看了camel cxf代理示例(http://camel.apache.org/cxf-proxy-example.html)camel发行版中的camel cxf示例。它与camel cxf proxyand完全相似,并提出了此路线 <from uri="cxf:bean:soapMessageEndpoint?dataF

我的要求是有一个代理web服务,它将接收来自客户端的请求,然后通过camel路由,充实它并将其转发到其他客户端的真实web服务,获得响应并将其发送回原始请求者

我基本上看了camel cxf代理示例(http://camel.apache.org/cxf-proxy-example.html)camel发行版中的camel cxf示例。它与camel cxf proxyand完全相似,并提出了此路线

<from uri="cxf:bean:soapMessageEndpoint?dataFormat=MESSAGE" />
<camel:convertBodyTo type="java.lang.String"></camel:convertBodyTo>
<to ref="XService"></to>
我还尝试了以下似乎有效的方法

<from uri="cxf:bean:soapMessageEndpoint?dataFormat=MESSAGE" />
<camel:convertBodyTo type="java.lang.String"></camel:convertBodyTo>
<to uri="bean:callRemoteWS"></to>

我不明白为什么带有http webservice的简单camel cxf代理不起作用,而第二个却起作用(它应该而且确实起作用了:p)。我所拥有的代码是否正确。我很确定某些exchange属性设置错误,或者发送到real webservice的内容错误。从代理获取的内容用于在第二个路由中进行Httppost调用。因此,从代理获取的内容不会错。当它从exchange获取并发送到real webservice时,会出现一些问题错。有人能解释一下吗。

我认为我犯了一个愚蠢的错误。Soap操作头有不同的操作,负载用于不同的方法。我使用负载调用了错误的操作。

如果您发现这个问题对其他人没有用,请随意删除它:)不要删除,这对我很有用,请您建议,当我路由到另一个端点时,如何将SOAP操作头指定为我得到的上一个操作与您遇到的错误相同。
 Failed delivery for (MessageId: ID-ALHCAN0437-63941-1354828653539-45-2 on ExchangeId: ID-ALHCAN0437-63941-1354828653539-45-1). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.http.HttpOperationFailedException: HTTP operation failed invoking http://X:8080/X_Service with statusCode: 500
<from uri="cxf:bean:soapMessageEndpoint?dataFormat=MESSAGE" />
<camel:convertBodyTo type="java.lang.String"></camel:convertBodyTo>
<to uri="bean:callRemoteWS"></to>
public String callRemoteMethod(String request) throws Exception{



            HttpClient client = new HttpClient();

            BufferedReader br = null;

            PostMethod method = new PostMethod("http://x.x.x.x:8080/X_Service");

            RequestEntity entity =new StringRequestEntity(request); 

            method.setRequestEntity(entity);

            try{
              int returnCode = client.executeMethod(method);

              if (returnCode != HttpStatus.SC_OK) {
                  System.err.println("Method failed: " + method.getStatusLine());
                  return "Error";
                }

                // Read the response body.
                byte[] responseBody = method.getResponseBody();

                System.out.println(new String(responseBody));

                // Deal with the response.
                // Use caution: ensure correct character encoding and is not binary data
               return new String(responseBody);
            } finally {
              method.releaseConnection();
              if(br != null) try { br.close(); } catch (Exception fe) {}
            }

          }