StringUtils.getNMTokens(soapBody.getParts()), pw); DOMUtils.printAttribute(SOAPConstants.ATTR_USE, soapBody.getUse(), pw);
@SuppressWarnings("unchecked") public static List<String> getParts(SOAPBody body) { return (List<String>) body.getParts(); }
/** * return null if soapBody attributes are supported by Axis engine. Else, * returns a message explaining the problem. * * @param soapBody - soapBody to check * @return null if soapBody attributes are supported supported by Axis engine. * Else, returns a message explaining the problem. */ @Override protected String checkSoapBody(final ExtensibilityElement soapBody) { List parts = null; if (soapBody instanceof SOAPBody) { parts = ((SOAPBody) soapBody).getParts(); } else if (soapBody instanceof SOAP12Body) { parts = ((SOAP12Body) soapBody).getParts(); } if (parts != null) { return "SoapBody is using parts attribute which is not currently supported."; } return null; }
/** * Orders wsdl:part names keeping in mind the "parts" attribute of WSDL soap:body * @param messageParts a list of wsdl:partS * @param extElems extensibility elements in the binding * @return the ordered list of part names */ public List orderPartNames(List messageParts, List extElems) { List orderedPartNames = new ArrayList(); List bodyParts = null; SOAPBody soapBody = getSOAPBody(extElems); if (soapBody != null) bodyParts = soapBody.getParts(); Iterator i = messageParts.iterator(); while (i.hasNext()) { String partName = ((Part) i.next()).getName(); // If the parts attribute is not specified or contains // the wsdl:part name, then adding part name to the ordered list if (bodyParts == null || bodyParts.contains(partName)) orderedPartNames.add(partName); } return orderedPartNames; }
/** * Orders wsdl:part names keeping in mind the "parts" attribute of WSDL soap:body * @param messageParts a list of wsdl:partS * @param extElems extensibility elements in the binding * @return the ordered list of part names */ public List orderPartNames(List messageParts, List extElems) { List orderedPartNames = new ArrayList(); List bodyParts = null; SOAPBody soapBody = getSOAPBody(extElems); if (soapBody != null) bodyParts = soapBody.getParts(); Iterator i = messageParts.iterator(); while (i.hasNext()) { String partName = ((Part) i.next()).getName(); // If the parts attribute is not specified or contains // the wsdl:part name, then adding part name to the ordered list if (bodyParts == null || bodyParts.contains(partName)) orderedPartNames.add(partName); } return orderedPartNames; }
if (extElement instanceof SOAPBody) if ((partsList = ((SOAPBody) extElement).getParts()) != null)
if (extElement instanceof SOAPBody) if ((partsList = ((SOAPBody) extElement).getParts()) != null)
public void visit(SOAPBody body, Object parent, WSDLTraversalContext ctx) { // assert style == "document" if (WSIConstants.ATTRVAL_SOAP_BODY_USE_LIT.equals(body.getUse())) { docLiteralFound = true; List parts = body.getParts(); if (parts != null && parts.size() > 1) //how to pick out one body from another one ? errors.add(body.getElementType(), body.getNamespaceURI()); } }
public void visit(SOAPBody body, Object parent, WSDLTraversalContext ctx) { // assert style == "document" if (WSIConstants.ATTRVAL_SOAP_BODY_USE_LIT.equals(body.getUse())) { docLiteralFound = true; List parts = body.getParts(); if (parts != null && parts.size() > 1) //how to pick out one body from another one ? errors.add(body.getElementType(), body.getNamespaceURI()); } }
partsList = soapBody.getParts(); } else if (extElement instanceof SOAP12Body) { SOAP12Body soapBody = (SOAP12Body) extElement; if (mimePartExtensibilityElement instanceof SOAPBody) { SOAPBody soapBody = (SOAPBody) mimePartExtensibilityElement; partsList = soapBody.getParts(); } else if (mimePartExtensibilityElement instanceof SOAP12Body) { SOAP12Body soapBody = (SOAP12Body) mimePartExtensibilityElement;
/** * The method extracts list of parts for the given soapbind:body, * binding operation, message, and style. * * @param op an operation. * @param m a message. * @param body a SOAP body. * @param style an operation style. * @return list of parts for the given soapbind:body, * binding operation, message, and style. */ static public List getParts( Operation op, Message m, SOAPBody body, String style) { // if null, get parts from message if (body.getParts() == null) // if rpc style is used, try to use partOrder attribute from operation if (WSIConstants.ATTRVAL_SOAP_BIND_STYLE_RPC.equals(style)) return m.getOrderedParts(op.getParameterOrdering()); else return m.getOrderedParts(null); else // converse parts name to parts objects return m.getOrderedParts(body.getParts()); }
/** * The method extracts list of parts for the given soapbind:body, * binding operation, message, and style. * * @param op an operation. * @param m a message. * @param body a SOAP body. * @param style an operation style. * @return list of parts for the given soapbind:body, * binding operation, message, and style. */ static public List getParts( Operation op, Message m, SOAPBody body, String style) { // if null, get parts from message if (body.getParts() == null) // if rpc style is used, try to use partOrder attribute from operation if (WSIConstants.ATTRVAL_SOAP_BIND_STYLE_RPC.equals(style)) return m.getOrderedParts(op.getParameterOrdering()); else return m.getOrderedParts(null); else // converse parts name to parts objects return m.getOrderedParts(body.getParts()); }
private void validateDocLitBodyParts(Binding binding, SOAPBody body, Message message) { if (body != null) { if (body.getParts() == null) { if (message.getParts().size() > 1) { error(Code.R2210, binding); } } else { if (body.getParts().size() > 1) { error(Code.R2201, binding); } for (String p : WSDLUtils.getParts(body)) { if (message.getPart(p).getElementName() == null) { error(Code.R2204, binding); } } } } }
/** * Retrieves the list of SOAP body parts of a binding operation, or null if there is no * SOAP body defined. */ public static List<String> getSoapBodyParts(BindingOperation bindingOperation) { List extensions = bindingOperation.getBindingInput().getExtensibilityElements(); List<String> result = null; boolean found = false; for (Object extension : extensions) { if (extension instanceof SOAPBody) { result = ((SOAPBody) extension).getParts(); found = true; break; } if (extension instanceof SOAP12Body) { result = ((SOAP12Body) extension).getParts(); found = true; break; } } if (found && result == null) { result = Collections.emptyList(); } return result; }
partsList = soapBody.getParts();
partsList = soapBody.getParts();
StringUtils.getNMTokens(soapBody.getParts()), pw); DOMUtils.printAttribute(SOAPConstants.ATTR_USE, soapBody.getUse(), pw);
part.setType(wsdlPart.getTypeName()); part.setElement(wsdlPart.getElementName()); if ((wsdlSoapBody.getParts() == null && wsdlOutput.getMessage().getOrderedParts(null).size() == 1) || wsdlSoapBody.getParts().contains(part.getName())) { part.setBody(true); output.setElementName(wsdlPart.getElementName());
if (body.getParts() == null)
if (body.getParts() == null)