javax.wsdl.Message.getParts()方法的使用及代码示例

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

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

Message.getParts介绍

[英]Get all the parts defined here.
[中]在这里定义所有部分。

代码示例

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

/**
  * Create a WsdlOpFault from the Fault.
  *
  * @param fault
  *          Fault to process.
  * @return WsdlOpFault Result of processing.
  */
 @SuppressWarnings( "unchecked" )
 private WsdlOpFault getFault( Fault fault ) throws KettleStepException {
  Message m = fault.getMessage();

  // a fault should only have one message part.
  Map<?, Part> partMap = m.getParts();
  if ( partMap.size() != 1 ) {
   throw new IllegalArgumentException( "Invalid part count for fault!!" );
  }
  Part faultPart = partMap.values().iterator().next();
  boolean complexType = false;

  // type of fault is specified either in Part's type or element attribute.
  QName type = faultPart.getTypeName();
  if ( type == null ) {
   type = faultPart.getElementName();
   Element schemaElement = _wsdlTypes.findNamedElement( type );
   type = _wsdlTypes.getTypeQName( schemaElement.getAttribute( "type" ) );
   complexType = true;
  }
  return new WsdlOpFault( fault.getName(), type, complexType, _wsdlTypes );
 }
}

代码示例来源:origin: org.ow2.orchestra/orchestra-axis

@SuppressWarnings("unchecked")
 private static List<Part> getMessageParts(final javax.wsdl.Message message) {
  final Map< ? , Part> partMap = message.getParts();
  final Collection<Part> parts = partMap.values();
  return new ArrayList<Part>(parts);
 }
}

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

public List<Part> getInMessageParts(Operation operation) {
  Input input = operation.getInput();
  List<Part> partsList = new ArrayList<Part>();
  if (input != null) {
    Iterator ite = input.getMessage().getParts().values().iterator();
    while (ite.hasNext()) {
      partsList.add((Part)ite.next());
    }
  }
  return partsList;
}

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

public List<Part> getOutMessageParts(Operation operation) {
  Output output = operation.getOutput();
  List<Part> partsList = new ArrayList<Part>();
  if (output != null) {
    Iterator ite = output.getMessage().getParts().values().iterator();
    while (ite.hasNext()) {
      partsList.add((Part)ite.next());
    }
  }
  return partsList;
}

代码示例来源:origin: org.apache.openejb/openejb-axis

private Part getWrappedPart(final Message message) throws OpenEJBException {
  // a wrapped element can only have one part
  final Collection parts = message.getParts().values();
  if (parts.size() != 1) {
    throw new OpenEJBException("message " + message.getQName() + " has " + parts.size() +
      " parts and should only have one as wrapper style mapping is specified for operation " +
      operationName);
  }
  return (Part) parts.iterator().next();
}

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

public List<Part> getInMessageParts(Operation operation) {
  Input input = operation.getInput();
  List<Part> partsList = new ArrayList<Part>();
  if (input != null && input.getMessage() != null) {
    Iterator ite = input.getMessage().getParts().values().iterator();
    while (ite.hasNext()) {
      partsList.add((Part)ite.next());
    }
  }
  return partsList;
}

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

public List<Part> getOutMessageParts(Operation operation) {
  Output output = operation.getOutput();
  List<Part> partsList = new ArrayList<Part>();
  if (output != null && output.getMessage() != null) {
    Iterator ite = output.getMessage().getParts().values().iterator();
    while (ite.hasNext()) {
      partsList.add((Part)ite.next());
    }
  }
  return partsList;
}

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

public void checkMessages() {
  for (Iterator itMsg = definition.getMessages().values().iterator(); itMsg.hasNext();) {
    Message msg = (Message) itMsg.next();
    for (Iterator it2 = msg.getParts().values().iterator(); it2.hasNext();) {
      Part p = (Part) it2.next();
      if (p.getTypeName() != null && p.getElementName() != null) {
        error(Code.R2306, msg);
      }
    }
  }
}

代码示例来源: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: org.objectweb.celtix/celtix-common

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: org.codehaus.xfire/xfire-core

private XmlSchemaElement getWrappedSchema(Message message)
{
  Part part = (Part) message.getParts().values().iterator().next();
  
  XmlSchemaElement schemaEl = schemas.getElementByQName(part.getElementName());
  
  if (schemaEl.getSchemaType() instanceof XmlSchemaComplexType)
    return schemaEl;
  
  return null;
}

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

public List<Part> getInMessageParts(Operation operation) {
  Input input = operation.getInput();
  List<Part> partsList = new ArrayList<>();
  if (input != null && input.getMessage() != null) {
    Collection<Part> parts = CastUtils.cast(input.getMessage().getParts().values());
    for (Part p : parts) {
      partsList.add(p);
    }
  }
  return partsList;
}

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

public List<Part> getOutMessageParts(Operation operation) {
  Output output = operation.getOutput();
  List<Part> partsList = new ArrayList<Part>();
  if (output != null && output.getMessage() != null) {
    Collection<Part> parts = CastUtils.cast(output.getMessage().getParts().values());
    for (Part p : parts) {
      partsList.add(p);
    }
  }
  return partsList;
}

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

public List<Part> getOutMessageParts(Operation operation) {
  Output output = operation.getOutput();
  List<Part> partsList = new ArrayList<>();
  if (output != null && output.getMessage() != null) {
    Collection<Part> parts = CastUtils.cast(output.getMessage().getParts().values());
    for (Part p : parts) {
      partsList.add(p);
    }
  }
  return partsList;
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

public List<Part> getOutMessageParts(Operation operation) {
  Output output = operation.getOutput();
  List<Part> partsList = new ArrayList<Part>();
  if (output != null && output.getMessage() != null) {
    Collection<Part> parts = CastUtils.cast(output.getMessage().getParts().values());
    for (Part p : parts) {
      partsList.add(p);
    }
  }
  return partsList;
}

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

public List<Part> getInMessageParts(Operation operation) {
  Input input = operation.getInput();
  List<Part> partsList = new ArrayList<Part>();
  if (input != null && input.getMessage() != null) {
    Collection<Part> parts = CastUtils.cast(input.getMessage().getParts().values());
    for (Part p : parts) {
      partsList.add(p);
    }
  }
  return partsList;
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

public List<Part> getInMessageParts(Operation operation) {
  Input input = operation.getInput();
  List<Part> partsList = new ArrayList<Part>();
  if (input != null && input.getMessage() != null) {
    Collection<Part> parts = CastUtils.cast(input.getMessage().getParts().values());
    for (Part p : parts) {
      partsList.add(p);
    }
  }
  return partsList;
}

代码示例来源:origin: org.apache.tomee/openejb-webservices

protected void visit(Output output) {
  Map outputParts = output.getMessage().getParts();
  if (outputParts.size() != 0 && outputParts.size() != 1) {
    context.addFailure(new ValidationFailure("The output message must contain zero or one parts: " + output.getName()));
  }
}

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-webservices

protected void visit(Output output) {
  Map outputParts = output.getMessage().getParts();
  if (outputParts.size() != 0 && outputParts.size() != 1) {
    context.addFailure(new ValidationFailure("The output message must contain zero or one parts: " + output.getName()));
  }
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-webservices

protected void visit(Output output) {
  Map outputParts = output.getMessage().getParts();
  if (outputParts.size() != 0 && outputParts.size() != 1) {
    context.addFailure(new ValidationFailure("The output message must contain zero or one parts: " + output.getName()));
  }
}

相关文章