Examples of toParent()


Examples of org.apache.xmlbeans.XmlCursor.toParent()

    static FormChoice findAttributeFormDefault(XmlObject obj)
    {
        XmlCursor cur = obj.newCursor();
        while (cur.getObject().schemaType() != Schema.type)
            if (!cur.toParent())
                return null;
        return ((Schema)cur.getObject()).xgetAttributeFormDefault();
    }

    static SchemaLocalAttributeImpl translateAttribute(
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toParent()

  public Content validate( Context context ) throws XmlException
  {
    XmlCursor cursor = context.getCursor();
    cursor.push();
    if( cursor.toParent() && cursor.toFirstChild() )
    {
      // Element has children
      cursor.pop();
      return new SequenceContent( schema, completed );
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toParent()

  }

  private static final String formatQName( XmlCursor xmlc, QName qName )
  {
    XmlCursor parent = xmlc.newCursor();
    parent.toParent();
    String prefix = parent.prefixForNamespace( qName.getNamespaceURI() );
    parent.dispose();
    String name;
    if( prefix == null || prefix.length() == 0 )
      name = qName.getLocalPart();
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toParent()

      cursor.beginElement( WSRM_CREATE_SEQUENCE, wsrmNamespace );
      cursor.beginElement( "Offer", wsrmNamespace );
      cursor.beginElement( "Identifier", wsrmNamespace );
      cursor.insertChars( "urn:soapui:" + uuid );

      cursor.toParent();
      cursor.toParent();

      cursor.beginElement( WSRM_ACKNOWLEDGMENTS_TO, wsrmNamespace );
      cursor.insertNamespace( "wsa", WsaUtils.getNamespace( startSequenceRequest.getWsaConfig().getVersion() ) );
      cursor.beginElement( "Address", WsaUtils.getNamespace( startSequenceRequest.getWsaConfig().getVersion() ) );
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toParent()

      cursor.beginElement( "Offer", wsrmNamespace );
      cursor.beginElement( "Identifier", wsrmNamespace );
      cursor.insertChars( "urn:soapui:" + uuid );

      cursor.toParent();
      cursor.toParent();

      cursor.beginElement( WSRM_ACKNOWLEDGMENTS_TO, wsrmNamespace );
      cursor.insertNamespace( "wsa", WsaUtils.getNamespace( startSequenceRequest.getWsaConfig().getVersion() ) );
      cursor.beginElement( "Address", WsaUtils.getNamespace( startSequenceRequest.getWsaConfig().getVersion() ) );
      if( ackTo == null || ackTo.length() < 1 )
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toParent()

      cursor.insertChars( ackTo );
      // cursor.insertChars(request.getWsrmConfig().getAckTo());

      if( expires != 0 )
      {
        cursor.toParent();

        cursor.beginElement( WSRM_EXPIRES, wsrmNamespace );
        cursor.insertChars( expires.toString() );
      }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toParent()

        cursor.beginElement( WSRM_CLOSE_SEQUENCE, wsrmNamespace );

        cursor.beginElement( WSRM_IDENTIFIER, wsrmNamespace );
        cursor.insertChars( identifier );

        cursor.toParent();

        cursor.beginElement( WSRM_LAST_MSG, wsrmNamespace );
        cursor.insertChars( String.valueOf( lastMsgNum ) );
        cursor.dispose();
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toParent()

          {
            QName childName = XmlUtils.getQName( children.item( c ) );
            if( !elementName.equals( childName ) )
            {
              XmlCursor cur = paths[0].newCursor();
              cur.toParent();
              cur.toChild( childName );
              errors.add( XmlError.forCursor( "Invalid element [" + childName + "] in SOAP Body", cur ) );
              cur.dispose();
            }
          }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toParent()

        // ignore cid: related errors
        if( validationError.getErrorCode().equals( "base64Binary" )
            || validationError.getErrorCode().equals( "hexBinary" ) )
        {
          XmlCursor cursor = validationError.getCursorLocation();
          if( cursor.toParent() )
          {
            String text = cursor.getTextValue();

            // special handling for soapui/MTOM -> add option for
            // disabling?
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toParent()

        value = cursor.getTextValue();
      if( TypeInferrer.validateSimpleType( value, simpleType ) )
        return this;
      XmlAnySimpleType newType = TypeInferrer.expandTypeForValue( value, simpleType );
      if( cursor.getName() == null )
        cursor.toParent();
      if( context.getHandler().callback( ConflictHandler.Event.MODIFICATION, ConflictHandler.Type.TYPE,
          cursor.getName(), context.getPath(), "Illegal content '" + value + "'" ) )
      {
        // Switch to other simpleType.
        // return
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.