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


Java BindingOperation.getBindingOutput方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: getSoapOutputUse

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

    BindingOperation bindingOperation = getBindingOperation(portName, operationName);
    BindingOutput bindingOutput = bindingOperation.getBindingOutput();
    if (bindingOutput != null) {
        return getUse(bindingOutput);
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:14,代码来源:WSDL11Parser.java

示例5: getBindingOutPut

import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
private static BindingOutput getBindingOutPut(final BindingOperation bOp) {
    BindingOutput bOutput = bOp.getBindingOutput();
    if (bOutput == null) {
        throw new NullPointerException("BindingOutput cannot be null for operation "
                + bOp.getName() + ".");
    }

    return bOutput;
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:10,代码来源:SOAPUtils.java

示例6: getBindingOutputNamespace

import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
/**
 * This method will return the namespace for the BindingOutput that this operation
 * specifies. It will first look for a namespace on the WSDL Binding object and then 
 * default to the web service's target namespace.
 */
public String getBindingOutputNamespace() {
    String tns = null;
    Binding binding =
            this.getEndpointInterfaceDescriptionImpl()
                .getEndpointDescriptionImpl()
                .getWSDLBinding();
    if (binding != null) {
        if (log.isDebugEnabled()) {
            log.debug("Found WSDL binding");
        }
        // this call does not support overloaded WSDL operations as it
        // does not specify the name of the input and output messages
        BindingOperation bindingOp =
                binding.getBindingOperation(getOperationName(), null, null);
        if (bindingOp != null && bindingOp.getBindingOutput() != null) {
            if (log.isDebugEnabled()) {
                log.debug("Found WSDL binding operation and output");
            }
            tns = getBindingNamespace(bindingOp.getBindingOutput());
            if (tns != null && log.isDebugEnabled()) {
                log.debug("For operation: " + bindingOp.getName()
                        + " returning the following namespace for output message"
                        + " from WSDL: " + tns);
            }
        }
    }
    if (tns == null) {
        tns = getEndpointInterfaceDescription().getTargetNamespace();
        if (log.isDebugEnabled()) {
            log.debug("For binding output returning @WebService.targetNamespace: " + tns);
        }
    }
    return tns;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:40,代码来源:OperationDescriptionImpl.java

示例7: getSOAPHeaders

import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
/**
 * Build a HashSet of SOAP header names for the specified operation and binding.
 *
 * @param binding       WSDL Binding instance.
 * @param operationName Name of the operation.
 * @return HashSet of soap header names, empty set if no headers present.
 */
protected static HashSet<String> getSOAPHeaders(Binding binding, String operationName) {

    List<ExtensibilityElement> headers = new ArrayList<ExtensibilityElement>();
    BindingOperation bindingOperation = binding.getBindingOperation(operationName, null, null);
    if (bindingOperation == null) {
        throw new IllegalArgumentException("Can not find operation: " + operationName);
    }

    BindingInput bindingInput = bindingOperation.getBindingInput();
    if (bindingInput != null) {
        headers.addAll(WsdlUtils.findExtensibilityElements(bindingInput, SOAP_HEADER_ELEMENT_NAME));
    }

    BindingOutput bindingOutput = bindingOperation.getBindingOutput();
    if (bindingOutput != null) {
        headers.addAll(WsdlUtils.findExtensibilityElements(bindingOutput, SOAP_HEADER_ELEMENT_NAME));
    }

    HashSet<String> headerSet = new HashSet<String>(headers.size());
    for (ExtensibilityElement element : headers) {
    	if (element instanceof SOAP12Header) {
    		headerSet.add(((SOAP12Header)element).getPart());
    	} else {
    		headerSet.add(((SOAPHeader)element).getPart());
    	}
    }

    return headerSet;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:37,代码来源:WsdlUtils.java

示例8: getSOAPHeaders

import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
/**
 * Build a HashSet of SOAP header names for the specified operation and binding.
 *
 * @param binding
 *          WSDL Binding instance.
 * @param operationName
 *          Name of the operation.
 * @return HashSet of soap header names, empty set if no headers present.
 */
protected static HashSet<String> getSOAPHeaders( Binding binding, String operationName ) {

  List<ExtensibilityElement> headers = new ArrayList<ExtensibilityElement>();
  BindingOperation bindingOperation = binding.getBindingOperation( operationName, null, null );
  if ( bindingOperation == null ) {
    throw new IllegalArgumentException( "Can not find operation: " + operationName );
  }

  BindingInput bindingInput = bindingOperation.getBindingInput();
  if ( bindingInput != null ) {
    headers.addAll( WsdlUtils.findExtensibilityElements( bindingInput, SOAP_HEADER_ELEMENT_NAME ) );
  }

  BindingOutput bindingOutput = bindingOperation.getBindingOutput();
  if ( bindingOutput != null ) {
    headers.addAll( WsdlUtils.findExtensibilityElements( bindingOutput, SOAP_HEADER_ELEMENT_NAME ) );
  }

  HashSet<String> headerSet = new HashSet<String>( headers.size() );
  for ( ExtensibilityElement element : headers ) {
    if ( element instanceof SOAP12Header ) {
      headerSet.add( ( (SOAP12Header) element ).getPart() );
    } else {
      headerSet.add( ( (SOAPHeader) element ).getPart() );
    }
  }

  return headerSet;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:39,代码来源:WsdlUtils.java

示例9: buildOperation

import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
private OperationInfo buildOperation(OperationInfo operationInfo,
		BindingOperation bindingOper) {
       System.out.println("从一个BindingOperation对象(<wsdl:operation>)构建OperationInfo对象");
	Operation oper = bindingOper.getOperation();
	operationInfo.setTargetMethodName(oper.getName());
	Vector operElems = findExtensibilityElement(bindingOper
			.getExtensibilityElements(), "operation");
	ExtensibilityElement operElem = (ExtensibilityElement) operElems
			.elementAt(0);
	if (operElem != null && operElem instanceof SOAPOperation) {
		SOAPOperation soapOperation = (SOAPOperation) operElem;
		operationInfo.setSoapActionURI(soapOperation.getSoapActionURI());
	}
	BindingInput bindingInput = bindingOper.getBindingInput();
	BindingOutput bindingOutput = bindingOper.getBindingOutput();
	Vector bodyElems = findExtensibilityElement(bindingInput
			.getExtensibilityElements(), "body");
	ExtensibilityElement bodyElem = (ExtensibilityElement) bodyElems
			.elementAt(0);

	if (bodyElem != null && bodyElem instanceof SOAPBody) {
		SOAPBody soapBody = (SOAPBody) bodyElem;

		List styles = soapBody.getEncodingStyles();
		String encodingStyle = null;

		if (styles != null) {

			encodingStyle = styles.get(0).toString();
		}

		if (encodingStyle == null) {

			encodingStyle = DEFAULT_SOAP_ENCODING_STYLE;
		}

		operationInfo.setEncodingStyle(encodingStyle.toString());

		operationInfo.setTargetObjectURI(soapBody.getNamespaceURI());
	}

	Input inDef = oper.getInput();
       System.out.println("开始转移到了<wsdl:portTyp>结点下的<wsdl:input>");
	if (inDef != null) {
		Message inMsg = inDef.getMessage();
		if (inMsg != null) {
			operationInfo.setInputMessageName(inMsg.getQName().getLocalPart());
               //输入消息的参数构建
			getParameterFromMessage(operationInfo, inMsg, 1);
			System.out.println("***操作:"+operationInfo.getTargetMethodName()+"的所有输入参数已经构建完毕***");
			  System.out.println("");
			operationInfo.setInmessage(inMsg);
		}
	}

	Output outDef = oper.getOutput();

	if (outDef != null) {

		Message outMsg = outDef.getMessage();

		if (outMsg != null) {
			operationInfo.setOutputMessageName(outMsg.getQName()
					.getLocalPart());
               //输出消息的参数构建
			getParameterFromMessage(operationInfo, outMsg, 2);
			System.out.println("***操作:"+operationInfo.getTargetMethodName()+"的所有输出参数已经构建完毕***");
			System.out.println("");
			operationInfo.setOutmessage(outMsg);
		}
	}
	

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


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