本文整理了Java中javax.wsdl.Binding.addBindingOperation()
方法的一些代码示例,展示了Binding.addBindingOperation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.addBindingOperation()
方法的具体详情如下:
包路径:javax.wsdl.Binding
类名称:Binding
方法名:addBindingOperation
[英]Add an operation binding to binding.
[中]将操作绑定添加到绑定。
代码示例来源:origin: wsdl4j/wsdl4j
binding.addBindingOperation(parseBindingOperation(tempEl,
portType,
def));
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
private List createNewBindingOperations(List operations)
{
List newBindingOps = new ArrayList();
Iterator neededBindingOperationsIt = operations.iterator();
while (neededBindingOperationsIt.hasNext())
{
Operation operation = (Operation)neededBindingOperationsIt.next();
BindingOperation newBindingOperation = factory.createBindingOperation();
newBindingOperation.setEOperation(operation);
newBindingOperation.setName(operation.getName());
binding.addBindingOperation(newBindingOperation);
newBindingOps.add(newBindingOperation);
}
return newBindingOps;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-wsdlgen
@SuppressWarnings("unchecked")
public void createBindingOperations(Definition definition, Binding binding, PortType portType) {
try {
for (Iterator oi = portType.getOperations().iterator(); oi.hasNext();) {
Operation operation = (Operation)oi.next();
// Removed improper defaulting of SOAP action. createBindingOperations() is called
// when binding.ws does not supply a WSDL binding and the reference is using interface.wsdl.
// In this case there is no source for a user-supplied action.
// The correct default is "" (empty string).
BindingOperation bindingOperation =
createBindingOperation(definition, operation, "");
binding.addBindingOperation(bindingOperation);
}
} catch (WSDLException e) {
throw new WSDLGenerationException(e);
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
@SuppressWarnings("unchecked")
public void createBindingOperations(Definition definition, Binding binding, PortType portType) {
try {
for (Iterator oi = portType.getOperations().iterator(); oi.hasNext();) {
Operation operation = (Operation)oi.next();
// Removed improper defaulting of SOAP action. createBindingOperations() is called
// when binding.ws does not supply a WSDL binding and the reference is using interface.wsdl.
// In this case there is no source for a user-supplied action.
// The correct default is "" (empty string).
BindingOperation bindingOperation =
createBindingOperation(definition, operation, "");
binding.addBindingOperation(bindingOperation);
}
} catch (WSDLException e) {
throw new WSDLGenerationException(e);
}
}
代码示例来源:origin: org.objectweb.celtix/celtix-tools
private void generateBindingOperation(Binding binding) {
for (JavaMethod jmethod : wmodel.getJavaMethods()) {
BindingOperation bindOperation = definition.createBindingOperation();
bindOperation.setName(jmethod.getName());
generateBindingOperationInputOutPut(bindOperation, jmethod);
binding.addBindingOperation(bindOperation);
}
}
代码示例来源:origin: apache/cxf
private BindingOperation generateBindingOperation(Binding wsdlBinding, Operation op,
String corbaOpName) {
BindingOperation bindingOperation = definition.createBindingOperation();
//OperationType operationType = null;
try {
corbaOperation = (OperationType)extReg.createExtension(BindingOperation.class,
CorbaConstants.NE_CORBA_OPERATION);
} catch (WSDLException ex) {
throw new RuntimeException(ex);
}
corbaOperation.setName(corbaOpName);
bindingOperation.addExtensibilityElement((ExtensibilityElement)corbaOperation);
bindingOperation.setOperation(op);
bindingOperation.setName(op.getName());
binding.addBindingOperation(bindingOperation);
return bindingOperation;
}
代码示例来源:origin: org.codehaus.xfire/xfire-core
public javax.wsdl.Binding createBinding(WSDLBuilder builder, PortType portType)
{
Transport t = builder.getTransportManager().getTransport(getBindingId());
if (!(t instanceof WSDL11Transport)) return null;
Definition def = builder.getDefinition();
javax.wsdl.Binding wbinding = def.createBinding();
wbinding.setQName( getName() );
wbinding.setPortType( portType );
wbinding.setUndefined(false);
// add in soap:Body, et al
wbinding.addExtensibilityElement(createSoapBinding());
for (Iterator oitr = getService().getServiceInfo().getOperations().iterator(); oitr.hasNext();)
{
OperationInfo op = (OperationInfo) oitr.next();
javax.wsdl.Operation wsdlOp =
(javax.wsdl.Operation) portType.getOperation(op.getName(), null, null);
javax.wsdl.BindingOperation bop = createBindingOperation(builder, wsdlOp, op);
createHeaders(builder, op, bop);
wbinding.addBindingOperation(bop);
}
def.addBinding(wbinding);
return wbinding;
}
代码示例来源:origin: apache/cxf
protected void buildBindingOperation(Definition def, Binding binding,
Collection<BindingOperationInfo> bindingOperationInfos) {
BindingOperation bindingOperation = null;
for (BindingOperationInfo bindingOperationInfo : bindingOperationInfos) {
bindingOperation = def.createBindingOperation();
addDocumentation(bindingOperation, bindingOperationInfo.getDocumentation());
bindingOperation.setName(bindingOperationInfo.getName().getLocalPart());
for (Operation operation
: CastUtils.cast(binding.getPortType().getOperations(), Operation.class)) {
if (operation.getName().equals(bindingOperation.getName())) {
bindingOperation.setOperation(operation);
break;
}
}
buildBindingInput(def, bindingOperation, bindingOperationInfo.getInput());
buildBindingOutput(def, bindingOperation, bindingOperationInfo.getOutput());
buildBindingFault(def, bindingOperation, bindingOperationInfo.getFaults());
addExtensibilityAttributes(def, bindingOperation, bindingOperationInfo.getExtensionAttributes());
addExtensibilityElements(def, bindingOperation, getWSDL11Extensors(bindingOperationInfo));
binding.addBindingOperation(bindingOperation);
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-core
protected void buildBindingOperation(Definition def, Binding binding,
Collection<BindingOperationInfo> bindingOperationInfos) {
BindingOperation bindingOperation = null;
for (BindingOperationInfo bindingOperationInfo : bindingOperationInfos) {
bindingOperation = def.createBindingOperation();
addDocumentation(bindingOperation, bindingOperationInfo.getDocumentation());
bindingOperation.setName(bindingOperationInfo.getName().getLocalPart());
for (Operation operation
: CastUtils.cast(binding.getPortType().getOperations(), Operation.class)) {
if (operation.getName().equals(bindingOperation.getName())) {
bindingOperation.setOperation(operation);
break;
}
}
buildBindingInput(def, bindingOperation, bindingOperationInfo.getInput());
buildBindingOutput(def, bindingOperation, bindingOperationInfo.getOutput());
buildBindingFault(def, bindingOperation, bindingOperationInfo.getFaults());
addExtensibilityAttributes(def, bindingOperation, bindingOperationInfo.getExtensionAttributes());
addExtensibilityElements(def, bindingOperation, getWSDL11Extensors(bindingOperationInfo));
binding.addBindingOperation(bindingOperation);
}
}
代码示例来源:origin: org.objectweb.celtix/celtix-tools
@SuppressWarnings("unchecked")
private void addBindingOperation() throws ToolException {
List<Operation> ops = portType.getOperations();
for (Operation op : ops) {
BindingOperation bindingOperation = wsdlDefinition.createBindingOperation();
bindingOperation.setName(op.getName());
if (op.getInput() != null) {
bindingOperation.setBindingInput(getBindingInput(op.getInput(), op.getName()));
}
if (op.getOutput() != null) {
bindingOperation.setBindingOutput(getBindingOutput(op.getOutput(), op.getName()));
}
if (op.getFaults() != null && op.getFaults().size() > 0) {
addXMLFaults(op, bindingOperation);
}
bindingOperation.setOperation(op);
binding.addBindingOperation(bindingOperation);
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
protected void buildBindingOperation(Definition def, Binding binding,
Collection<BindingOperationInfo> bindingOperationInfos) {
BindingOperation bindingOperation = null;
for (BindingOperationInfo bindingOperationInfo : bindingOperationInfos) {
bindingOperation = def.createBindingOperation();
addDocumentation(bindingOperation, bindingOperationInfo.getDocumentation());
bindingOperation.setName(bindingOperationInfo.getName().getLocalPart());
for (Operation operation
: CastUtils.cast(binding.getPortType().getOperations(), Operation.class)) {
if (operation.getName().equals(bindingOperation.getName())) {
bindingOperation.setOperation(operation);
break;
}
}
buildBindingInput(def, bindingOperation, bindingOperationInfo.getInput());
buildBindingOutput(def, bindingOperation, bindingOperationInfo.getOutput());
buildBindingFault(def, bindingOperation, bindingOperationInfo.getFaults());
addExtensibilityAttributes(def, bindingOperation, bindingOperationInfo.getExtensionAttributes());
addExtensibilityElements(def, bindingOperation, getWSDL11Extensors(bindingOperationInfo));
binding.addBindingOperation(bindingOperation);
}
}
代码示例来源:origin: apache/cxf
@SuppressWarnings("unchecked")
private static void addBindingOperation(Definition wsdlDefinition, PortType portType, Binding binding,
ExtensionRegistry extReg) throws Exception {
List<Operation> ops = portType.getOperations();
for (Operation op : ops) {
BindingOperation bindingOperation = wsdlDefinition.createBindingOperation();
setSoapOperationExtElement(bindingOperation, extReg);
bindingOperation.setName(op.getName());
if (op.getInput() != null) {
bindingOperation.setBindingInput(getBindingInput(op.getInput(), wsdlDefinition, extReg));
}
if (op.getOutput() != null) {
bindingOperation.setBindingOutput(getBindingOutput(op.getOutput(), wsdlDefinition, extReg));
}
if (op.getFaults() != null && op.getFaults().size() > 0) {
addSoapFaults(op, bindingOperation, wsdlDefinition, extReg);
}
bindingOperation.setOperation(op);
binding.addBindingOperation(bindingOperation);
}
}
代码示例来源:origin: apache/cxf
@SuppressWarnings("unchecked")
private void addBindingOperation() throws ToolException {
List<Operation> ops = portType.getOperations();
for (Operation op : ops) {
BindingOperation bindingOperation = wsdlDefinition.createBindingOperation();
bindingOperation.setName(op.getName());
if (op.getInput() != null) {
bindingOperation.setBindingInput(getBindingInput(op.getInput(), op.getName()));
}
if (op.getOutput() != null) {
bindingOperation.setBindingOutput(getBindingOutput(op.getOutput(), op.getName()));
}
if (op.getFaults() != null && op.getFaults().size() > 0) {
addXMLFaults(op, bindingOperation);
}
bindingOperation.setOperation(op);
binding.addBindingOperation(bindingOperation);
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-core
@SuppressWarnings("unchecked")
private static void addBindingOperation(Definition wsdlDefinition, PortType portType, Binding binding,
ExtensionRegistry extReg) throws Exception {
List<Operation> ops = portType.getOperations();
for (Operation op : ops) {
BindingOperation bindingOperation = wsdlDefinition.createBindingOperation();
setSoapOperationExtElement(bindingOperation, extReg);
bindingOperation.setName(op.getName());
if (op.getInput() != null) {
bindingOperation.setBindingInput(getBindingInput(op.getInput(), wsdlDefinition, extReg));
}
if (op.getOutput() != null) {
bindingOperation.setBindingOutput(getBindingOutput(op.getOutput(), wsdlDefinition, extReg));
}
if (op.getFaults() != null && op.getFaults().size() > 0) {
addSoapFaults(op, bindingOperation, wsdlDefinition, extReg);
}
bindingOperation.setOperation(op);
binding.addBindingOperation(bindingOperation);
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
@SuppressWarnings("unchecked")
private static void addBindingOperation(Definition wsdlDefinition, PortType portType, Binding binding,
ExtensionRegistry extReg) throws Exception {
List<Operation> ops = portType.getOperations();
for (Operation op : ops) {
BindingOperation bindingOperation = wsdlDefinition.createBindingOperation();
setSoapOperationExtElement(bindingOperation, extReg);
bindingOperation.setName(op.getName());
if (op.getInput() != null) {
bindingOperation.setBindingInput(getBindingInput(op.getInput(), wsdlDefinition, extReg));
}
if (op.getOutput() != null) {
bindingOperation.setBindingOutput(getBindingOutput(op.getOutput(), wsdlDefinition, extReg));
}
if (op.getFaults() != null && op.getFaults().size() > 0) {
addSoapFaults(op, bindingOperation, wsdlDefinition, extReg);
}
bindingOperation.setOperation(op);
binding.addBindingOperation(bindingOperation);
}
}
代码示例来源:origin: apache/cxf
@SuppressWarnings("unchecked")
private void addBindingOperation() throws ToolException {
/**
* This method won't do unique operation name checking on portType The
* WS-I Basic Profile[17] R2304 requires that operations within a
* wsdl:portType have unique values for their name attribute so mapping
* of WS-I compliant WSDLdescriptions will not generate Java interfaces
* with overloaded methods. However, for backwards compatibility, JAX-WS
* supports operation name overloading provided the overloading does not
* cause conflicts (as specified in the Java Language Specification[25])
* in the mapped Java service endpoint interface declaration.
*/
List<Operation> ops = portType.getOperations();
for (Operation op : ops) {
BindingOperation bindingOperation = wsdlDefinition.createBindingOperation();
setSoapOperationExtElement(bindingOperation);
bindingOperation.setName(op.getName());
if (op.getInput() != null) {
bindingOperation.setBindingInput(getBindingInput(op.getInput()));
}
if (op.getOutput() != null) {
bindingOperation.setBindingOutput(getBindingOutput(op.getOutput()));
}
if (op.getFaults() != null && op.getFaults().size() > 0) {
addSoapFaults(op, bindingOperation);
}
bindingOperation.setOperation(op);
binding.addBindingOperation(bindingOperation);
}
}
代码示例来源:origin: org.apache.cxf/cxf-tools-misctools
@SuppressWarnings("unchecked")
private void addBindingOperation() throws ToolException {
List<Operation> ops = portType.getOperations();
for (Operation op : ops) {
BindingOperation bindingOperation = wsdlDefinition.createBindingOperation();
bindingOperation.setName(op.getName());
if (op.getInput() != null) {
bindingOperation.setBindingInput(getBindingInput(op.getInput(), op.getName()));
}
if (op.getOutput() != null) {
bindingOperation.setBindingOutput(getBindingOutput(op.getOutput(), op.getName()));
}
if (op.getFaults() != null && op.getFaults().size() > 0) {
addXMLFaults(op, bindingOperation);
}
bindingOperation.setOperation(op);
binding.addBindingOperation(bindingOperation);
}
}
代码示例来源:origin: apache/cxf
binding.addBindingOperation(bindingOperation);
} catch (Exception ex) {
LOG.warning("Operation " + op.getName() + " not mapped to CORBA binding.");
代码示例来源:origin: apache/cxf
private BindingOperation generateCorbaBindingOperation(Binding wsdlBinding,
Operation op,
OperationType corbaOp) {
BindingInput bindingInput = definition.createBindingInput();
bindingInput.setName(op.getInput().getName());
BindingOutput bindingOutput = definition.createBindingOutput();
bindingOutput.setName(op.getOutput().getName());
BindingOperation bindingOperation = definition.createBindingOperation();
bindingOperation.addExtensibilityElement((ExtensibilityElement)corbaOp);
bindingOperation.setOperation(op);
bindingOperation.setName(op.getName());
bindingOperation.setBindingInput(bindingInput);
bindingOperation.setBindingOutput(bindingOutput);
binding.addBindingOperation(bindingOperation);
return bindingOperation;
}
代码示例来源:origin: org.apache.cxf/cxf-tools-misctools
@SuppressWarnings("unchecked")
private void addBindingOperation() throws ToolException {
/**
* This method won't do unique operation name checking on portType The
* WS-I Basic Profile[17] R2304 requires that operations within a
* wsdl:portType have unique values for their name attribute so mapping
* of WS-I compliant WSDLdescriptions will not generate Java interfaces
* with overloaded methods. However, for backwards compatibility, JAX-WS
* supports operation name overloading provided the overloading does not
* cause conflicts (as specified in the Java Language Specification[25])
* in the mapped Java service endpoint interface declaration.
*/
List<Operation> ops = portType.getOperations();
for (Operation op : ops) {
BindingOperation bindingOperation = wsdlDefinition.createBindingOperation();
setSoapOperationExtElement(bindingOperation);
bindingOperation.setName(op.getName());
if (op.getInput() != null) {
bindingOperation.setBindingInput(getBindingInput(op.getInput()));
}
if (op.getOutput() != null) {
bindingOperation.setBindingOutput(getBindingOutput(op.getOutput()));
}
if (op.getFaults() != null && op.getFaults().size() > 0) {
addSoapFaults(op, bindingOperation);
}
bindingOperation.setOperation(op);
binding.addBindingOperation(bindingOperation);
}
}
内容来源于网络,如有侵权,请联系作者删除!