Examples of selectPath()


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

    messageParts.clear();

    if( WsdlUtils.isRpc( wsdlContext.getDefinition(), bindingOperation ) )
    {
      // get root element
      XmlObject[] paths = msgXml.selectPath( "declare namespace env='"
          + wsdlContext.getSoapVersion().getEnvelopeNamespace() + "';" + "declare namespace ns='"
          + WsdlUtils.getTargetNamespace( wsdlContext.getDefinition() ) + "';" + "$this/env:Envelope/env:Body/ns:"
          + bindingOperation.getName() );

      if( paths.length != 1 )
View Full Code Here

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

        {
          objects = xmlObject.execQuery( xqueryArea.getText() );
        }
        else
        {
          objects = xmlObject.selectPath( xpathArea.getText() );
        }

        StringBuffer result = new StringBuffer();
        XmlOptions options = new XmlOptions();
        options.setSaveOuter();
View Full Code Here

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

        if( cursor.isContainer() )
        {
          Element elm = ( Element )cursor.getDomNode();
          String path = createXPath( elm );
          XmlObject[] paths = destXml.selectPath( path );
          if( paths != null && paths.length > 0 )
          {
            Element elm2 = ( Element )paths[0].getDomNode();

            // transfer attributes
View Full Code Here

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

      String namespaces = declareXPathNamespaces( xmlObject );
      if( namespaces != null && namespaces.trim().length() > 0 )
        xpath = namespaces + xpath;

      XmlObject[] path = xmlObject.selectPath( xpath );
      for( XmlObject xml : path )
      {
        setNodeValue( xml.getDomNode(), value );
      }
View Full Code Here

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

  public static String getXPathValue( String value, String xpath )
  {
    try
    {
      XmlObject xmlObject = XmlObject.Factory.parse( value );
      XmlObject[] nodes = xmlObject.selectPath( xpath );
      if( nodes.length > 0 )
        return getNodeValue( nodes[0].getDomNode() );
    }
    catch( XmlException e )
    {
View Full Code Here

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

    List<XmlObject> result = new ArrayList<XmlObject>();

    if( WsdlUtils.isRpc( wsdlContext.getDefinition(), bindingOperation ) )
    {
      // get root element
      XmlObject[] paths = msgXml.selectPath( "declare namespace env='"
          + wsdlContext.getSoapVersion().getEnvelopeNamespace() + "';" + "declare namespace ns='"
          + WsdlUtils.getTargetNamespace( wsdlContext.getDefinition() ) + "';" + "$this/env:Envelope/env:Body/ns:"
          + bindingOperation.getName() + ( isResponse ? "Response" : "" ) );

      if( paths.length != 1 )
View Full Code Here

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

          xmlOptions.setLoadLineNumbers( XmlOptions.LOAD_LINE_NUMBERS_END_ELEMENT );
          // XmlObject xml = XmlObject.Factory.parse( message, xmlOptions
          // );
          XmlObject xml = XmlUtils.createXmlObject( message, xmlOptions );

          XmlObject[] paths = xml.selectPath( "declare namespace env='"
              + wsdlContext.getSoapVersion().getEnvelopeNamespace() + "';"
              + "$this/env:Envelope/env:Body/env:Fault" );

          if( paths.length > 0 )
          {
View Full Code Here

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

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

    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

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

      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
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.