Examples of SOAPBody


Examples of org.apache.cxf.binding.soap.wsdl.extensions.SoapBody

                        bodyParts.remove(headerInfo.getPart().getName().getLocalPart());
                        headerInfo.getPart().setProperty(HEADER, true);
                        b.getInput().addExtensor(soapHeader);
                    }
                }
                SoapBody body = SOAPBindingUtil.createSoapBody(extensionRegistry,
                                                               BindingInput.class,
                                                               isSoap12);
                body.setUse("literal");
                if (isRpc) {
                    body.setNamespaceURI(b.getName().getNamespaceURI());
                }

                if (bodyParts != null) {
                    body.setParts(bodyParts);
                }

                b.getInput().addExtensor(body);
            }

            if (b.getOutput() != null) {
                List<String> bodyParts = null;
                List<SoapHeaderInfo> headerInfos = b.getOutput().getExtensors(SoapHeaderInfo.class);
                if (headerInfos != null && headerInfos.size() > 0) {
                    bodyParts = new ArrayList<String>();
                    for (MessagePartInfo part : b.getOutput().getMessageParts()) {
                        bodyParts.add(part.getName().getLocalPart());
                    }
                    for (SoapHeaderInfo headerInfo : headerInfos) {
                        SoapHeader soapHeader = SOAPBindingUtil.createSoapHeader(extensionRegistry,
                                                                             BindingOutput.class,
                                                                             isSoap12);
                        soapHeader.setMessage(b.getOutput().getMessageInfo().getName());
                        soapHeader.setPart(headerInfo.getPart().getName().getLocalPart());
                        soapHeader.setUse("literal");
                        bodyParts.remove(headerInfo.getPart().getName().getLocalPart());
                        b.getOutput().addExtensor(soapHeader);
                    }
                }
                SoapBody body = SOAPBindingUtil.createSoapBody(extensionRegistry,
                                                               BindingOutput.class,
                                                               isSoap12);
                body.setUse("literal");
                if (isRpc) {
                    body.setNamespaceURI(b.getName().getNamespaceURI());
                }

                if (bodyParts != null) {
                    body.setParts(bodyParts);
                }

                b.getOutput().addExtensor(body);
            }
        }
View Full Code Here

Examples of org.apache.cxf.binding.soap.wsdl.extensions.SoapBody

        return true;

    }

    private boolean checkR2716(final BindingOperation bop) {
        SoapBody inSoapBody = SOAPBindingUtil.getBindingInputSOAPBody(bop);
        SoapBody outSoapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop);
        if (inSoapBody != null && !StringUtils.isEmpty(inSoapBody.getNamespaceURI())
            || outSoapBody != null && !StringUtils.isEmpty(outSoapBody.getNamespaceURI())) {
            addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2716") + "Operation '"
                            + bop.getName() + "' soapBody MUST NOT have namespace attribute");
            return false;
        }
View Full Code Here

Examples of org.apache.cxf.binding.soap.wsdl.extensions.SoapBody

    private boolean checkR2717AndR2726(final BindingOperation bop) {
        if (null == bop) {
            return true;
        }
        SoapBody inSoapBody = SOAPBindingUtil.getBindingInputSOAPBody(bop);
        SoapBody outSoapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop);
        if (inSoapBody != null && StringUtils.isEmpty(inSoapBody.getNamespaceURI())
            || outSoapBody != null && StringUtils.isEmpty(outSoapBody.getNamespaceURI())) {
            addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2717"
                + "soapBody in the input/output of the binding operation '"
                + bop.getName() + "' MUST have namespace attribute");
            return false;
        }
View Full Code Here

Examples of org.apache.cxf.binding.soap.wsdl.extensions.SoapBody

    private boolean checkR2201Input(final Operation operation,
                                    final BindingOperation bop) {
        List<Part> partsList = wsdlHelper.getInMessageParts(operation);
        int inmessagePartsCount = partsList.size();
        SoapBody soapBody = SOAPBindingUtil.getBindingInputSOAPBody(bop);
        if (soapBody != null) {
            List<?> parts = soapBody.getParts();
            int boundPartSize = parts == null ? inmessagePartsCount : parts.size();
            SoapHeader soapHeader = SOAPBindingUtil.getBindingInputSOAPHeader(bop);
            boundPartSize = soapHeader != null
                && soapHeader.getMessage().equals(
                    operation.getInput().getMessage()
View Full Code Here

Examples of org.apache.cxf.binding.soap.wsdl.extensions.SoapBody

    }

    private boolean checkR2201Output(final Operation operation,
                                     final BindingOperation bop) {
        int outmessagePartsCount = wsdlHelper.getOutMessageParts(operation).size();
        SoapBody soapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop);
        if (soapBody != null) {
            List<?> parts = soapBody.getParts();
            int boundPartSize = parts == null ? outmessagePartsCount : parts.size();
            SoapHeader soapHeader = SOAPBindingUtil.getBindingOutputSOAPHeader(bop);
            boundPartSize = soapHeader != null
                && soapHeader.getMessage().equals(
                    operation.getOutput().getMessage()
View Full Code Here

Examples of org.apache.cxf.tools.common.extensions.soap.SoapBody

            }
        }
        String use = null;
        for (ExtensibilityElement ext : inbindings) {
            if (SOAPBindingUtil.isSOAPBody(ext)) {
                SoapBody soapBody = SOAPBindingUtil.getSoapBody(ext);
                use = soapBody.getUse();
            } else if (SOAPBindingUtil.isSOAPHeader(ext)) {
                processSoapHeader(jm, operation, ext);
            }
            if (ext instanceof MIMEMultipartRelated && jm.enableMime()) {
                processMultipart(jm, operation, (MIMEMultipartRelated)ext, JavaType.Style.IN);
View Full Code Here

Examples of org.apache.ws.commons.soap.SOAPBody

                // send the request and wait for reponse
                MessageContext response = send(msgctx, clientOptions.getTransportIn());

                // call the callback
                SOAPEnvelope resenvelope = response.getEnvelope();
                SOAPBody body = resenvelope.getBody();

                if (body.hasFault()) {
                    Exception ex = body.getFault().getException();

                    if (ex != null) {
                        callback.onError(ex);
                    } else {

                        // todo this needs to be fixed
                        callback.onError(new Exception(body.getFault().getReason().getText()));
                    }
                } else {
                    AsyncResult asyncResult = new AsyncResult(response);

                    callback.onComplete(asyncResult);
View Full Code Here

Examples of org.apache.wsdl.extensions.SOAPBody

                        .createWSDLBindingMessageReference();
                bindingInMessage
                        .setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
                bindingoperation.setInput(bindingInMessage);

                SOAPBody requestSoapbody = (SOAPBody) extensionFactory
                        .getExtensionElement(ExtensionConstants.SOAP_11_BODY);
                requestSoapbody.setUse(use);
                requestSoapbody.setNamespaceURI(namespeceURI);
                bindingInMessage.addExtensibilityElement(requestSoapbody);

                AxisMessage axisInMessage = axisOperation
                        .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                include = axisInMessage.getPolicyInclude();

                // adding policies defined in message element in services.xml
                policyElementsList = include
                        .getPolicyElements(PolicyInclude.AXIS_MESSAGE_POLICY);
                addPolicyAsExtElements(womDescription, policyElementsList,
                        inMessage, include);

                // adding policies defined in wsdl:binding -> wsdl:operation ->
                // wsdl:input
                policyElementsList = include
                        .getPolicyElements(PolicyInclude.BINDING_INPUT_POLICY);
                addPolicyAsExtElements(womDescription, policyElementsList,
                        inMessage, include);

            }

            MessageReference outMessage = wsdlOperation.getOutputMessage();
            if (outMessage != null) {
                WSDLBindingMessageReference bindingOutMessage = wsdlComponentFactory
                        .createWSDLBindingMessageReference();

                bindingOutMessage
                        .setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
                bindingoperation.setOutput(bindingOutMessage);
                SOAPBody resSoapbody = (SOAPBody) extensionFactory
                        .getExtensionElement(ExtensionConstants.SOAP_11_BODY);
                resSoapbody.setUse(use);
                resSoapbody.setNamespaceURI(namespeceURI);
                bindingOutMessage.addExtensibilityElement(resSoapbody);

                // adding policies
                AxisMessage axisOutMessage = axisOperation
                        .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
View Full Code Here

Examples of org.apache.xmlbeans.impl.soap.SOAPBody

    public static boolean soapBody_hasFault ( Dom d )
    {
        Locale l = d.locale();

        SOAPBody sb = (SOAPBody) d;

        if (l.noSync())         { l.enter(); try { return l._saaj.soapBody_hasFault( sb ); } finally { l.exit(); } }
        else synchronized ( l ) { l.enter(); try { return l._saaj.soapBody_hasFault( sb ); } finally { l.exit(); } }
    }
View Full Code Here

Examples of org.eclipse.wst.wsdl.binding.soap.SOAPBody

    // Is it worth being smarter?  Look for matching content first and create those which aren't found????
    List removeList = new ArrayList(bindingInput.getEExtensibilityElements());
    removeExtensebilityElements(bindingInput.getEExtensibilityElements(), removeList);

    SOAPFactory soapFactory = SOAPFactory.eINSTANCE;
    SOAPBody soapBody = soapFactory.createSOAPBody();
    soapBody.setUse((getUseOption(null) == USE_ENCODED) ? "encoded" : "literal");
    if (getUseOption(bindingInput) == USE_ENCODED && getStyleOption(bindingInput) == STYLE_RPC)
    {
      List encodingList = new BasicEList();
      encodingList.add("http://schemas.xmlsoap.org/soap/encoding/");
      soapBody.setEncodingStyles(encodingList);
      soapBody.setNamespaceURI(getNamespace(bindingInput));
    }
    else if (getUseOption(bindingInput) == USE_LITERAL && getStyleOption(bindingInput) == STYLE_RPC)
    {
      soapBody.setNamespaceURI(getNamespace(bindingInput));
    }

    bindingInput.addExtensibilityElement(soapBody);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.