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


Java Operation.getOutput方法代码示例

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


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

示例1: OperationInfo

import javax.wsdl.Operation; //导入方法依赖的package包/类
public OperationInfo(Operation operation) {
    targetMethodName = operation.getName();

    Input inDef = operation.getInput();
    if (inDef != null) {
        Message inMsg = inDef.getMessage();
        if (inMsg != null) {
            input = getParameterFromMessage(inMsg);
        }
    }
    Output outDef = operation.getOutput();
    if (outDef != null) {
        Message outMsg = outDef.getMessage();
        if (outMsg != null) {
            output = getParameterFromMessage(outMsg);
        }
    }
    for (Fault fault : (Collection<Fault>) operation.getFaults().values()) {
        Message faultMsg = fault.getMessage();
        if (faultMsg != null) {
            faults.add(getParameterFromMessage(faultMsg));
        }
    }
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:25,代码来源:OperationInfo.java

示例2: findOperation

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

示例3: addQNameReference

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

示例4: convertPortType

import javax.wsdl.Operation; //导入方法依赖的package包/类
private void convertPortType( PortType portType, Binding binding )
	throws IOException
{
	String comment = "";
	if ( portType.getDocumentationElement() != null ) {
		comment = portType.getDocumentationElement().getNodeValue();
	}
	
	Style style = Style.DOCUMENT;
	for( ExtensibilityElement element : (List<ExtensibilityElement>)binding.getExtensibilityElements() ) {
		if ( element instanceof SOAPBinding ) {
			if ( "rpc".equals(((SOAPBinding)element).getStyle()) ) {
				style = Style.RPC;
			}
		} else if ( element instanceof HTTPBinding ) {
			style = Style.HTTP;
		}
	}
	Interface iface = new Interface( portType.getQName().getLocalPart(), comment );
	List< Operation > operations = portType.getOperations();
	for( Operation operation : operations ) {
		if ( operation.getOutput() == null ) {
			iface.addOneWayOperation( convertOperation( operation, style ) );
		} else {
			iface.addRequestResponseOperation( convertOperation( operation, style ) );
		}
	}
	interfaces.put( iface.name(), iface );
}
 
开发者ID:jolie,项目名称:jolie,代码行数:30,代码来源:WSDLConverter.java

示例5: getOutputParts

import javax.wsdl.Operation; //导入方法依赖的package包/类
private List<Part> getOutputParts(String portName, String operationName) throws UnknownOperationException {
    List<Part> parts = new ArrayList<Part>();
    
    BindingOperation bindingOperation = getBindingOperation(portName, operationName);
    Operation operation = bindingOperation.getOperation();

    Output output = operation.getOutput();
    if (output != null) {
        Message outputMessage = output.getMessage();

        List<ExtensibilityElement> extensibilityElements = bindingOperation.getBindingOutput().getExtensibilityElements();
        for (ExtensibilityElement extensibilityElement : extensibilityElements) {
            if (extensibilityElement instanceof SOAPBody) {
                SOAPBody soapBody = (SOAPBody) extensibilityElement;

                Collection<String> partNames = soapBody.getParts();

                if (partNames == null) {
                    partNames = outputMessage.getParts().keySet();
                }

                for (String partName : partNames) {
                    Part part = outputMessage.getPart(partName);
                    parts.add(part);
                }
            }
        }
    }

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

示例6: getAllPaths

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

import javax.wsdl.Operation; //导入方法依赖的package包/类
public void testGenerateOutputActionNoNames() {
    String expectedAction =
            "http://ws.apache.org/axis2/actiontest/withoutWSAWActionNoName/echoResponse";
    PortType pt = definition.getPortType(
            new QName("http://ws.apache.org/axis2/actiontest/", "withoutWSAWActionNoName"));
    List operations = pt.getOperations();
    Operation op = (Operation) operations.get(0);
    Output out = op.getOutput();
    String actualAction =
            WSDL11ActionHelper.getActionFromOutputElement(definition, pt, op, out);
    assertEquals(expectedAction, actualAction);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:13,代码来源:WSDL11ActionHelperTest.java

示例8: testGenerateOutputAction

import javax.wsdl.Operation; //导入方法依赖的package包/类
public void testGenerateOutputAction() {
    String expectedAction =
            "http://ws.apache.org/axis2/actiontest/withoutWSAWAction/NamedOutput";
    PortType pt = definition.getPortType(
            new QName("http://ws.apache.org/axis2/actiontest/", "withoutWSAWAction"));
    List operations = pt.getOperations();
    Operation op = (Operation) operations.get(0);
    Output out = op.getOutput();
    String actualAction =
            WSDL11ActionHelper.getActionFromOutputElement(definition, pt, op, out);
    assertEquals(expectedAction, actualAction);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:13,代码来源:WSDL11ActionHelperTest.java

示例9: testGetWSAWOutputAction

import javax.wsdl.Operation; //导入方法依赖的package包/类
public void testGetWSAWOutputAction() {
    String expectedAction = "http://example.org/action/echoOut";
    PortType pt = definition
            .getPortType(new QName("http://ws.apache.org/axis2/actiontest/", "withWSAWAction"));
    List operations = pt.getOperations();
    Operation op = (Operation) operations.get(0);
    Output out = op.getOutput();
    String actualAction =
            WSDL11ActionHelper.getActionFromOutputElement(definition, pt, op, out);
    assertEquals(expectedAction, actualAction);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:WSDL11ActionHelperTest.java

示例10: LightweightOperationInfoBuilder

import javax.wsdl.Operation; //导入方法依赖的package包/类
public LightweightOperationInfoBuilder(BindingOperation bindingOperation, Method method) throws OpenEJBException {
    if (bindingOperation == null) {
        throw new OpenEJBException("No BindingOperation supplied for method " + method.getName());
    }

    Operation operation = bindingOperation.getOperation();
    this.operationName = operation.getName();
    this.inputMessage = operation.getInput().getMessage();
    this.outputMessage = operation.getOutput() == null ? null : operation.getOutput().getMessage();
    this.method = method;
}
 
开发者ID:apache,项目名称:tomee,代码行数:12,代码来源:LightweightOperationInfoBuilder.java

示例11: buildOperation

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

示例12: HeavyweightOperationInfoBuilder

import javax.wsdl.Operation; //导入方法依赖的package包/类
public HeavyweightOperationInfoBuilder(BindingOperation bindingOperation, ServiceEndpointMethodMapping methodMapping, JavaWsdlMapping mapping, XmlSchemaInfo schemaInfo) throws OpenEJBException {
    Operation operation = bindingOperation.getOperation();
    this.operationName = operation.getName();
    this.operationStyle = JaxRpcOperationInfo.OperationStyle.valueOf(operation.getStyle().toString());
    this.outputMessage = operation.getOutput() == null ? null : operation.getOutput().getMessage();
    this.inputMessage = operation.getInput().getMessage();

    // faults
    for (Object o : operation.getFaults().values()) {
        faults.add((Fault) o);
    }

    this.mapping = mapping;
    this.methodMapping = methodMapping;
    this.schemaInfo = schemaInfo;

    // index types - used to process build exception class constructor args
    for (JavaXmlTypeMapping javaXmlTypeMapping : mapping.getJavaXmlTypeMapping()) {
        String javaClassName = javaXmlTypeMapping.getJavaType();
        if (javaXmlTypeMapping.getAnonymousTypeQname() != null) {
            String anonymousTypeQName = javaXmlTypeMapping.getAnonymousTypeQname();
            anonymousTypes.put(anonymousTypeQName, javaClassName);
        } else if (javaXmlTypeMapping.getRootTypeQname() != null) {
            QName qname = javaXmlTypeMapping.getRootTypeQname();
            publicTypes.put(qname, javaClassName);
        }
    }

    // BindingStyle
    if (methodMapping.getWrappedElement() != null) {
        bindingStyle = BindingStyle.DOCUMENT_LITERAL_WRAPPED;
    } else {
        BindingInput bindingInput = bindingOperation.getBindingInput();

        SOAPOperation soapOperation = JaxRpcServiceInfoBuilder.getExtensibilityElement(SOAPOperation.class, bindingOperation.getExtensibilityElements());
        String styleString = soapOperation.getStyle();
        if (styleString == null) {
            SOAPBinding soapBinding = JaxRpcServiceInfoBuilder.getExtensibilityElement(SOAPBinding.class, bindingInput.getExtensibilityElements());
            styleString = soapBinding.getStyle();
        }

        SOAPBody soapBody = JaxRpcServiceInfoBuilder.getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements());
        String useString = soapBody.getUse();

        bindingStyle = BindingStyle.getBindingStyle(styleString, useString);
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:48,代码来源:HeavyweightOperationInfoBuilder.java

示例13: walkTree

import javax.wsdl.Operation; //导入方法依赖的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.Operation.getOutput方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。