javax.wsdl.Output类的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(12.9k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中javax.wsdl.Output类的一些代码示例,展示了Output类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Output类的具体详情如下:
包路径:javax.wsdl.Output
类名称:Output

Output介绍

[英]This interface represents an output message, and contains the name of the output and the message itself.
[中]此接口表示输出消息,并包含输出名称和消息本身。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

private void loadParameters( Operation op ) throws KettleStepException {
 Input input = op.getInput();
 if ( input != null ) {
  Message in = input.getMessage();
  List<Object> paramOrdering = op.getParameterOrdering();
  List<Part> inParts = in.getOrderedParts( paramOrdering );
 Output output = op.getOutput();
 if ( output != null ) {
  Message out = output.getMessage();
  List<Part> outParts = out.getOrderedParts( null );

代码示例来源:origin: wsdl4j/wsdl4j

String opName = op.getName();
 OperationType opStyle = op.getStyle();
 String defaultInputName = opName;
 Input input = op.getInput();
  String opInputName = input.getName();
  String opOutputName = output.getName();

代码示例来源:origin: wsdl4j/wsdl4j

output.setName(name);
 message.setQName(messageName);
 def.addMessage(message);
output.setMessage(message);
 output.setDocumentationElement(tempEl);
 output.addExtensibilityElement(
  parseExtensibilityElement(Output.class, tempEl, def));

代码示例来源:origin: wsdl4j/wsdl4j

protected void printOutput(Output output,
              Definition def,
              PrintWriter pw)
               throws WSDLException
{
 if (output != null)
 {
  String tagName =
   DOMUtils.getQualifiedValue(Constants.NS_URI_WSDL,
                 Constants.ELEM_OUTPUT,
                 def);
  pw.print("      <" + tagName);
  DOMUtils.printAttribute(Constants.ATTR_NAME, output.getName(), pw);
  Message message = output.getMessage();
  if (message != null)
  {
   DOMUtils.printQualifiedAttribute(Constants.ATTR_MESSAGE,
                    message.getQName(),
                    def,
                    pw);
  }
  printExtensibilityAttributes(Output.class, output, def, pw);
  pw.println('>');
  printDocumentation(output.getDocumentationElement(), def, pw);
  List extElements = output.getExtensibilityElements();
  printExtensibilityElements(Output.class, extElements, def, pw);
  pw.println("    </" + tagName + '>');
 }
}

代码示例来源:origin: org.apache.cxf/cxf-common-utilities

public Map getParts(Operation operation, boolean out) {
  Message message = null;
  if (out) {
    Output output = operation.getOutput();
    message = output.getMessage();
  } else {
    Input input = operation.getInput();
    message = input.getMessage();
  }
  return message.getParts() == null ? new HashMap() : message.getParts();
}

代码示例来源:origin: apache/cxf

private void buildInterfaceOperation(InterfaceInfo inf, Operation op) {
  OperationInfo opInfo = inf.addOperation(new QName(inf.getName().getNamespaceURI(), op.getName()));
  if (recordOriginal) {
    opInfo.setProperty(WSDL_OPERATION, op);
  List<String> porderList = CastUtils.cast((List<?>)op.getParameterOrdering());
  opInfo.setParameterOrdering(porderList);
  this.copyExtensors(opInfo, op.getExtensibilityElements());
    if (input.getMessage() == null) {
      throw new WSDLRuntimeException(LOG, "NO_MESSAGE", "input", op.getName(), input.getName());
    MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(), MessageInfo.Type.INPUT);
    if (output.getMessage() == null) {
      throw new WSDLRuntimeException(LOG, "NO_MESSAGE", "output", op.getName(), output.getName());
    MessageInfo minfo = opInfo.createMessage(output.getMessage().getQName(), MessageInfo.Type.OUTPUT);
    opInfo.setOutput(output.getName(), minfo);
    buildMessage(minfo, output.getMessage());
    copyExtensors(minfo, output.getExtensibilityElements());
    copyExtensionAttributes(minfo, output);

代码示例来源:origin: org.apache.servicemix/servicemix-common

flat.setTargetNamespace(name.getNamespaceURI());
addNamespaces(flat, definition);
  if (defOper.getOutput() != null) {
    Output flatOutput = flat.createOutput();
    flatOutput.setName(defOper.getOutput().getName());
    if (defOper.getOutput().getMessage() != null) {
      Message flatOutputMsg = copyMessage(defOper.getOutput().getMessage(), flat);
      flatOutput.setMessage(flatOutputMsg);
      flat.addMessage(flatOutputMsg);
    Fault defFault = (Fault) itFault.next();
    Fault flatFault = flat.createFault();
    flatFault.setName(defFault.getName());
    if (defFault.getMessage() != null) {
      Message flatFaultMsg = copyMessage(defFault.getMessage(), flat);
      flatFault.setMessage(flatFaultMsg);
   javax.wsdl.extensions.schema.Schema imp = new SchemaImpl();
   imp.setElement(((Schema)it.next()).getRoot());
   imp.setElementType(new QName("http://www.w3.org/2001/XMLSchema", "schema"));
   types.addExtensibilityElement(imp);

代码示例来源:origin: apache/cxf

operation = def.createOperation();
addDocumentation(operation, operationInfo.getDocumentation());
operation.setUndefined(false);
operation.setName(operationInfo.getName().getLocalPart());
addNamespace(operationInfo.getName().getNamespaceURI(), def);
if (operationInfo.isOneWay()) {
  operation.setStyle(OperationType.ONE_WAY);
input.setName(operationInfo.getInputName());
Message message = def.createMessage();
buildMessage(message, operationInfo.getInput(), def);
this.addExtensibilityAttributes(def, input, getInputExtensionAttributes(operationInfo));
this.addExtensibilityElements(def, input, getWSDL11Extensors(operationInfo.getInput()));
input.setMessage(message);
  Output output = def.createOutput();
  addDocumentation(output, operationInfo.getOutput().getDocumentation());
  output.setName(operationInfo.getOutputName());
  message = def.createMessage();
  buildMessage(message, operationInfo.getOutput(), def);
  this.addExtensibilityAttributes(def, output, getOutputExtensionAttributes(operationInfo));
  this.addExtensibilityElements(def, output, getWSDL11Extensors(operationInfo.getOutput()));
  output.setMessage(message);

代码示例来源:origin: org.codehaus.xfire/xfire-core

protected void visit(Output output)
{
  MessageInfo info = opInfo.createMessage(
    new QName(opInfo.getInputMessage().getName().getNamespaceURI(),
         output.getMessage().getQName().getLocalPart()));
  opInfo.setOutputMessage(info);
  woutput2msg.put(output, info);
  
  if (isWrapped)
  {
    createMessageParts(info, getWrappedSchema(output.getMessage()));
  }
  else
  {
    createMessageParts(info, output.getMessage());
  }
}

代码示例来源:origin: org.springframework.ws/spring-ws-core

/**
 * Called after the {@link javax.wsdl.Output} has been created, but it's added to the operation. Subclasses can
 * override this method to define the output name.
 *
 * <p>Default implementation sets the output name to the message name.
 *
 * @param definition the WSDL4J {@code Definition}
 * @param output     the WSDL4J {@code Output}
 */
protected void populateOutput(Definition definition, Output output) {
  output.setName(output.getMessage().getQName().getLocalPart());
}

代码示例来源:origin: axis/axis

Message msg = writeRequestMessage(def, desc, bindingOper);
input.setMessage(msg);
String name = msg.getQName().getLocalPart();
input.setName(name);
bindingOper.getBindingInput().setName(name);
oper.setInput(input);
def.addMessage(msg);
  output.setMessage(msg);
  name = msg.getQName().getLocalPart();
  output.setName(name);
  bindingOper.getBindingOutput().setName(name);
  oper.setOutput(output);
  def.addMessage(msg);
  fault.setMessage(msg);
  fault.setName(faultDesc.getName());
  oper.addFault(fault);
  bindingOper.addBindingFault(bFault);
  if (def.getMessage(msg.getQName()) == null) {
    def.addMessage(msg);

代码示例来源:origin: org.jboss.fuse.wsdl2rest/wsdl2rest-impl

log.info("\tPortType: {}", qname.getLocalPart());
clazzDef.setPackageName(toPackageName(qname.getNamespaceURI()));
clazzDef.setClassName(qname.getLocalPart());
portTypeMap.put(qname, clazzDef);
  String opName = op.getName();
  log.info("\t\tOperation: {}", opName);
  Input in = op.getInput();
  Output out = op.getOutput();
  Map<QName, Fault> f = op.getFaults();
    if (in.getName() == null) {
      in.setName(opName);
    processMessages(def, portType, in.getMessage(), opName, 0);
    if (out.getName() == null) {
      out.setName(opName + "Response");
    processMessages(def, portType, out.getMessage(), opName, 1);
    for (Object o : f.values()) {
      Fault fault = (Fault) o;
      processMessages(def, portType, fault.getMessage(), opName, 2);

代码示例来源:origin: org.objectweb.celtix/celtix-rt

Operation operation) {
Input input = operation.getInput();
Output output = operation.getOutput();
Collection parts = input.getMessage().getParts().values();
for (Iterator i = parts.iterator(); i.hasNext();) {
  Part part = (Part)i.next();
  OperationWebParam p = new OperationWebParam(part.getElementName().getLocalPart(),
                        part.getName(),
                        Mode.IN,
                        part.getElementName().getNamespaceURI());
  parms.add(p);
  parmMap.put(part.getName(), p);
  parts = output.getMessage().getParts().values();
  for (Iterator i = parts.iterator(); i.hasNext();) {
    Part part = (Part)i.next();
      p = new OperationWebParam(part.getElementName().getLocalPart(),
                   part.getName(),
                   Mode.OUT,

代码示例来源:origin: org.fabric3/fabric3-binding-ws-metro

Collection<Binding> bindings = definition.getBindings().values();
for (Binding entry : bindings) {
  if (entry.getPortType().getQName().equals(portTypeName)) {
    binding = entry;
    break;
for (Object element : bindingOperation.getExtensibilityElements()) {
  if (element instanceof SOAPOperation) {
    soapOperation = (SOAPOperation) element;
Operation portTypeOperation = null;
for (Operation entry : portTypeOperations) {
  if (entry.getName().equals(m.getName())) {
    portTypeOperation = entry;
av.visit("name", portTypeOperation.getOutput().getMessage().getQName().getLocalPart());
Collection<Part> parts = portTypeOperation.getOutput().getMessage().getParts().values();
av.visit("partName", parts.iterator().next().getName());
av.visitEnd();
parts = portTypeOperation.getInput().getMessage().getParts().values();
String partName = parts.iterator().next().getName();
av.visit("name", partName);

代码示例来源:origin: apache/cxf

private Operation generateOperation(String name, Message inputMsg, Message outputMsg) {
  Input input = definition.createInput();
  input.setName(inputMsg.getQName().getLocalPart());
  input.setMessage(inputMsg);
  Output output = definition.createOutput();
  output.setName(outputMsg.getQName().getLocalPart());
  output.setMessage(outputMsg);
  Operation result = definition.createOperation();
  result.setName(name);
  result.setInput(input);
  result.setOutput(output);
  result.setUndefined(false);
  portType.addOperation(result);
  return result;
}

代码示例来源:origin: apache/cxf

public Message generateOutputMessage(Operation operation, BindingOperation bindingOperation) {
  Message msg = definition.createMessage();
  QName msgName;
  if (!mapper.isDefaultMapping()) {
    //mangle the message name
    //REVISIT, do we put in the entire scope for mangling
    msgName = new QName(definition.getTargetNamespace(),
              getScope().tail() + "." + operation.getName() + RESPONSE_SUFFIX);
  } else {
    msgName = new QName(definition.getTargetNamespace(),
              operation.getName() + RESPONSE_SUFFIX);
  }
  msg.setQName(msgName);
  msg.setUndefined(false);
  String outputName = operation.getName() + RESPONSE_SUFFIX;
  Output output = definition.createOutput();
  output.setName(outputName);
  output.setMessage(msg);
  BindingOutput bindingOutput = definition.createBindingOutput();
  bindingOutput.setName(outputName);
  bindingOperation.setBindingOutput(bindingOutput);
  operation.setOutput(output);
  definition.addMessage(msg);
  return msg;
}

代码示例来源:origin: org.codehaus.xfire/xfire-core

bindIn.setName( op.getInputMessage().getName().getLocalPart() );
bindIn.addExtensibilityElement( body );
wbindOp.setBindingInput( bindIn );
if (wsdlOp.getOutput() != null)
  bindOut.setName( wsdlOp.getOutput().getName() );
  bindOut.addExtensibilityElement( body );
  wbindOp.setBindingOutput( bindOut );
Map faults = wsdlOp.getFaults();
if (faults != null)
    bindingFault.setName(fault.getName());
    soapFault.setName(fault.getName());
    wbindOp.addBindingFault(bindingFault);

代码示例来源:origin: org.switchyard.components/switchyard-component-soap

private String getWrapperNamespace(String operationName, boolean input) {
  String ns = null;
  if (_wsdlPort != null) {
    Operation operation = WSDLUtil.getOperationByName(_wsdlPort, operationName);
    if (!_documentStyle) {
      ns = input ? operation.getInput().getMessage().getQName().getNamespaceURI()
        : operation.getOutput().getMessage().getQName().getNamespaceURI();
    } else {
      // Note: WS-I Profile allows only one child under SOAPBody.
      Part part = input ? (Part)operation.getInput().getMessage().getParts().values().iterator().next()
        : (Part)operation.getOutput().getMessage().getParts().values().iterator().next();
      if (part.getElementName() != null) {
        ns = part.getElementName().getNamespaceURI();
      } else if (part.getTypeName() != null) {
        ns = part.getTypeName().getNamespaceURI();
      }
    }
  }
  
  return ns;
}

代码示例来源:origin: org.fabric3/fabric3-interface-wsdl

private DataType getOutputType(Output output, XmlSchemaCollection collection, PortType portType, IntrospectionContext context) {
  if (output == null) {
    // no output type specified (e.g. one-way operation), use void
    return new XSDSimpleType(Void.TYPE, new QName("void"));
  }
  Message message = output.getMessage();
  List parts = message.getOrderedParts(null);
  if (parts.isEmpty()) {
    return getElementDataType(message.getQName(), collection, portType, context);
  } else {
    Part part = (Part) parts.get(0);
    return getDataType(part, collection, portType, context);
  }
}

代码示例来源:origin: org.objectweb.celtix/celtix-tools

boolean needRootNode = false;
for (BindingOperation bo : bos) {
  Operation op = binding.getPortType().getOperation(bo.getName(), null, null);
  needRootNode = false;
  if (op.getInput().getMessage().getParts().size() == 0
    || op.getInput().getMessage().getParts().size() > 1) {
    needRootNode = true;
    String path = "Binding(" + binding.getQName().getLocalPart()
           + "):BindingOperation(" + bo.getName() + ")";
    Iterator itIn = bo.getBindingInput().getExtensibilityElements().iterator();
    if (findXMLFormatRootNode(itIn, bo, path + "-input")) {
      if (op.getOutput().getMessage().getParts().size() == 0
        || op.getOutput().getMessage().getParts().size() > 1) {
        needRootNode = true;

相关文章