本文整理汇总了Java中org.apache.cxf.jaxws.JaxWsProxyFactoryBean.setProperties方法的典型用法代码示例。如果您正苦于以下问题:Java JaxWsProxyFactoryBean.setProperties方法的具体用法?Java JaxWsProxyFactoryBean.setProperties怎么用?Java JaxWsProxyFactoryBean.setProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cxf.jaxws.JaxWsProxyFactoryBean
的用法示例。
在下文中一共展示了JaxWsProxyFactoryBean.setProperties方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Before
public void init() {
Map<String, Object> props = new HashMap<String, Object>();
props.put("mtom-enabled", Boolean.TRUE);
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(SoapDocumentSignatureService.class);
factory.setProperties(props);
factory.setAddress(getBaseCxf() + CXFConfig.SOAP_SIGNATURE_ONE_DOCUMENT);
soapClient = (SoapDocumentSignatureService) factory.create();
JaxWsProxyFactoryBean factory2 = new JaxWsProxyFactoryBean();
factory2.setServiceClass(SoapMultipleDocumentsSignatureService.class);
factory2.setProperties(props);
factory2.setAddress(getBaseCxf() + CXFConfig.SOAP_SIGNATURE_MULTIPLE_DOCUMENTS);
soapMultiDocsClient = (SoapMultipleDocumentsSignatureService) factory2.create();
}
示例2: connect
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
public void connect(TokenHolder tokenHolder) {
for (Class<? extends PublicInterface> interface1 : interfaces) {
JaxWsProxyFactoryBean cpfb = new JaxWsProxyFactoryBean();
cpfb.setServiceClass(interface1);
cpfb.setAddress(address + "/" + interface1.getSimpleName());
Map<String, Object> properties = new HashMap<String, Object>();
properties.put("mtom-enabled", Boolean.TRUE);
cpfb.setProperties(properties);
PublicInterface serviceInterface = (PublicInterface) cpfb.create();
client = ClientProxy.getClient(serviceInterface);
HTTPConduit http = (HTTPConduit) client.getConduit();
http.getClient().setConnectionTimeout(360000);
http.getClient().setAllowChunking(false);
http.getClient().setReceiveTimeout(320000);
if (!useSoapHeaderSessions) {
((BindingProvider) serviceInterface).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE);
}
add(interface1.getName(), serviceInterface);
}
tokenHolder.registerTokenChangeListener(this);
notifyOfConnect();
}
示例3: appendAuth
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
/**
* 添加用户名和密码信息
*
* @param jw
*/
public void appendAuth(JaxWsProxyFactoryBean jw, String nodeId) {
Map<String, Object> outProps = new HashMap<String, Object>();
outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
outProps.put(WSHandlerConstants.USER, RmClusterConfig.getSingleton().getAuth(nodeId).keySet().toArray(new String[0])[0]);
outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
outProps.put(WSHandlerConstants.PW_CALLBACK_CLASS, RmPasswordCallback.class.getName());
Map<String, Object> mProp = new HashMap<String, Object>();
mProp.put(FaultListener.class.getName(), new FaultListener() {
public boolean faultOccurred(Exception exception, String description, Message message) {
RmCacheHandler.logCache.error("fail: " + exception.toString() + " cause:" + exception.getCause());
return false;
}
});
jw.setProperties(mProp);
WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
jw.getOutInterceptors().add(wssOut);
jw.getOutInterceptors().add(new SAAJOutInterceptor());
}
示例4: getRemoteToken
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Override
RemoteSignatureTokenConnection getRemoteToken() {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(SoapSignatureTokenConnection.class);
Map<String, Object> props = new HashMap<String, Object>();
props.put("mtom-enabled", Boolean.TRUE);
factory.setProperties(props);
factory.setAddress(getBaseCxf() + CXFConfig.SOAP_SERVER_SIGNING);
return (SoapSignatureTokenConnection) factory.create();
}
示例5: init
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Before
public void init() {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(SoapDocumentValidationService.class);
Map<String, Object> props = new HashMap<String, Object>();
props.put("mtom-enabled", Boolean.TRUE);
factory.setProperties(props);
factory.setAddress(getBaseCxf() + CXFConfig.SOAP_VALIDATION);
validationService = (SoapDocumentValidationService) factory.create();
}
示例6: request
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Bean(name="acaBulkRequestTransmitterService")
public BulkRequestTransmitterPortType request() {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setAddress(propertyResolver.getProperty("bulk.url"));
factory.setServiceClass(BulkRequestTransmitterPortType.class);
List<Feature> features = new ArrayList<>();
features.add(new LoggingFeature());
factory.setFeatures(features);
Map<String, Object> properties = new HashMap<>();
properties.put("schema-validation-enabled",
propertyResolver.getProperty("bulk.properties.schema-validation-enabled", Boolean.class, true));
properties.put("mtom-enabled",
propertyResolver.getProperty("bulk.properties.mtom-enabled", Boolean.class, true));
factory.setProperties(properties);
BulkRequestTransmitterPortType client = (BulkRequestTransmitterPortType) factory.create();
return client;
}
示例7: status
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Bean(name="acaTransmitterStatusService")
public ACATransmitterStatusReqPortType status() {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setAddress(propertyResolver.getProperty("status.url"));
factory.setServiceClass(ACATransmitterStatusReqPortType.class);
List<Feature> features = new ArrayList<>();
features.add(new LoggingFeature());
factory.setFeatures(features);
Map<String, Object> properties = new HashMap<>();
properties.put("schema-validation-enabled",
propertyResolver.getProperty("status.properties.schema-validation-enabled", Boolean.class, true));
factory.setProperties(properties);
ACATransmitterStatusReqPortType client = (ACATransmitterStatusReqPortType) factory.create();
return client;
}
示例8: setProperties
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
private void setProperties(JaxWsProxyFactoryBean proxyFactory, UnifiedPortComponentRefMetaData upcmd)
{
Map<String, Object> properties = proxyFactory.getProperties();
if (properties == null)
{
properties = new HashMap<String, Object>();
proxyFactory.setProperties(properties);
}
for (UnifiedStubPropertyMetaData prop : upcmd.getStubProperties())
{
properties.put(prop.getPropName(), prop.getPropValue());
}
}