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

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

本文整理了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

  1. /**
  2. * Create a WsdlOpFault from the Fault.
  3. *
  4. * @param fault
  5. * Fault to process.
  6. * @return WsdlOpFault Result of processing.
  7. */
  8. @SuppressWarnings( "unchecked" )
  9. private WsdlOpFault getFault( Fault fault ) throws KettleStepException {
  10. Message m = fault.getMessage();
  11. // a fault should only have one message part.
  12. Map<?, Part> partMap = m.getParts();
  13. if ( partMap.size() != 1 ) {
  14. throw new IllegalArgumentException( "Invalid part count for fault!!" );
  15. }
  16. Part faultPart = partMap.values().iterator().next();
  17. boolean complexType = false;
  18. // type of fault is specified either in Part's type or element attribute.
  19. QName type = faultPart.getTypeName();
  20. if ( type == null ) {
  21. type = faultPart.getElementName();
  22. Element schemaElement = _wsdlTypes.findNamedElement( type );
  23. type = _wsdlTypes.getTypeQName( schemaElement.getAttribute( "type" ) );
  24. complexType = true;
  25. }
  26. return new WsdlOpFault( fault.getName(), type, complexType, _wsdlTypes );
  27. }
  28. }

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

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

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

  1. public List<Part> getInMessageParts(Operation operation) {
  2. Input input = operation.getInput();
  3. List<Part> partsList = new ArrayList<Part>();
  4. if (input != null) {
  5. Iterator ite = input.getMessage().getParts().values().iterator();
  6. while (ite.hasNext()) {
  7. partsList.add((Part)ite.next());
  8. }
  9. }
  10. return partsList;
  11. }

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

  1. public List<Part> getOutMessageParts(Operation operation) {
  2. Output output = operation.getOutput();
  3. List<Part> partsList = new ArrayList<Part>();
  4. if (output != null) {
  5. Iterator ite = output.getMessage().getParts().values().iterator();
  6. while (ite.hasNext()) {
  7. partsList.add((Part)ite.next());
  8. }
  9. }
  10. return partsList;
  11. }

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

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

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

  1. public List<Part> getInMessageParts(Operation operation) {
  2. Input input = operation.getInput();
  3. List<Part> partsList = new ArrayList<Part>();
  4. if (input != null && input.getMessage() != null) {
  5. Iterator ite = input.getMessage().getParts().values().iterator();
  6. while (ite.hasNext()) {
  7. partsList.add((Part)ite.next());
  8. }
  9. }
  10. return partsList;
  11. }

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

  1. public List<Part> getOutMessageParts(Operation operation) {
  2. Output output = operation.getOutput();
  3. List<Part> partsList = new ArrayList<Part>();
  4. if (output != null && output.getMessage() != null) {
  5. Iterator ite = output.getMessage().getParts().values().iterator();
  6. while (ite.hasNext()) {
  7. partsList.add((Part)ite.next());
  8. }
  9. }
  10. return partsList;
  11. }

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

  1. public void checkMessages() {
  2. for (Iterator itMsg = definition.getMessages().values().iterator(); itMsg.hasNext();) {
  3. Message msg = (Message) itMsg.next();
  4. for (Iterator it2 = msg.getParts().values().iterator(); it2.hasNext();) {
  5. Part p = (Part) it2.next();
  6. if (p.getTypeName() != null && p.getElementName() != null) {
  7. error(Code.R2306, msg);
  8. }
  9. }
  10. }
  11. }

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

  1. public Map getParts(Operation operation, boolean out) {
  2. Message message = null;
  3. if (out) {
  4. Output output = operation.getOutput();
  5. message = output.getMessage();
  6. } else {
  7. Input input = operation.getInput();
  8. message = input.getMessage();
  9. }
  10. return message.getParts() == null ? new HashMap() : message.getParts();
  11. }

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

  1. public Map getParts(Operation operation, boolean out) {
  2. Message message = null;
  3. if (out) {
  4. Output output = operation.getOutput();
  5. message = output.getMessage();
  6. } else {
  7. Input input = operation.getInput();
  8. message = input.getMessage();
  9. }
  10. return message.getParts() == null ? new HashMap() : message.getParts();
  11. }

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

  1. private XmlSchemaElement getWrappedSchema(Message message)
  2. {
  3. Part part = (Part) message.getParts().values().iterator().next();
  4. XmlSchemaElement schemaEl = schemas.getElementByQName(part.getElementName());
  5. if (schemaEl.getSchemaType() instanceof XmlSchemaComplexType)
  6. return schemaEl;
  7. return null;
  8. }

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

  1. public List<Part> getInMessageParts(Operation operation) {
  2. Input input = operation.getInput();
  3. List<Part> partsList = new ArrayList<>();
  4. if (input != null && input.getMessage() != null) {
  5. Collection<Part> parts = CastUtils.cast(input.getMessage().getParts().values());
  6. for (Part p : parts) {
  7. partsList.add(p);
  8. }
  9. }
  10. return partsList;
  11. }

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

  1. public List<Part> getOutMessageParts(Operation operation) {
  2. Output output = operation.getOutput();
  3. List<Part> partsList = new ArrayList<Part>();
  4. if (output != null && output.getMessage() != null) {
  5. Collection<Part> parts = CastUtils.cast(output.getMessage().getParts().values());
  6. for (Part p : parts) {
  7. partsList.add(p);
  8. }
  9. }
  10. return partsList;
  11. }

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

  1. public List<Part> getOutMessageParts(Operation operation) {
  2. Output output = operation.getOutput();
  3. List<Part> partsList = new ArrayList<>();
  4. if (output != null && output.getMessage() != null) {
  5. Collection<Part> parts = CastUtils.cast(output.getMessage().getParts().values());
  6. for (Part p : parts) {
  7. partsList.add(p);
  8. }
  9. }
  10. return partsList;
  11. }

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

  1. public List<Part> getOutMessageParts(Operation operation) {
  2. Output output = operation.getOutput();
  3. List<Part> partsList = new ArrayList<Part>();
  4. if (output != null && output.getMessage() != null) {
  5. Collection<Part> parts = CastUtils.cast(output.getMessage().getParts().values());
  6. for (Part p : parts) {
  7. partsList.add(p);
  8. }
  9. }
  10. return partsList;
  11. }

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

  1. public List<Part> getInMessageParts(Operation operation) {
  2. Input input = operation.getInput();
  3. List<Part> partsList = new ArrayList<Part>();
  4. if (input != null && input.getMessage() != null) {
  5. Collection<Part> parts = CastUtils.cast(input.getMessage().getParts().values());
  6. for (Part p : parts) {
  7. partsList.add(p);
  8. }
  9. }
  10. return partsList;
  11. }

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

  1. public List<Part> getInMessageParts(Operation operation) {
  2. Input input = operation.getInput();
  3. List<Part> partsList = new ArrayList<Part>();
  4. if (input != null && input.getMessage() != null) {
  5. Collection<Part> parts = CastUtils.cast(input.getMessage().getParts().values());
  6. for (Part p : parts) {
  7. partsList.add(p);
  8. }
  9. }
  10. return partsList;
  11. }

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

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

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

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

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

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

相关文章