场景
目前已经实现正常的 webservice(client) 到 camel 到 webservice(server)
但是经过安全认证的WS-Security webservice(client)就会有问题,在camel-cxf 代理
中想仅仅实现代理,不想对客户端发送来的soap有任何的修改,即使是加密的消息。
哪位大侠有这方面的经验给提提,或是有什么样类似的例子,不胜感激。
更多内容可以查看:http://stackoverflow.com/questions/33981341/camel-proxy-webservice-in-ws-security-without-input-password-and-name
cxf 配置文件以及camel的配置
com.lucky
路由创建代码
package com.lucky;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import utile.PropertiesUtil;
import com.bean.RoutBean;
import java.io.StringReader;
import javax.xml.namespace.QName;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.http.HttpMessage;
import org.apache.camel.util.CastUtils;
import org.apache.cxf.binding.soap.SoapHeader;
import org.apache.cxf.headers.Header;
import org.apache.cxf.headers.Header.Direction;
import org.apache.cxf.helpers.DOMUtils;
public class RoutLoad extends RouteBuilder {
@Override
public void configure() throws Exception {
//Properties prop = new Properties();
InputStream in = RoutLoad.class
.getResourceAsStream("./../../routConfig.properties");
PropertiesUtil prop = new PropertiesUtil(in);
try {
prop.load(in);
} catch (IOException e) {
e.printStackTrace();
}
String key = "";
String old_key = "";
String configName = "";
RoutBean routBean = new RoutBean();
List
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
无需特殊配置。
answer...