Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlObject.selectPath()


        options.setLoadStripComments();

      // XmlObject xml = XmlObject.Factory.parse( response, options );
      XmlObject xml = XmlUtils.createXmlObject( response, options );
      String expandedPath = PropertyExpander.expandProperties( context, path );
      XmlObject[] items = xml.selectPath( expandedPath );
      AssertedXPathsContainer assertedXPathsContainer = ( AssertedXPathsContainer )context
          .getProperty( AssertedXPathsContainer.ASSERTEDXPATHSCONTAINER_PROPERTY );

      XmlObject contentObj = null;
      String expandedContent = PropertyExpander.expandProperties( context, expectedContent );
View Full Code Here


    if( WsdlUtils.isOutputSoapEncoded( bindingOperation ) )
      throw new Exception( "SOAP-Encoded messages not supported" );

    // XmlObject xml = XmlObject.Factory.parse( message );
    XmlObject xml = XmlUtils.createXmlObject( message );
    XmlObject[] msgPaths = xml.selectPath( "declare namespace env='" + soapVersion.getEnvelopeNamespace() + "';"
        + "$this/env:Envelope/env:Body/env:Fault" );
    if( msgPaths.length == 0 )
      return null;

    XmlObject msgXml = msgPaths[0];
View Full Code Here

      Part part = faultParts[0];

      QName elementName = part.getElementName();
      if( elementName != null )
      {
        XmlObject[] faultPaths = msgXml.selectPath( "declare namespace env='" + soapVersion.getEnvelopeNamespace()
            + "';" + "declare namespace ns='" + elementName.getNamespaceURI() + "';" + "//env:Fault/detail/ns:"
            + elementName.getLocalPart() );

        if( faultPaths.length == 1 )
          return faultName;
View Full Code Here

      }
      // this is not allowed by Basic Profile.. remove?
      else if( part.getTypeName() != null )
      {
        QName typeName = part.getTypeName();
        XmlObject[] faultPaths = msgXml.selectPath( "declare namespace env='" + soapVersion.getEnvelopeNamespace()
            + "';" + "declare namespace ns='" + typeName.getNamespaceURI() + "';" + "//env:Fault/detail/ns:"
            + part.getName() );

        if( faultPaths.length == 1 )
          return faultName;
View Full Code Here

      }
      else
      {
        existing.put( wsdlUrl, null );

        XmlObject[] schemas = xmlObject.selectPath( "declare namespace s='" + Constants.XSD_NS + "' .//s:schema" );

        for( int i = 0; i < schemas.length; i++ )
        {
          XmlCursor xmlCursor = schemas[i].newCursor();
          String xmlText = xmlCursor.getObject().xmlText( options );
View Full Code Here

          schemas[i].documentProperties().setSourceName( wsdlUrl );

          result.put( wsdlUrl + "@" + ( i + 1 ), schemas[i] );
        }

        XmlObject[] wsdlImports = xmlObject.selectPath( "declare namespace s='" + Constants.WSDL11_NS
            + "' .//s:import/@location" );
        for( int i = 0; i < wsdlImports.length; i++ )
        {
          String location = ( ( SimpleValue )wsdlImports[i] ).getStringValue();
          if( location != null )
View Full Code Here

            getSchemas( location, existing, loader, null );
          }
        }

        XmlObject[] wadl10Imports = xmlObject.selectPath( "declare namespace s='" + Constants.WADL10_NS
            + "' .//s:grammars/s:include/@href" );
        for( int i = 0; i < wadl10Imports.length; i++ )
        {
          String location = ( ( SimpleValue )wadl10Imports[i] ).getStringValue();
          if( location != null )
View Full Code Here

            getSchemas( location, existing, loader, null );
          }
        }

        XmlObject[] wadlImports = xmlObject.selectPath( "declare namespace s='" + Constants.WADL11_NS
            + "' .//s:grammars/s:include/@href" );
        for( int i = 0; i < wadlImports.length; i++ )
        {
          String location = ( ( SimpleValue )wadlImports[i] ).getStringValue();
          if( location != null )
View Full Code Here

      for( int c = 0; c < schemas.length; c++ )
      {
        xmlObject = schemas[c];

        XmlObject[] schemaImports = xmlObject.selectPath( "declare namespace s='" + Constants.XSD_NS
            + "' .//s:import/@schemaLocation" );
        for( int i = 0; i < schemaImports.length; i++ )
        {
          String location = ( ( SimpleValue )schemaImports[i] ).getStringValue();
          Element elm = ( ( Attr )schemaImports[i].getDomNode() ).getOwnerElement();
View Full Code Here

            getSchemas( location, existing, loader, null );
          }
        }

        XmlObject[] schemaIncludes = xmlObject.selectPath( "declare namespace s='" + Constants.XSD_NS
            + "' .//s:include/@schemaLocation" );
        for( int i = 0; i < schemaIncludes.length; i++ )
        {
          String location = ( ( SimpleValue )schemaIncludes[i] ).getStringValue();
          if( location != null )
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.