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


Java BindingOperation类代码示例

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


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


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