Package javax.xml.soap

Examples of javax.xml.soap.Name


                {
                    // don't add an xmlns="..." attribute if the element has a prefix
                    continue;
                }

                Name attrib_pqname =
                        m_soap_factory.createName( attrib.getLocalName(),
                                attrib.getPrefix(),
                                attrib.getNamespaceURI() );

                soap_elem.addAttribute( attrib_pqname,
View Full Code Here


      if ( Node.TEXT_NODE == child.getNodeType(  ) )
      {
         return null;
      }

      Name child_name = child.getElementName(  );

      if ( child_name == null )
      {
         return null;
      }

      String child_uri = child_name.getURI(  );

      if ( child_uri == null )
      {
         return null;
      }
View Full Code Here

      Iterator iter = soap_elem.getAllAttributes(  );

      while ( iter.hasNext(  ) )
      {
         Name attrib_pqname = (Name) iter.next(  );

         // skip all xmlns:foo attributes (e.g. xmlns:xs="urn:schema")
         if ( ( attrib_pqname.getPrefix(  ) != null )
              && attrib_pqname.getPrefix(  ).equals( XmlConstants.NSPREFIX_XMLNS ) )
         {
            continue;
         }

         // skip the xmlns attribute (e.g. xmlns="urn:default")
         if ( ( attrib_pqname.getLocalName(  ) != null )
              && attrib_pqname.getLocalName(  ).equals( XmlConstants.NSPREFIX_XMLNS ) )
         {
            continue;
         }

         appendAttribute( buf,
                          nameToString( attrib_pqname ),
                          soap_elem.getAttributeValue( attrib_pqname ),
                          depth );

         if ( ( ( attrib_pqname.getURI(  ) != null ) && !( "".equals( attrib_pqname.getURI(  ) ) ) )
              && ( ( attrib_pqname.getPrefix(  ) != null ) && !( "".equals( attrib_pqname.getPrefix(  ) ) ) )
              && ( soap_elem.getNamespaceURI( attrib_pqname.getPrefix(  ) ) == null ) )
         {
            appendNamespaceDeclarationAttribute( buf, attrib_pqname, depth );
         }
      }
   }
View Full Code Here

    */
   private void appendXmlnsAttributeIfNoPrefix( StringBuffer buf,
                                                SOAPElement  soap_elem,
                                                int          depth )
   {
      Name elem_pqname = soap_elem.getElementName(  );

      if ( ( elem_pqname.getPrefix(  ) == null ) && ( elem_pqname.getURI(  ) != null ) )
      {
         appendAttribute( buf,
                          XmlConstants.NSPREFIX_XMLNS,
                          elem_pqname.getURI(  ),
                          depth );
      }
   }
View Full Code Here

                                       int          depth )
   {
      Iterator prefixes             = soap_elem.getNamespacePrefixes(  );
      Set      encountered_prefixes = new HashSet(  );

      Name     name = soap_elem.getElementName(  );

      if ( hasNonEmptyValue( name.getPrefix(  ) ) && hasNonEmptyValue( name.getURI(  ) ) )
      {
         encountered_prefixes.add( name.getPrefix(  ) );
         appendNamespaceDeclarationAttribute( buf, name, depth );
      }

      while ( prefixes.hasNext(  ) )
      {
         String prefix = (String) prefixes.next(  );

         if ( encountered_prefixes.contains( prefix ) )
         {
            // duplicate prefix - skip it...
            continue;
         }

         encountered_prefixes.add( prefix );

         try
         {
            Name ns_pqname =
               SOAPFactory.newInstance(  ).createName( "",
                                                       prefix,
                                                       soap_elem.getNamespaceURI( prefix ) );

            appendNamespaceDeclarationAttribute( buf, ns_pqname, depth );
View Full Code Here

   throws SOAPException
   {
      if ( isElement( current_soap_node ) )
      {
         SOAPElement soap_elem   = (SOAPElement) current_soap_node;
         Name        elem_pqname = null;

         try
         {
            elem_pqname = soap_elem.getElementName(  );
         }
         catch ( RuntimeException re )
         {
            //LOG.error( ResourceKeys.MSG.getMsg( ResourceKeys.METHOD_FAILED, "SOAPElement.getElementName()" ) );
         }

         String elem_name = nameToString( elem_pqname );

         if ( ( elem_pqname.getPrefix(  ) == null ) || elem_pqname.getPrefix(  ).equals( "" ) )
         {
            String prefix = getPrefix( elem_pqname, (SOAPElement) root_soap_node );

            if ( prefix != null )
            {
View Full Code Here

                    SOAPHeaderElement headerElement = header.addHeaderElement(qname);

                    // QName soapMustUnderstand = new QName("http://schemas.xmlsoap.org/soap/envelope/",
                    // "mustUnderstand");
                    Name name = SOAPFactory.newInstance()
                        .createName("mustUnderstand", "soap", "http://schemas.xmlsoap.org/soap/envelope/");
                    headerElement.addAttribute(name, "1");
                } else {
                    getHandlerInfoList(ctx).add(getHandlerId());
                }
View Full Code Here

    public static Iterator getJMSProperties(SOAPMessage m) throws SOAPException {

        SOAPHeader sheader = m.getSOAPHeader();

        Name propEleName = createJMSName(InternalConstants.JMS_PROPERTY);

        Iterator it = sheader.getChildElements(propEleName);

        if (it.hasNext()) {
            SOAPHeaderElement she = (SOAPHeaderElement) it.next();
View Full Code Here

        return false;
    }

    public static String getPropertyName(SOAPElement se) throws SOAPException {

        Name attrName = createJMSName(InternalConstants.PNAME);
        String propName = se.getAttributeValue(attrName);

        return propName;
    }
View Full Code Here

        return propName;
    }

    public static Object getPropertyValue(SOAPElement se) throws SOAPException {

        Name pvalueAttrName = createJMSName(InternalConstants.PVALUE);
        String pValue = se.getAttributeValue(pvalueAttrName);

        Object pvObj = null;

        if (isStringProperty(se)) {
View Full Code Here

TOP

Related Classes of javax.xml.soap.Name

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.