org.apache.tuscany.sca.interfacedef.Interface.resetDataBinding()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(9.1k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中org.apache.tuscany.sca.interfacedef.Interface.resetDataBinding()方法的一些代码示例,展示了Interface.resetDataBinding()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interface.resetDataBinding()方法的具体详情如下:
包路径:org.apache.tuscany.sca.interfacedef.Interface
类名称:Interface
方法名:resetDataBinding

Interface.resetDataBinding介绍

[英]Reset the databinding for the interface
[中]重置接口的数据绑定

代码示例

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-http-runtime

@Override
public InterfaceContract configureWireFormatInterfaceContract(InterfaceContract interfaceContract) {
  interfaceContract.getInterface().resetDataBinding(DOMDataBinding.NAME);
  return interfaceContract;
}
@Override

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-http-runtime

@Override
public InterfaceContract configureWireFormatInterfaceContract(InterfaceContract interfaceContract) {
  // TODO: Ideally this wants to set the databinding on a per request basis from the 
  // http content type and accept headers and so support things like json or xml etc,
  // for now to get started just use json 
  interfaceContract.getInterface().resetDataBinding("JSON");
  return interfaceContract;
}
@Override

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jsonp-runtime

public JSONPReferenceBindingProvider(EndpointReference endpoint) {
  this.endpoint = endpoint;
  
  try {
    contract = (InterfaceContract)endpoint.getComponentReferenceInterfaceContract().clone();
  } catch (Exception ex){
    // we know this supports clone
  }
  contract.getInterface().resetDataBinding("JSON");
}
public Invoker createInvoker(Operation operation) {

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jsonp-runtime

public JSONPServiceBindingProvider(RuntimeEndpoint endpoint, ServletHost servletHost) {
  this.endpoint = endpoint;
  this.servletHost = servletHost;
  
  try {
    contract = (InterfaceContract)endpoint.getComponentServiceInterfaceContract().clone();
  } catch (Exception ex){
    // we know this supports clone
  }
  contract.getInterface().resetDataBinding("JSON");
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-implementation-script-runtime

public ScriptImplementationProvider(RuntimeComponent component, ScriptImplementation implementation, ScriptPropertyFactory propertyFactory) {
  this.component = component;
  this.implementation = implementation;
  this.propertyFactory = propertyFactory;
  // Set the databinding and XMLHelper for WSDL interfaces
  for (Service service : component.getServices()) {
    InterfaceContract ic = service.getInterfaceContract();
    if (ic instanceof WSDLInterfaceContract) {
      ic.getInterface().resetDataBinding(OMElement.class.getName());
      xmlHelper = XMLHelper.getArgHelper(scriptEngine);
    }
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-implementation-bpel-runtime

service.getInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);
reference.getInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);
service.getInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);
for( Endpoint endpoint : service.getEndpoints() ) {
  RuntimeEndpoint ep = (RuntimeEndpoint) endpoint;
  if (ep.getComponentTypeServiceInterfaceContract() != null) {
    ep.getComponentTypeServiceInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);
reference.getInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);
for (EndpointReference endpointReference : reference.getEndpointReferences()) {
  RuntimeEndpointReference epr = (RuntimeEndpointReference)endpointReference;
  if (epr.getComponentTypeReferenceInterfaceContract() != null) {
    epr.getComponentTypeReferenceInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

public JAXWSReferenceBindingProvider(RuntimeEndpointReference endpointReference,
                   FactoryExtensionPoint modelFactories,
                   DataBindingExtensionPoint dataBindings) {
  this.endpointReference = endpointReference;
  this.messageFactory = modelFactories.getFactory(javax.xml.soap.MessageFactory.class);
  this.wsBinding = (WebServiceBinding) endpointReference.getBinding();
  // A WSDL document should always be present in the binding
  if (wsBinding.getGeneratedWSDLDocument() == null) {
    throw new ServiceRuntimeException("No WSDL document for " + endpointReference.getURI());
  }
  // Set to use the DOM data binding
  InterfaceContract contract = wsBinding.getBindingInterfaceContract();
  if (contract.getInterface() != null) {
    contract.getInterface().resetDataBinding(Node.class.getName());
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-jaxws-ri

public JAXWSReferenceBindingProvider(RuntimeEndpointReference endpointReference,
                   FactoryExtensionPoint modelFactories,
                   DataBindingExtensionPoint dataBindings) {
  this.endpointReference = endpointReference;
  this.messageFactory = modelFactories.getFactory(javax.xml.soap.MessageFactory.class);
  this.wsBinding = (WebServiceBinding) endpointReference.getBinding();
  // A WSDL document should always be present in the binding
  if (wsBinding.getGeneratedWSDLDocument() == null) {
    throw new ServiceRuntimeException("No WSDL document for " + endpointReference.getURI());
  }
  // Set to use the DOM data binding
  InterfaceContract contract = wsBinding.getBindingInterfaceContract();
  if (contract.getInterface() != null) {
    contract.getInterface().resetDataBinding(Node.class.getName());
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-sca-runtime

wsdlInterfaceContract.getInterface().resetDataBinding(dataBinding);
wsdlInterfaceContract.getCallbackInterface().resetDataBinding(dataBinding);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

wsdlInterfaceContract.getInterface().resetDataBinding(dataBinding);
wsdlInterfaceContract.getCallbackInterface().resetDataBinding(dataBinding);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

contract.getInterface().resetDataBinding(Node.class.getName());

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime

BindingWSDLGenerator.generateWSDL(endpoint.getComponent(), service, wsBinding, registry, null);
interfaceContract = wsBinding.getBindingInterfaceContract();
interfaceContract.getInterface().resetDataBinding(XMLHelperFactory.createXMLHelper(registry).getDataBindingName());

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime

BindingWSDLGenerator.generateWSDL(endpointReference.getComponent(), reference, wsBinding, registry, null);
interfaceContract = wsBinding.getBindingInterfaceContract();
interfaceContract.getInterface().resetDataBinding(XMLHelperFactory.createXMLHelper(registry).getDataBindingName());

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

contract.getInterface().resetDataBinding(OMElement.class.getName());

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime

BindingWSDLGenerator.generateWSDL(endpointReference.getComponent(), endpointReference.getContract(), wsBinding, registry, null);
interfaceContract = wsBinding.getBindingInterfaceContract();
interfaceContract.getInterface().resetDataBinding(XMLHelperFactory.createXMLHelper(registry).getDataBindingName());

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime

BindingWSDLGenerator.generateWSDL(endpoint.getComponent(), endpoint.getService(), wsBinding, registry, null);
interfaceContract = wsBinding.getBindingInterfaceContract();
interfaceContract.getInterface().resetDataBinding(XMLHelperFactory.createXMLHelper(registry).getDataBindingName());

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime

public WireFormatJMSTextXMLReferenceProvider(ExtensionPointRegistry registry,
                       RuntimeEndpointReference endpointReference) {
  super();
  this.registry = registry;
  this.endpointReference = endpointReference;
  this.binding = (JMSBinding)endpointReference.getBinding();
  
  // configure the reference based on this wire format
  
  // currently maintaining the message processor structure which 
  // contains the details of jms message processing so set the message
  // type here if not set explicitly in SCDL
  if (this.binding.getRequestWireFormat() instanceof WireFormatJMSTextXML){
    this.binding.setRequestMessageProcessorName(JMSBindingConstants.XML_MP_CLASSNAME);
  }
  if (this.binding.getResponseWireFormat() instanceof WireFormatJMSTextXML){
    this.binding.setResponseMessageProcessorName(JMSBindingConstants.XML_MP_CLASSNAME);
  }
  // create a local interface contract that is configured specifically to 
  // deal with the data format that this wire format is expecting to send to 
  // and receive from the databinding interceptor. The request/response parts of 
  // this interface contract will be copied into the binding interface contract
  // as required
  WebServiceBindingFactory wsFactory = registry.getExtensionPoint(WebServiceBindingFactory.class);
  WebServiceBinding wsBinding = wsFactory.createWebServiceBinding();
  BindingWSDLGenerator.generateWSDL(endpointReference.getComponent(), endpointReference.getReference(), wsBinding, registry, null);
  interfaceContract = wsBinding.getBindingInterfaceContract();
  interfaceContract.getInterface().resetDataBinding(XMLHelperFactory.createXMLHelper(registry).getDataBindingName());
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime

BindingWSDLGenerator.generateWSDL(endpoint.getComponent(), endpoint.getService(), wsBinding, registry, null);
interfaceContract = wsBinding.getBindingInterfaceContract();
interfaceContract.getInterface().resetDataBinding(XMLHelperFactory.createXMLHelper(registry).getDataBindingName());

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

contract.getInterface().resetDataBinding(OMElement.class.getName());

相关文章