本文整理汇总了Java中org.apache.cxf.service.model.BindingInfo类的典型用法代码示例。如果您正苦于以下问题:Java BindingInfo类的具体用法?Java BindingInfo怎么用?Java BindingInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BindingInfo类属于org.apache.cxf.service.model包,在下文中一共展示了BindingInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: writeToOutputStream
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
protected boolean writeToOutputStream(Message m, BindingInfo info, Service s) {
/**
* Yes, all this code is EXTREMELY ugly. But it gives about a 60-70% performance
* boost with the JAXB RI, so its worth it.
*/
if (s == null) {
return false;
}
String enc = (String)m.get(Message.ENCODING);
return info.getClass().getName().equals("org.apache.cxf.binding.soap.model.SoapBindingInfo")
&& s.getDataBinding().getClass().getName().equals("org.apache.cxf.jaxb.JAXBDataBinding")
&& !MessageUtils.isDOMPresent(m)
&& (enc == null || "UTF-8".equals(enc));
}
开发者ID:Huawei,项目名称:eSDK_EC_SDK_Java,代码行数:17,代码来源:AbstractOutDatabindingInterceptor.java
示例2: getMessageHeaderFilter
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
private MessageHeaderFilter getMessageHeaderFilter(Exchange exchange) {
BindingOperationInfo boi = exchange.getProperty(BindingOperationInfo.class.getName(),
BindingOperationInfo.class);
String ns = null;
if (boi != null) {
BindingInfo b = boi.getBinding();
if (b != null) {
ns = b.getBindingId();
}
}
MessageHeaderFilter answer = null;
if (ns != null) {
answer = messageHeaderFiltersMap.get(ns);
}
return answer;
}
开发者ID:HydAu,项目名称:Camel,代码行数:19,代码来源:CxfHeaderFilterStrategy.java
示例3: begin
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
@Override
public void begin(ServiceInfo service) {
BindingInfo xml = null;
for (BindingInfo bindingInfo : service.getBindings()) {
if (SoapBindingConstants.SOAP11_BINDING_ID.equals(bindingInfo.getBindingId())
|| SoapBindingConstants.SOAP12_BINDING_ID.equals(bindingInfo.getBindingId())
|| SoapBindingFactory.SOAP_11_BINDING.equals(bindingInfo.getBindingId())
|| SoapBindingFactory.SOAP_12_BINDING.equals(bindingInfo.getBindingId())
) {
SoapBindingInfo sbi = (SoapBindingInfo) bindingInfo;
if (WSDLConstants.NS_SOAP11_HTTP_TRANSPORT.equals(sbi.getTransportURI())
|| WSDLConstants.NS_SOAP12_HTTP_BINDING.equals(sbi.getTransportURI())
|| "http://cxf.apache.org/transports/local".equals(sbi.getTransportURI())) {
soapBindingInfo = sbi;
break;
}
} else if (WSDLConstants.NS_BINDING_XML.equals(bindingInfo.getBindingId())) {
xml = bindingInfo;
}
}
// For now, we use soap if its available, and XML if it isn't.\
if (soapBindingInfo == null && xml == null) {
throw new UnsupportedConstruct("NO_USABLE_BINDING");
}
}
开发者ID:selckin,项目名称:cxf-php-soap-codegen,代码行数:27,代码来源:ServicePHPBuilder.java
示例4: createBindingInfo
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
protected BindingInfo createBindingInfo() {
BindingFactoryManager mgr = getBus().getExtension(BindingFactoryManager.class);
String binding = getBindingId();
BindingConfiguration bindingConfig = getBindingConfig();
if (binding == null && bindingConfig != null) {
binding = bindingConfig.getBindingId();
}
if (binding == null) {
binding = ProtobufBindingFactory.PROTOBUF_BINDING_ID;
}
try {
BindingFactory bindingFactory = mgr.getBindingFactory(binding);
setBindingFactory(bindingFactory);
return bindingFactory.createBindingInfo(serviceFactory.getService(), binding, bindingConfig);
} catch (BusException ex) {
log.error("Failed to create CXF bus ",ex);
}
return null;
}
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:23,代码来源:ProtobufServerFactoryBean.java
示例5: setExchangeProperties
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
protected void setExchangeProperties(Exchange exchange, Endpoint ep) {
if (ep != null) {
exchange.put(Endpoint.class, ep);
exchange.put(Service.class, ep.getService());
if (ep.getEndpointInfo().getService() != null) {
exchange.put(ServiceInfo.class, ep.getEndpointInfo()
.getService());
exchange.put(InterfaceInfo.class, ep.getEndpointInfo()
.getService().getInterface());
}
exchange.put(Binding.class, ep.getBinding());
exchange.put(BindingInfo.class, ep.getEndpointInfo().getBinding());
}
exchange.put(MessageObserver.class, this);
exchange.put(Bus.class, getBus());
}
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:18,代码来源:ProtobufClient.java
示例6: getQName
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
private QName getQName(Endpoint endpoint, String methodName){
BindingInfo bindingInfo = endpoint.getEndpointInfo().getBinding();
QName opName = new QName(endpoint.getService().getName().getNamespaceURI(), methodName);
if (bindingInfo.getOperation(opName) == null) {
for (BindingOperationInfo operationInfo : bindingInfo.getOperations()) {
if (methodName.equals(operationInfo.getName().getLocalPart())) {
opName = operationInfo.getName();
break;
}
}
}
return opName;
}
开发者ID:yiyongfei,项目名称:jea,代码行数:15,代码来源:SoapClient.java
示例7: changeTransportUriToZmq
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
private void changeTransportUriToZmq(Endpoint ep) {
if (ep.getBinding() == null) {
return;
}
if (ep.getBinding().getBindingInfo() == null) {
return;
}
BindingInfo bindingInfo = ep.getBinding().getBindingInfo();
if (bindingInfo instanceof SoapBindingInfo) {
SoapBindingInfo soapBindingInfo = (SoapBindingInfo) bindingInfo;
soapBindingInfo.setTransportURI("http://schemas.xmlsoap.org/soap/zmq");
}
}
开发者ID:claudemamo,项目名称:cxf-rt-transports-zeromq,代码行数:14,代码来源:ZMQConfigFeature.java
示例8: createEndpointInfo
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
protected EndpointInfo createEndpointInfo() throws BusException {
String transportId = getTransportId();
if (transportId == null && getAddress() != null) {
DestinationFactory df = getDestinationFactory();
if (df == null) {
DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class);
df = dfm.getDestinationFactoryForUri(getAddress());
}
if (df != null) {
transportId = df.getTransportIds().get(0);
}
}
// default to http transport
if (transportId == null) {
transportId = "http://schemas.xmlsoap.org/wsdl/soap/http";
}
setTransportId(transportId);
EndpointInfo ei = new EndpointInfo();
ei.setTransportId(transportId);
ei.setName(serviceFactory.getService().getName());
ei.setAddress(getAddress());
ei.setProperty(PROTOBUF_MESSAGE_CLASS, messageClass);
BindingInfo bindingInfo = createBindingInfo();
ei.setBinding(bindingInfo);
return ei;
}
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:33,代码来源:ProtobufServerFactoryBean.java
示例9: createEndpoint
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
public static Endpoint createEndpoint(Bus bus, String address,
Service service) throws EndpointException {
BindingInfo bindingInfo = createBindingInfo(bus, service,
ProtobufBindingFactory.PROTOBUF_BINDING_ID);
return createEndpoint(bus, address, service, bindingInfo);
}
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:8,代码来源:ServiceUtils.java
示例10: createEndpointInfo
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
public static EndpointInfo createEndpointInfo(Bus bus, ServiceInfo serviceInfo,
BindingInfo bindingInfo, String address) {
String transportURI = getTransportId(bus, address);
EndpointInfo endpointInfo = new EndpointInfo(serviceInfo, transportURI);
if (address != null) {
endpointInfo.setName(new QName(address));
endpointInfo.setAddress(address);
}
System.out.println("seting binding info:" + bindingInfo);
endpointInfo.setBinding(bindingInfo);
return endpointInfo;
}
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:16,代码来源:ServiceUtils.java
示例11: createBindingInfo
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
public BindingInfo createBindingInfo(Service service, String namespace,
Object obj) {
ServiceInfo si = new ServiceInfo();
si.setTargetNamespace(ProtobufBindingFactory.PROTOBUF_BINDING_ID);
BindingInfo info = new BindingInfo(si,
ProtobufBindingFactory.PROTOBUF_BINDING_ID);
return info;
}
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:12,代码来源:ProtobufBindingFactory.java
示例12: messageTo
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
private Message messageTo(String requestBaseURL, String requestPath) {
Message message = new SoapMessage(Soap11.getInstance());
String requestURL = requestBaseURL + requestPath;
message.put(Message.ENDPOINT_ADDRESS, requestURL);
message.put(Message.BASE_PATH, requestBaseURL);
message.put(Message.REQUEST_URI, requestURL);
HashMap<String, Object> ctx = new HashMap<String, Object>();
ctx.put(Client.REQUEST_CONTEXT, new HashMap<String, Object>());
message.put(Message.INVOCATION_CONTEXT, ctx);
CXFBusImpl bus = new CXFBusImpl();
BindingFactoryManagerImpl bindingFactoryManager = new BindingFactoryManagerImpl();
bindingFactoryManager.registerBindingFactory("abc", new JAXRSBindingFactory());
bus.setExtension(bindingFactoryManager, BindingFactoryManager.class);
Map<String, ConduitInitiator> conduitInitiators = new HashMap<String, ConduitInitiator>();
ConduitInitiator ci = new HTTPTransportFactory(bus);
conduitInitiators.put(ENDPOINT_TRANSPORT_ID, ci);
ConduitInitiatorManagerImpl cim = new ConduitInitiatorManagerImpl(conduitInitiators);
bus.setExtension(cim, ConduitInitiatorManager.class);
Exchange exchange = exchange(message);
exchange.put(Bus.class, bus);
EndpointInfo ei = new EndpointInfo();
ei.setAddress("http://abc123");
BindingInfo b = new BindingInfo(null, "abc");
ei.setBinding(b);
Endpoint endpointMock = mock(Endpoint.class);
when(endpointMock.getEndpointInfo()).thenReturn(ei);
exchange.put(Endpoint.class, endpointMock);
message.setExchange(exchange);
message.setContent(List.class, new ArrayList<String>());
circuitBreakerTargetSelector.prepare(message);
InvocationKey key = new InvocationKey(exchange);
InvocationContext invocation = circuitBreakerTargetSelector.getInvocation(key);
invocation.getContext().put(Message.ENDPOINT_ADDRESS, requestPath);
invocation.getContext().put("org.apache.cxf.request.uri", requestPath);
return message;
}
开发者ID:jaceko,项目名称:cxf-circuit-switcher,代码行数:43,代码来源:CircuitSwitcherTargetSelectorTest.java
示例13: ProtobufBinding
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
public ProtobufBinding(BindingInfo bindingInfo) {
super();
this.bindingInfo = bindingInfo;
}
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:5,代码来源:ProtobufBinding.java
示例14: getBindingInfo
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
public BindingInfo getBindingInfo() {
return bindingInfo;
}
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:4,代码来源:ProtobufBinding.java
示例15: createBinding
import org.apache.cxf.service.model.BindingInfo; //导入依赖的package包/类
public Binding createBinding(BindingInfo bi) {
ProtobufBinding binding = new ProtobufBinding(bi);
binding.getInInterceptors().add(new ProtobufMessageInInterceptor());
binding.getOutInterceptors().add(new ProtobufMessageOutInterceptor());
return binding;
}
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:10,代码来源:ProtobufBindingFactory.java
注:本文中的org.apache.cxf.service.model.BindingInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论