• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java BindingOperation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.wsdl.BindingOperation的典型用法代码示例。如果您正苦于以下问题:Java BindingOperation类的具体用法?Java BindingOperation怎么用?Java BindingOperation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BindingOperation类属于javax.wsdl包,在下文中一共展示了BindingOperation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addWsdlBindingOperation

import javax.wsdl.BindingOperation; //导入依赖的package包/类
private static void addWsdlBindingOperation(Definition definition, QName bindingQName, String projectName, String operationName, String operationComment) {
  	SOAPBodyImpl soapInputBody = new SOAPBodyImpl();
soapInputBody.setUse("literal");
BindingInput bindingInput = definition.createBindingInput();
bindingInput.addExtensibilityElement(soapInputBody);

SOAPBodyImpl soapOutputBody = new SOAPBodyImpl();
soapOutputBody.setUse("literal");
BindingOutput bindingOutput = definition.createBindingOutput();
bindingOutput.addExtensibilityElement(soapOutputBody);

SOAPOperationImpl soapOperation = new SOAPOperationImpl();
soapOperation.setSoapActionURI(projectName + "?" + operationName);

BindingOperation bindingOperation = definition.createBindingOperation();
bindingOperation.setName(operationName);
bindingOperation.addExtensibilityElement(soapOperation);
bindingOperation.setBindingInput(bindingInput);
bindingOperation.setBindingOutput(bindingOutput);
addWsdLDocumentation(definition, bindingOperation, operationComment);

Binding binding = definition.getBinding(bindingQName);
binding.addBindingOperation(bindingOperation);
  }
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:25,代码来源:WebServiceServlet.java


示例2: importServicesAndOperations

import javax.wsdl.BindingOperation; //导入依赖的package包/类
/**
 * Imports services and operations from the WSDL definition
 */
