当前位置: 首页>>代码示例>>Java>>正文


Java Binding.getBindingOperations方法代码示例

本文整理汇总了Java中javax.wsdl.Binding.getBindingOperations方法的典型用法代码示例。如果您正苦于以下问题:Java Binding.getBindingOperations方法的具体用法?Java Binding.getBindingOperations怎么用?Java Binding.getBindingOperations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.wsdl.Binding的用法示例。


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

示例1: _toDumpData

import javax.wsdl.Binding; //导入方法依赖的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

示例2: getOperations

import javax.wsdl.Binding; //导入方法依赖的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

示例3: getBindingOperations

import javax.wsdl.Binding; //导入方法依赖的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

示例4: getSOAPAction

import javax.wsdl.Binding; //导入方法依赖的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

示例5: isOperationInBinding

import javax.wsdl.Binding; //导入方法依赖的package包/类
public static boolean isOperationInBinding(Definition definition, String portTypeName, String operationName)
        throws CoreException {
    Collection<?> services = definition.getServices().values();
    for (Object s : services) {
        Service service = (Service) s;
        Collection<?> ports = service.getPorts().values();
        for (Object p : ports) {
            Port port = (Port) p;
            Binding binding = port.getBinding();
            if (binding == null) {
                continue;
            }
            PortType portType = binding.getPortType();
            if (portType == null || !portTypeName.equals(portType.getQName().getLocalPart())) {
                continue;
            }
            List<?> bindingOperations = binding.getBindingOperations();
            for (Object o : bindingOperations) {
                BindingOperation bo = (BindingOperation) o;
                if (operationName.equals(bo.getName())) {
                    return true;
                }
            }
        }
    }
    return false;
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:28,代码来源:WSDLUtils.java

示例6: getAllPaths

import javax.wsdl.Binding; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private Collection<String> getAllPaths() throws URISyntaxException {
    final Set<String> paths = new HashSet<String>();
    final Set<QName> portTypes = new HashSet<QName>();
    final Set<QName> alreadyCreated = new HashSet<QName>();
    for (Binding binding : (Collection<Binding>) wsdlDefinition.getAllBindings().values()) {
        final QName portType = binding.getPortType().getQName();
        if (portTypes.add(portType)) {
            for (BindingOperation operation : (Collection<BindingOperation>) binding.getBindingOperations()) {
                Operation oper = operation.getOperation();
                Input inDef = oper.getInput();
                if (inDef != null) {
                    Message inMsg = inDef.getMessage();
                    addParamsToPath(portType, oper, inMsg, paths, alreadyCreated);
                }

                Output outDef = oper.getOutput();
                if (outDef != null) {
                    Message outMsg = outDef.getMessage();
                    addParamsToPath(portType, oper, outMsg, paths, alreadyCreated);
                }
                for (Fault fault : (Collection<Fault>) oper.getFaults().values()) {
                    Message faultMsg = fault.getMessage();
                    addParamsToPath(portType, oper, faultMsg, paths, alreadyCreated);
                }
            }
        }
    }
    return paths;
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:31,代码来源:PublishMetadataRunnable.java

示例7: getOperationName

import javax.wsdl.Binding; //导入方法依赖的package包/类
public String getOperationName(QName serviceQname, QName portQname) {
    Port port = getPort(serviceQname, portQname);
    Binding binding = port.getBinding();
    if (binding == null) {
        return null;
    }

    List operations = binding.getBindingOperations();
    for (Object opObj : operations) {
        BindingOperation operation = (BindingOperation)opObj;
        return operation.getName();
    }
    return null;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:15,代码来源:WSDL4JWrapper.java

示例8: checkWSRFPorts

import javax.wsdl.Binding; //导入方法依赖的package包/类
private void checkWSRFPorts(Map<String, WSRF_Version> wsrfPorts) {
    Collection<Service> services = definition.getAllServices().values();
    for (Service service : services) {
        Collection<Port> ports = service.getPorts().values();
        loop:
        for (Port port : ports) {
            String portName = port.getName();
            Binding binding = port.getBinding();
            List<BindingOperation> bindingOperations = binding.getBindingOperations();
            for(BindingOperation bindingOperation : bindingOperations) {
                Operation operation = bindingOperation.getOperation();
                String operationName = operation.getName();
                for (WSRF_RPOperation resourcePropertyOperation : WSRF_RPOperation.values()) {
                    if (operationName.equals(resourcePropertyOperation.name())) {
                        try {
                            List<Part> parts = getInputParts(portName, operationName);
                            if (parts.size() > 0) {
                                Part part = parts.get(0);
                                QName qname = part.getElementName();
                                if (qname == null) {
                                    qname = part.getTypeName();
                                }
                                
                                if (qname != null) {
                                    String namespace = qname.getNamespaceURI();
                                    if (namespace != null && namespace.length() > 0) {
                                        for (WSRF_Version wsrfVersion : WSRF_Version.values()) {
                                            if (wsrfVersion.WSRF_RP.equals(namespace)) {
                                                if (!WSRF_Version.Standard.equals(wsrfVersion)) {
                                                    logger.log(Level.WARNING, "draft WSRF version found for the WSRF operation: {0} ({1})", new Object[]{operationName, wsrfVersion.name()});
                                                }
                                                else {
                                                    String soapAction = getSOAPActionURI(bindingOperation);
                                                    if (soapAction == null) {
                                                        logger.log(Level.WARNING, "no soap action for the WSRF operation: {0}( {1})", new Object[]{operationName, resourcePropertyOperation.SOAP_ACTION});
                                                    } else if (!resourcePropertyOperation.SOAP_ACTION.equals(soapAction)) {
                                                        logger.log(Level.WARNING, "wrong soap action for the WSRF operation: {0}( {1})", new Object[]{operationName, resourcePropertyOperation.SOAP_ACTION});
                                                    }
                                                }

                                                wsrfPorts.put(portName, wsrfVersion);
                                                break;
                                            }
                                        }
                                    }
                                }
                            }
                            
                        } catch (UnknownOperationException ex) {}
                        break loop;
                    }
                }
            }
        }
    }
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:57,代码来源:WSDL11Parser.java

示例9: populateComponent

import javax.wsdl.Binding; //导入方法依赖的package包/类
private static ServiceInfo populateComponent(Service service) {
    ServiceInfo serviceInfo = new ServiceInfo();
    serviceInfo.setServiceName(service.getQName());
    Collection<Port> ports = service.getPorts().values();
    for (Port port : ports) {
        String soapLocation = null;
        SOAPAddress soapAddress = findExtensibilityElement(port.getExtensibilityElements(), SOAPAddress.class);
        if (null != soapAddress) {
            soapLocation = soapAddress.getLocationURI();
        } else {
            SOAP12Address soap12Address = findExtensibilityElement(port.getExtensibilityElements(), SOAP12Address.class);
            if (null != soap12Address) {
                soapLocation = soap12Address.getLocationURI();
            }
        }
        Binding binding = port.getBinding();
        for (BindingOperation operation : (Collection<BindingOperation>) binding.getBindingOperations()) {
            SOAPOperation soapOperation = findExtensibilityElement(operation.getExtensibilityElements(), SOAPOperation.class);

            if (null != soapOperation && OPERATION_TYPE_RPC.equalsIgnoreCase(soapOperation.getStyle())) {
                // TESB-6151 disable display of unsupported RPC type.
                serviceInfo.setHasRpcOperation(true);
                continue;
            }
            OperationInfo operationInfo = new OperationInfo(operation.getOperation());
            operationInfo.setPortName(port.getName());
            operationInfo.setNamespaceURI(binding.getPortType().getQName().getNamespaceURI());
            if (soapOperation != null) {
                operationInfo.setSoapActionURI(soapOperation.getSoapActionURI());
            } else {
                SOAP12Operation soap12Operation = findExtensibilityElement(operation.getExtensibilityElements(),
                        SOAP12Operation.class);
                if (soap12Operation != null) {
                    operationInfo.setSoapActionURI(soap12Operation.getSoapActionURI());
                }
            }

            operationInfo.setTargetURL(soapLocation);
            serviceInfo.addOperation(operationInfo);
        }
    }
    return serviceInfo;
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:44,代码来源:ComponentBuilder.java

示例10: buildOperations

import javax.wsdl.Binding; //导入方法依赖的package包/类
private List buildOperations(Binding binding) {
      System.out.println("进入buildOperations(Binding binding)方法,构建服务所有的操作对象List buildOperations");
	List operationInfos = new ArrayList();

	List operations=binding.getBindingOperations();

	if (operations!= null && !operations.isEmpty()) {
            
		Vector soapBindingElems = findExtensibilityElement(binding
				.getExtensibilityElements(), "binding");
		String style = "document"; // default
		
		ExtensibilityElement soapBindingElem = (ExtensibilityElement) soapBindingElems
				.elementAt(0);
		if (soapBindingElem != null
				&& soapBindingElem instanceof SOAPBinding) {
			//SOAPBinding类代表的就是<wsdl:binding>下的子元素:<wsdlsoap:binding元素>
			SOAPBinding soapBinding = (SOAPBinding) soapBindingElem;
			style = soapBinding.getStyle();
		}

		Iterator opIter = operations.iterator();

		while (opIter.hasNext()) {
			//BindingOperation类代表的就是<wsdl:binding>下的子元素:<wsdlsoap:operation元素>
			BindingOperation oper = (BindingOperation) opIter.next();
			Vector operElems = findExtensibilityElement(oper
					.getExtensibilityElements(), "operation");
			ExtensibilityElement operElem = (ExtensibilityElement) operElems
					.elementAt(0);
			//SOAPOperation类代表的就是<wsdlsoap:operation>下的子元素:<wsdlsoap:operation/>
			if (operElem != null && operElem instanceof SOAPOperation) {

				OperationInfo operationInfo = new OperationInfo(style);

				buildOperation(operationInfo, oper);

				operationInfos.add(operationInfo);
			}
		}
	}

	return operationInfos;
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:45,代码来源:ComponentBuilder.java

示例11: walkTree

import javax.wsdl.Binding; //导入方法依赖的package包/类
public void walkTree() {
    begin();
    try {
        visit(definition);
        for (Iterator iterator = definition.getImports().entrySet().iterator(); iterator.hasNext(); ) {
            Map.Entry entry = (Map.Entry) iterator.next();
            String namespaceURI = (String) entry.getKey();
            List importsForNamespace = (List) entry.getValue();
            for (Iterator iterator1 = importsForNamespace.iterator(); iterator1.hasNext(); ) {
                Import anImport = (Import) iterator1.next();
                visit(anImport);
            }
        }
        visit(definition.getTypes());
        Collection messages = definition.getMessages().values();
        for (Iterator iterator = messages.iterator(); iterator.hasNext(); ) {
            Message message = (Message) iterator.next();
            visit(message);
            Collection parts = message.getParts().values();
            for (Iterator iterator2 = parts.iterator(); iterator2.hasNext(); ) {
                Part part = (Part) iterator2.next();
                visit(part);
            }
        }
        Collection services = definition.getServices().values();
        for (Iterator iterator = services.iterator(); iterator.hasNext(); ) {
            Service service = (Service) iterator.next();
            visit(service);
            Collection ports = service.getPorts().values();
            for (Iterator iterator1 = ports.iterator(); iterator1.hasNext(); ) {
                Port port = (Port) iterator1.next();
                visit(port);
                Binding binding = port.getBinding();
                visit(binding);
                List bindingOperations = binding.getBindingOperations();
                for (int i = 0; i < bindingOperations.size(); i++) {
                    BindingOperation bindingOperation = (BindingOperation) bindingOperations.get(i);
                    visit(bindingOperation);
                    visit(bindingOperation.getBindingInput());
                    visit(bindingOperation.getBindingOutput());
                    Collection bindingFaults = bindingOperation.getBindingFaults().values();
                    for (Iterator iterator2 = bindingFaults.iterator(); iterator2.hasNext(); ) {
                        BindingFault bindingFault = (BindingFault) iterator2.next();
                        visit(bindingFault);
                    }

                }
                PortType portType = binding.getPortType();
                visit(portType);
                List operations = portType.getOperations();
                for (int i = 0; i < operations.size(); i++) {
                    Operation operation = (Operation) operations.get(i);
                    visit(operation);
                    {
                        Input input = operation.getInput();
                        visit(input);
                    }
                    {
                        Output output = operation.getOutput();
                        visit(output);
                    }
                    Collection faults = operation.getFaults().values();
                    for (Iterator iterator2 = faults.iterator(); iterator2.hasNext(); ) {
                        Fault fault = (Fault) iterator2.next();
                        visit(fault);
                    }

                }
            }
        }
    } catch (Exception e) {
        logger.error(e.getMessage(), e);
    } finally {
        end();
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:77,代码来源:WsdlVisitor.java


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