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


Java BindingOutput类代码示例

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


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

示例1: addWsdlBindingOperation

import javax.wsdl.BindingOutput; //导入依赖的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: setOutputEncodingStyle

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

示例3: getRPCResponseMethodName

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

示例4: addQNameReference

import javax.wsdl.BindingOutput; //导入依赖的package包/类
/**
 * Add the QName for the binding output
 *
 * @param outMessage
 * @param wsdl4jOperation
 * @param isWrapped
 */
private void addQNameReference(AxisMessage outMessage,
                               Operation wsdl4jOperation, BindingOutput bindingOutput,
                               boolean isWrapped) {

    if (bindingOutput != null) {
        List extensibilityElements = bindingOutput.getExtensibilityElements();
        if (wsdl4jOperation.getOutput() == null) {
            return;
        }
        Message wsdl4jMessage = wsdl4jOperation.getOutput().getMessage();

        addQNameReference(outMessage,
                          wsdl4jOperation,
                          isWrapped,
                          extensibilityElements,
                          wsdl4jMessage,
                          wsdl4jOperation.getName() + WRAPPED_OUTPUTNAME_SUFFIX);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:27,代码来源:WSDL11ToAxisServiceBuilder.java

示例5: createBindingOutput

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

    getWrappedDefinitionForUse();

    BindingOutput results = null;

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

示例6: getSoapOutputUse

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

示例7: createSOAPResponse

import javax.wsdl.BindingOutput; //导入依赖的package包/类
/**
 * Create SOAP Response message from response returned byBPELServer ODE engine.
 *
 * @param bpelMessageContext DTO contains details on current messageflow.
 * @param odeMessageExchange ODE MyRoleMessageExchange contains data on the current process
 *                           invocation
 * @throws AxisFault in case of a error while creating SOAP response.
 */
public static void createSOAPResponse(
        final BPELMessageContext bpelMessageContext,
        final MyRoleMessageExchange odeMessageExchange) throws AxisFault {
    checkForNullValuesInResponse(bpelMessageContext, odeMessageExchange);

    BindingOperation bindingOp = getBindingOperation(bpelMessageContext,
            odeMessageExchange.getOperationName());
    BindingOutput bindingOutput = getBindingOutPut(bindingOp);

    SOAPEnvelope soapEnv = bpelMessageContext.getOutMessageContext().getEnvelope();
    if (soapEnv == null) {
        soapEnv = bpelMessageContext.getSoapFactoryForCurrentMessageFlow().getDefaultEnvelope();
        bpelMessageContext.getOutMessageContext().setEnvelope(soapEnv);
    }

    populateSOAPHeaders(
            odeMessageExchange.getResponse(),
            soapEnv,
            bpelMessageContext.getSoapFactoryForCurrentMessageFlow(),
            getSOAPHeaders(bindingOutput),
            odeMessageExchange.getOperation());

    populateSOAPBody(
            soapEnv,
            bindingOutput,
            bpelMessageContext.isSoap12(),
            bpelMessageContext.getSoapFactoryForCurrentMessageFlow(),
            odeMessageExchange.getOperation(),
            odeMessageExchange.getOperation().getOutput().getMessage(),
            odeMessageExchange.getResponse(),
            bpelMessageContext.isRPCStyleOperation(),
            false);
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:42,代码来源:SOAPUtils.java

示例8: getBindingOutPut

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

示例9: parseResponseFromRESTService

import javax.wsdl.BindingOutput; //导入依赖的package包/类
public static org.apache.ode.bpel.iapi.Message parseResponseFromRESTService(BPELMessageContext
                                                                                    partnerInvocationContext,
                                                                            PartnerRoleMessageExchange
                                                                                    odePartnerMex) {
    org.apache.ode.bpel.iapi.Message messageToODE = odePartnerMex.createMessage(
            odePartnerMex.getOperation().getOutput().getMessage().getQName());
    BindingOperation bindingOp = getBindingOperation(partnerInvocationContext,
            odePartnerMex.getOperationName());
    BindingOutput bindingOutPut = getBindingOutPut(bindingOp);
    javax.wsdl.extensions.mime.MIMEContent mimeContent = getFirstExtensibilityElement(bindingOutPut, MIMEContent
            .class);
    if (mimeContent != null) {
        SOAPEnvelope soapEnv = partnerInvocationContext.getOutMessageContext().getEnvelope();

        Iterator childElementsItr = soapEnv.getBody().getChildElements();
        while (childElementsItr.hasNext()) {
            OMNode child = (OMNode) childElementsItr.next();
            if (child.getType() == OMNode.ELEMENT_NODE) {
                Document doc = DOMUtils.newDocument();
                Element domPart = doc.createElementNS(null, mimeContent.getPart());
                domPart.appendChild(doc.importNode(OMUtils.toDOM((OMElement) child), true));
                messageToODE.setPart(mimeContent.getPart(), domPart);

                return messageToODE;
            }
        }
    }
    throw new IllegalArgumentException("WSO2 BPS only support HTTP binding with mime output.");
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:30,代码来源:SOAPUtils.java

示例10: populateBindingOutput

import javax.wsdl.BindingOutput; //导入依赖的package包/类
@Override
protected void populateBindingOutput(Definition definition, BindingOutput bindingOutput, Output output)
    throws WSDLException {
  for (SOAPHeader header : makeHeaders(definition)) {
    bindingOutput.addExtensibilityElement(header);
  }
  super.populateBindingOutput(definition, bindingOutput, output);
}
 
开发者ID:nortal,项目名称:j-road,代码行数:9,代码来源:XTeeSoapProvider.java

示例11: createBindingOutput

import javax.wsdl.BindingOutput; //导入依赖的package包/类
public BindingOutput createBindingOutput() {
    if (isDebugEnabled) {
        log.debug(myClassName + ".createBindingOutput()");
    }
    if (wsdlDefinition != null) {
        return wsdlDefinition.createBindingOutput();
    }
    return null;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:10,代码来源:WSDLWrapperBasicImpl.java

示例12: getBindingNamespace

import javax.wsdl.BindingOutput; //导入依赖的package包/类
/**
 * This method will retrieve the namespace that is specified by the BindingInput or
 * BindingOutput object.
 */
private String getBindingNamespace(AttributeExtensible opInfo) {
    if (opInfo instanceof BindingInput) {
        BindingInput input = (BindingInput) opInfo;
        return DescriptionUtils.getNamespaceFromSOAPElement(input.getExtensibilityElements());
    } else if (opInfo instanceof BindingOutput) {
        BindingOutput output = (BindingOutput) opInfo;
        return DescriptionUtils.getNamespaceFromSOAPElement(output.getExtensibilityElements());
    }
    return null;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:15,代码来源:OperationDescriptionImpl.java

示例13: getSOAPHeaders

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

示例14: visit

import javax.wsdl.BindingOutput; //导入依赖的package包/类
protected void visit(BindingOutput bindingOutput) {
    SOAPBody body = getSOAPBody(bindingOutput.getExtensibilityElements());
    String encoding = body.getUse();
    if (encoding == null || !encoding.equals("encoded")) {
        context.addFailure(new ValidationFailure("The use attribute of the binding output operation must be 'encoded': " + bindingOutput.getName()));
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:8,代码来源:LightWeightMappingValidator.java

示例15: getSOAPHeaders

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


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