protected void importServicesAndOperations(Definition definition) {
    for (Object serviceObject : definition.getServices().values()) {
        Service service = (Service) serviceObject;
        WSService wsService = this.importService(service);
        this.wsServices.put(this.namespace + wsService.getName(), wsService);

        Port port = (Port) service.getPorts().values().iterator().next();
        for (Object bindOperationObject : port.getBinding().getBindingOperations()) {
            BindingOperation bindOperation = (BindingOperation) bindOperationObject;
            WSOperation operation = this.processOperation(bindOperation.getOperation(), wsService);
            wsService.addOperation(operation);

            this.wsOperations.put(this.namespace + operation.getName(), operation);
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:20,代码来源:WSDLImporter.java


示例3: getSoapActionForOperation

import javax.wsdl.BindingOperation; //导入依赖的package包/类
private String getSoapActionForOperation( String operationName )
	throws IOException
{
	String soapAction = null;
	Port port = getWSDLPort();
	if ( port != null ) {
		BindingOperation bindingOperation = port.getBinding().getBindingOperation( operationName, null, null );
		for( ExtensibilityElement element : (List<ExtensibilityElement>) bindingOperation.getExtensibilityElements() ) {
			if ( element instanceof SOAPOperation ) {
				soapAction = ((SOAPOperation) element).getSoapActionURI();
			}
		}
	}
	if ( soapAction == null ) {
		soapAction = getStringParameter( "namespace" ) + "/" + operationName;
	}
	return soapAction;
}
 
开发者ID:jolie,项目名称:jolie,代码行数:19,代码来源:SoapProtocol.java


示例4: setOutputEncodingStyle

import javax.wsdl.BindingOperation; //导入依赖的package包/类
private void setOutputEncodingStyle( SOAPEnvelope soapEnvelope, String operationName )
	throws IOException, SOAPException
{
	Port port = getWSDLPort();
	if ( port != null ) {
		BindingOperation bindingOperation = port.getBinding().getBindingOperation( operationName, null, null );
		if ( bindingOperation == null ) {
			return;
		}
		BindingOutput output = bindingOperation.getBindingOutput();
		if ( output == null ) {
			return;
		}
		for( ExtensibilityElement element : (List<ExtensibilityElement>) output.getExtensibilityElements() ) {
			if ( element instanceof javax.wsdl.extensions.soap.SOAPBody ) {
				List<String> list = ((javax.wsdl.extensions.soap.SOAPBody) element).getEncodingStyles();
				if ( list != null && list.isEmpty() == false ) {
					soapEnvelope.setEncodingStyle( list.get( 0 ) );
					soapEnvelope.addNamespaceDeclaration( "enc", list.get( 0 ) );
				}
			}
		}
	}
}
 
开发者ID:jolie,项目名称:jolie,代码行数:25,代码来源:SoapProtocol.java


示例5: importServicesAndOperations

import javax.wsdl.BindingOperation; //导入依赖的package包/类
/**
 * Imports services and operations from the WSDL definition
 */
private void importServicesAndOperations(Definition definition) {
  for (Object serviceObject : definition.getServices().values()) {
    Service service = (Service) serviceObject;
    WSService wsService = this.importService(service);
    this.wsServices.put(this.namespace + wsService.getName(), wsService);
    
    Port port = (Port) service.getPorts().values().iterator().next();
    for (Object bindOperationObject : port.getBinding().getBindingOperations()) {
      BindingOperation bindOperation = (BindingOperation) bindOperationObject;
      WSOperation operation = this.processOperation(bindOperation.getOperation(), wsService);
      wsService.addOperation(operation);

      this.wsOperations.put(this.namespace + operation.getName(), operation);
    }
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:20,代码来源:WSDLImporter.java


示例6: _toDumpData

import javax.wsdl.BindingOperation; //导入依赖的package包/类
private DumpData _toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) throws RPCException {
            
	DumpTable functions = new DumpTable("webservice","#99cc99","#ccffcc","#000000");
	functions.setTitle("Web Service (JAX WS)");
    if(dp.getMetainfo())functions.setComment(wsdlUrl);
    
    Port port = WSUtil.getSoapPort(service);
    Binding binding = port.getBinding();
    List<BindingOperation> operations = binding.getBindingOperations();
    
    Iterator<BindingOperation> it = operations.iterator();
    BindingOperation bo;
    while(it.hasNext()){
    	bo=it.next();
    	functions.appendRow(1, new SimpleDumpData(bo.getName()), toDumpData(bo));
    }
    
    return functions;
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:20,代码来源:JaxWSClient.java


示例7: getOperations

import javax.wsdl.BindingOperation; //导入依赖的package包/类
/**
 * The method is here only for compatibility with other modules and will be removed as soon as other modules are updated.
 * 
 * @return a list of all SOAP operations found in the WSDL (including all imported definitions)
 * @deprecated
 */
@Deprecated
List<Operation> getOperations() {
    List<Operation> operations = new ArrayList<Operation>();
    
    Collection<Binding> bindings = definition.getAllBindings().values();
    for (Binding binding : bindings) {
        List<ExtensibilityElement> bindingExElements = binding.getExtensibilityElements();
        for (ExtensibilityElement bindingExElement : bindingExElements) {
            if (bindingExElement instanceof SOAPBinding ||
                bindingExElement instanceof SOAP12Binding) {
                List<BindingOperation> bindingOperations = binding.getBindingOperations();
                for (BindingOperation bindingOperation : bindingOperations) {
                    Operation operation = bindingOperation.getOperation();
                    if (operation != null) {
                        operations.add(operation);
                    }
                }
            }
        }
    }
    
    return operations;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:30,代码来源:WSDL11Parser.java


示例8: getOperationStyle

import javax.wsdl.BindingOperation; //导入依赖的package包/类
@Override
public String getOperationStyle(String portName, String operationName) throws UnknownOperationException {
    if (portName == null) {
        portName = findPort(operationName);
    }

    BindingOperation bindingOperation = getBindingOperation(portName, operationName);
    
    String style = getStyle(bindingOperation);
    if (style == null) {
        Port port = getPort(portName);
        Binding binding = port.getBinding();
        style = getStyle(binding);
    }
    
    return style;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:18,代码来源:WSDL11Parser.java


示例9: getRPCRequestMethodName

import javax.wsdl.BindingOperation; //导入依赖的package包/类
/**
 * Returns a qualified name for a RPC method that is a root element for a SOAPBody.
 * 
 * @param portName a port name of the operation
 * @param operationName an operation name
 * 
 * @return QName wrapper that is qualified name of the method or null if no method to be defined (not "rpc" operation style)
 * 
 * @throws UnknownOperationException 
 */
@Override
public QName getRPCRequestMethodName(String portName, String operationName) throws UnknownOperationException {
    if (portName == null) {
        portName = findPort(operationName);
    }

    BindingOperation bindingOperation = getBindingOperation(portName, operationName);
    
    String style = getOperationStyle(portName, operationName);
    if ("rpc".equals(style)) {
        BindingInput bindingInput = bindingOperation.getBindingInput();
        if (bindingInput != null) {
            String namespace = getNamespaceURI(bindingInput);
            if (namespace != null) {
                return new QName(namespace, operationName);
            }
        }
        return new QName(operationName);
    }

    return null;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:33,代码来源:WSDL11Parser.java


示例10: getRPCResponseMethodName

import javax.wsdl.BindingOperation; //导入依赖的package包/类
/**
 * Returns a qualified name for a RPC method that is a root element for a SOAPBody.
 * 
 * @param portName a port name of the operation
 * @param operationName an operation name
 * 
 * @return QName wrapper that is qualified name of the method or null if no method to be defined (not "rpc" operation style)
 * 
 * @throws UnknownOperationException 
 */
@Override
public QName getRPCResponseMethodName(String portName, String operationName) throws UnknownOperationException {
    if (portName == null) {
        portName = findPort(operationName);
    }

    BindingOperation bindingOperation = getBindingOperation(portName, operationName);
    
    String style = getOperationStyle(portName, operationName);
    if ("rpc".equals(style)) {
        BindingOutput bindingOutput = bindingOperation.getBindingOutput();
        if (bindingOutput != null) {
            String namespace = getNamespaceURI(bindingOutput);
            if (namespace != null) {
                return new QName(namespace, operationName);
            }
        }
        return new QName(operationName);
    }

    return null;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:33,代码来源:WSDL11Parser.java


示例11: getBindingOperation

import javax.wsdl.BindingOperation; //导入依赖的package包/类
private BindingOperation getBindingOperation(String portName, String operationName) throws UnknownOperationException {
    
    BindingOperation bindingOperation = null;
    
    for(BindingOperation bOperation : getBindingOperations(portName)) {
        Operation operation = bOperation.getOperation();
        if (operationName.equals(operation.getName())) {
            if (bindingOperation == null) {
                bindingOperation = bOperation;
            } else {
                logger.log(Level.WARNING, "overloaded operation detected ({0})", operationName);
                break;
            }
        }
    }
    
    if (bindingOperation == null) {
        throw new UnknownOperationException("no '" + operationName + "' operation found in a '" + portName + "' port");
    }
    
    return bindingOperation;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:23,代码来源:WSDL11Parser.java


示例12: getBindingOperations

import javax.wsdl.BindingOperation; //导入依赖的package包/类
private List<BindingOperation> getBindingOperations(String portName) {
    
    Port port = getPort(portName);
    if (port != null) {
        Binding binding = port.getBinding();
        if (binding != null) {
            List<ExtensibilityElement> bindingExElements = binding.getExtensibilityElements();
            for (ExtensibilityElement bindingExElement : bindingExElements) {
                if (bindingExElement instanceof SOAPBinding ||
                    bindingExElement instanceof SOAP12Binding) {
                    return binding.getBindingOperations();
                }
            }
        }
    }

    return Collections.EMPTY_LIST;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:19,代码来源:WSDL11Parser.java


示例13: getSoapAction

import javax.wsdl.BindingOperation; //导入依赖的package包/类
/**
 * Get the soapAction value for a given operation.
 *
 * @param operation The WSDL BindingOperation.
 * @return the soapAction value if it exists.
 */
public static String getSoapAction(final BindingOperation operation) {
    String soapActionUri = "";
    if (operation != null) {
        List<ExtensibilityElement> extElements = operation.getExtensibilityElements();
        for (ExtensibilityElement extElement : extElements) {
            if (extElement instanceof SOAPOperation) {
                soapActionUri = ((SOAPOperation) extElement).getSoapActionURI();
                break;
            } else if (extElement instanceof SOAP12Operation) {
                SOAP12Operation soapOperation = ((SOAP12Operation) extElement);
                Boolean soapActionRequired = soapOperation.getSoapActionRequired();
                if ((soapActionRequired == null) || soapActionRequired) {
                    soapActionUri = soapOperation.getSoapActionURI();
                }
                break;
            }
        }
    }
    return soapActionUri;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:27,代码来源:WSDLUtil.java


示例14: getHTTPLocation

import javax.wsdl.BindingOperation; //导入依赖的package包/类
private String getHTTPLocation(String operationName) {
    for (Object bindingOperation : httpBinding.getBindingOperations()) {
        if (((BindingOperation) bindingOperation).getName().equals(operationName)) {
            List<Object> extElements = ((BindingOperation) bindingOperation).getExtensibilityElements();
            if (extElements.size() == 0) {
                throw new RuntimeException();
            } else if (extElements.size() > 1) {
                throw new RuntimeException();
            } else {
                return ((HTTPOperation) extElements.get(0)).getLocationURI();
            }
        }
    }

    throw new NullPointerException("HTTP Operation's location attribute is null.");
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:17,代码来源:HTTPBindingHandler.java


示例15: parseRequest

import javax.wsdl.BindingOperation; //导入依赖的package包/类
public WSDLAwareMessage parseRequest() throws AxisFault {
    /**
     * I assume that local part of the Axis Operation's name is always equal to
     * the operation name in the WSDL.
     */
    BindingOperation bindingOp = wsdlBinding.getBindingOperation(
            wsdlBinding.getPortType().getOperation(
                    inMessageCtx.getAxisOperation().getName().getLocalPart(),
                    null,
                    null).getName(),
            null,
            null);
    if (bindingOp == null) {
        throw new AxisFault("WSDL binding operation not found for service: " +
                serviceName.getLocalPart() + " port: " + portName);
    }

    BindingInput bindingInput = bindingOp.getBindingInput();
    if (bindingInput == null) {
        throw new AxisFault("BindingInput not found for service: " +
                serviceName.getLocalPart() + " port: " + portName);
    }

    return processMessageParts(bindingInput);
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:26,代码来源:WSDLAwareSOAPProcessor.java


示例16: populateBindingOperation

import javax.wsdl.BindingOperation; //导入依赖的package包/类
@Override
protected void populateBindingOperation(Definition definition, BindingOperation bindingOperation)
    throws WSDLException {
  super.populateBindingOperation(definition, bindingOperation);
  XTeeElement element = (XTeeElement) definition.getExtensionRegistry().createExtension(BindingOperation.class,
                                                                                        XTeeElement.VERSION_TYPE);
  String version = "v1";
  String name = bindingOperation.getName().toLowerCase();
  for (String method : xRoadEndpointMapping.getMethods()) {
    method = method.substring(method.indexOf('.') + 1).toLowerCase();
    if (method.startsWith(name + ".")) {
      version = method.substring(method.indexOf('.') + 1);
      break;
    }
  }
  element.setValue(version);
  bindingOperation.addExtensibilityElement(element);
}
 
开发者ID:nortal,项目名称:j-road,代码行数:19,代码来源:XTeeSoapProvider.java


示例17: findOperation

import javax.wsdl.BindingOperation; //导入依赖的package包/类
private Operation findOperation(PortType portType,
                                BindingOperation wsdl4jBindingOperation) {
    Operation op = wsdl4jBindingOperation.getOperation();
    String input = null;
    if (op != null && op.getInput() != null) {
        input = op.getInput().getName();
        if (":none".equals(input)) {
            input = null;
        }
    }
    String output = null;
    if (op != null && op.getOutput() != null) {
        output = op.getOutput().getName();
        if (":none".equals(output)) {
            output = null;
        }
    }
    Operation op2 = portType.getOperation(op.getName(), input, output);
    return ((op2 == null) ? op : op2);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:21,代码来源:WSDL11ToAxisServiceBuilder.java


示例18: createBindingOperation

import javax.wsdl.BindingOperation; //导入依赖的package包/类
public BindingOperation createBindingOperation() {
    if (isDebugEnabled) {
        log.debug(myClassName + ".createBindingOperation()");
    }

    getWrappedDefinitionForUse();

    BindingOperation results = null;

    if (wsdlDefinition != null) {
        if (hasBeenSaved) {
            hasBeenUpdatedSinceSaving = true;
        }
        results = wsdlDefinition.createBindingOperation();
    }
    doneUsingWrappedDefinition();
    return results;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:19,代码来源:WSDLWrapperSaveImpl.java


示例19: getAttachmentFromBinding

import javax.wsdl.BindingOperation; //导入依赖的package包/类
/**
 * This method will process a WSDL Binding and build AttachmentDescription objects if the
 * WSDL dicatates attachments.
 */
public static void getAttachmentFromBinding(OperationDescriptionImpl opDesc, Binding binding) {
    if (binding != null) {
        Iterator bindingOpIter = binding.getBindingOperations().iterator();
        while (bindingOpIter.hasNext()) {
            BindingOperation bindingOp = (BindingOperation) bindingOpIter.next();
            // found the BindingOperation that matches the current OperationDescription
            if (bindingOp.getName().equals(opDesc.getName().getLocalPart())) {
                if (bindingOp.getBindingInput() != null) {
                    if (log.isDebugEnabled()) {
                            log.debug("Processing binding opertion input");
                    }
                    processBindingForMIME(bindingOp.getBindingInput().getExtensibilityElements(), 
                        opDesc, bindingOp.getOperation(), true);
                }
                if (bindingOp.getBindingOutput() != null) {
                    if (log.isDebugEnabled()) {
                        log.debug("Processing binding output");
                    }
                    processBindingForMIME(bindingOp.getBindingOutput().getExtensibilityElements(), 
                        opDesc, bindingOp.getOperation(), false);
                }
            }
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:30,代码来源:DescriptionUtils.java


示例20: getSOAPAction

import javax.wsdl.BindingOperation; //导入依赖的package包/类
public String getSOAPAction(QName serviceQname) {
    Binding binding = getFirstPortBinding(serviceQname);
    if (binding == null) {
        return null;
    }
    List operations = binding.getBindingOperations();
    for (Object opObj : operations) {
        BindingOperation operation = (BindingOperation)opObj;
        List exElements = operation.getExtensibilityElements();
        for (Object elObj : exElements) {
            ExtensibilityElement exElement = (ExtensibilityElement)elObj;
            if (isSoapOperation(exElement)) {
                SOAPOperation soapOperation = (SOAPOperation)exElement;
                return soapOperation.getSoapActionURI();
            }
        }
    }
    return null;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:20,代码来源:WSDL4JWrapper.java



注:本文中的javax.wsdl.BindingOperation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ExposesResourceFor类代码示例发布时间:2022-05-21
下一篇:
Java JmmDNS类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap