Package javax.wsdl.extensions.soap

Examples of javax.wsdl.extensions.soap.SOAPBody


      // Check for Soap operation namespace
      boolean assertionFailure = false;
      String namespaceURI = null;
      for (int i = 0; i < soapBodies.length && !(assertionFailure); i++)
      {
        SOAPBody soapBody = soapBodies[i];
        // Added check for null use value, since the default value is literal
        if (soapBody.getUse() == null
          || soapBody.getUse().equals(WSIConstants.ATTRVAL_SOAP_BODY_USE_LIT))
        {
          rpcLitFound = true;
          // If there is no namespace, then flag as a failure
          if ((namespaceURI = soapBody.getNamespaceURI()) == null)
          {
            assertionFailure = true;
            failureDetail =
              this.validator.createFailureDetail(
                "--- SOAP BODY:\n"
                  + soapBody.toString()
                  + "\n--- BINDING QNAME:\n"
                  + binding.getQName(),
                entryContext);
          }

          // Else, verify that the namespace is an absolute URI
          else
          {
            try
            {
              //URL url = new URL(namespaceURI);
              URI uri = new URI(namespaceURI);
              if (uri.getScheme() == null)
              {
                // no scheme implies not an absolute URI
                assertionFailure = true;
                failureDetail =
                  this.validator.createFailureDetail(
                    "--- SOAP BODY:\n"
                      + soapBody.toString()
                      + "\n--- BINDING QNAME:\n"
                      + binding.getQName(),
                    entryContext);
              }
            }
            catch (MalformedURIException mue)
            {
              assertionFailure = true;
              failureDetail =
                this.validator.createFailureDetail(
                  "--- SOAP BODY:\n"
                    + soapBody.toString()
                    + "\n--- BINDING QNAME:\n"
                    + binding.getQName(),
                  entryContext);
            }
View Full Code Here


        BindingOperation bindingOperation = def.createBindingOperation();
        bindingOperation.setName(operation.getName());
        bindingOperation.setOperation(operation);

        SOAPBody soapBody = new SOAPBodyImpl();
        soapBody.setUse("literal");
        soapBody.setNamespaceURI(TNS);
        soapBody.setEncodingStyles(UtilMisc.toList("http://schemas.xmlsoap.org/soap/encoding/"));

        BindingOutput bindingOutput = def.createBindingOutput();
        bindingOutput.addExtensibilityElement(soapBody);
        bindingOperation.setBindingOutput(bindingOutput);
View Full Code Here

    BindingInput bindingInput = bindingOperation.getBindingInput();
    if( bindingInput == null )
      return false;

    SOAPBody soapBody = WsdlUtils.getExtensiblityElement( bindingInput.getExtensibilityElements(), SOAPBody.class );

    if( soapBody != null )
    {
      return soapBody.getUse() != null
          && soapBody.getUse().equalsIgnoreCase( "encoded" )
          && ( soapBody.getEncodingStyles() == null || soapBody.getEncodingStyles().contains(
              "http://schemas.xmlsoap.org/soap/encoding/" ) );
    }

    SOAP12Body soap12Body = WsdlUtils.getExtensiblityElement( bindingInput.getExtensibilityElements(),
        SOAP12Body.class );
View Full Code Here

    BindingOutput bindingOutput = bindingOperation.getBindingOutput();
    if( bindingOutput == null )
      return false;

    SOAPBody soapBody = WsdlUtils.getExtensiblityElement( bindingOutput.getExtensibilityElements(), SOAPBody.class );

    if( soapBody != null )
    {
      return soapBody.getUse() != null
          && soapBody.getUse().equalsIgnoreCase( "encoded" )
          && ( soapBody.getEncodingStyles() == null || soapBody.getEncodingStyles().contains(
              "http://schemas.xmlsoap.org/soap/encoding/" ) );
    }

    SOAP12Body soap12Body = WsdlUtils.getExtensiblityElement( bindingOutput.getExtensibilityElements(),
        SOAP12Body.class );
View Full Code Here

    Message msg = input.getMessage();

    if( msg != null )
    {
      SOAPBody soapBody = WsdlUtils.getExtensiblityElement( operation.getBindingInput().getExtensibilityElements(),
          SOAPBody.class );

      if( soapBody == null || soapBody.getParts() == null )
      {
        SOAP12Body soap12Body = WsdlUtils.getExtensiblityElement( operation.getBindingInput()
            .getExtensibilityElements(), SOAP12Body.class );

        if( soap12Body == null || soap12Body.getParts() == null )
        {
          if( msg != null )
            result.addAll( msg.getOrderedParts( null ) );
        }
        else
        {
          Iterator i = soap12Body.getParts().iterator();
          while( i.hasNext() )
          {
            String partName = ( String )i.next();
            Part part = msg.getPart( partName );

            result.add( part );
          }
        }
      }
      else
      {
        Iterator i = soapBody.getParts().iterator();
        while( i.hasNext() )
        {
          String partName = ( String )i.next();
          Part part = msg.getPart( partName );
View Full Code Here

      return new Part[0];

    Message msg = output.getMessage();
    if( msg != null )
    {
      SOAPBody soapBody = WsdlUtils
          .getExtensiblityElement( bindingOutput.getExtensibilityElements(), SOAPBody.class );

      if( soapBody == null || soapBody.getParts() == null )
      {
        SOAP12Body soap12Body = WsdlUtils.getExtensiblityElement( bindingOutput.getExtensibilityElements(),
            SOAP12Body.class );

        if( soap12Body == null || soap12Body.getParts() == null )
        {
          result.addAll( msg.getOrderedParts( null ) );
        }
        else
        {
          Iterator i = soap12Body.getParts().iterator();
          while( i.hasNext() )
          {
            String partName = ( String )i.next();
            Part part = msg.getPart( partName );

            result.add( part );
          }
        }
      }
      else
      {
        Iterator i = soapBody.getParts().iterator();
        while( i.hasNext() )
        {
          String partName = ( String )i.next();
          Part part = msg.getPart( partName );
View Full Code Here

    return false;
  }

  public static String getSoapBodyNamespace( List<?> list )
  {
    SOAPBody soapBody = WsdlUtils.getExtensiblityElement( list, SOAPBody.class );
    if( soapBody != null )
      return soapBody.getNamespaceURI();

    SOAP12Body soap12Body = WsdlUtils.getExtensiblityElement( list, SOAP12Body.class );
    if( soap12Body != null )
      return soap12Body.getNamespaceURI();
View Full Code Here

            soapOperation.setSoapActionURI("");
            bindingOperation.addExtensibilityElement(soapOperation);
            if (operation.getInput() != null) {
                BindingInput bindingInput = definition.createBindingInput();
                configureBindingInput(bindingInput, operation.getInput());
                SOAPBody soapBody =
                    (SOAPBody)definition.getExtensionRegistry().createExtension(BindingInput.class, SOAP_BODY);
                soapBody.setUse("literal");
                bindingInput.addExtensibilityElement(soapBody);
                bindingOperation.setBindingInput(bindingInput);
            }
            if (operation.getOutput() != null) {
                BindingOutput bindingOutput = definition.createBindingOutput();
                configureBindingOutput(bindingOutput, operation.getOutput());
                SOAPBody soapBody =
                    (SOAPBody)definition.getExtensionRegistry().createExtension(BindingOutput.class, SOAP_BODY);
                soapBody.setUse("literal");
                bindingOutput.addExtensibilityElement(soapBody);
                bindingOperation.setBindingOutput(bindingOutput);
            }
            for (Iterator fi = operation.getFaults().values().iterator(); fi.hasNext();) {
                Fault fault = (Fault)fi.next();
View Full Code Here

                log.debug("Extensibility Element type is:" + extElement.getElementType());
                log.debug("Extensibility Element class is:" + extElement.getClass().getName());
            }
            // SOAP 1.1 body element found!
            if (extElement instanceof SOAPBody) {
                SOAPBody soapBody = (SOAPBody) extElement;
                partsList = soapBody.getParts();
            } else if (extElement instanceof SOAP12Body) {
                SOAP12Body soapBody = (SOAP12Body) extElement;
                partsList = soapBody.getParts();
            } else if (extElement instanceof MIMEMultipartRelated) {
                MIMEMultipartRelated minMimeMultipartRelated = (MIMEMultipartRelated) extElement;
                List mimePartsList = minMimeMultipartRelated.getMIMEParts();
                MIMEPart mimePart = null;
                Object object;
                List mimePartElements;
                ExtensibilityElement mimePartExtensibilityElement;
                for (Iterator mimePartsIter = mimePartsList.iterator(); mimePartsIter.hasNext();) {
                    object = mimePartsIter.next();
                    if (object instanceof MIMEPart) {
                        mimePart = (MIMEPart) object;
                        mimePartElements = mimePart.getExtensibilityElements();
                        for (Iterator mimePartElementsIter = mimePartElements.iterator(); mimePartElementsIter.hasNext();)
                        {
                            mimePartExtensibilityElement = (ExtensibilityElement) mimePartElementsIter.next();
                            if (mimePartExtensibilityElement instanceof SOAPBody) {
                                SOAPBody soapBody = (SOAPBody) mimePartExtensibilityElement;
                                partsList = soapBody.getParts();
                            } else if (mimePartExtensibilityElement instanceof SOAP12Body) {
                                SOAP12Body soapBody = (SOAP12Body) mimePartExtensibilityElement;
                                partsList = soapBody.getParts();
                            }
                        }
                    }
                }
            }
View Full Code Here

        String namespace = null;
        for (Iterator iter = extensibilityElements.iterator(); iter.hasNext();) {
            extElement = (ExtensibilityElement) iter.next();
            // SOAP 1.1 body element found!
            if (extElement instanceof SOAPBody) {
                SOAPBody soapBody = (SOAPBody) extElement;
                namespace = soapBody.getNamespaceURI();
            } else if (extElement instanceof SOAP12Body) {
                SOAP12Body soapBody = (SOAP12Body) extElement;
                namespace = soapBody.getNamespaceURI();
            }
        }
        return namespace;
    }
View Full Code Here

TOP

Related Classes of javax.wsdl.extensions.soap.SOAPBody

Copyright © 2018 www.massapicom. 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.