Examples of removeNamespaceDeclaration()


Examples of javax.xml.soap.SOAPBody.removeNamespaceDeclaration()

            String uri = "myURI";
            SOAPMessage msg = MessageFactory.newInstance().createMessage();
            SOAPEnvelope envelope = msg.getSOAPPart().getEnvelope();
            SOAPBody body = envelope.getBody();
            body.addNamespaceDeclaration(prefix, uri);
            boolean b = body.removeNamespaceDeclaration(prefix);
            assertTrue("removeNamespaceDeclaration() did not return true", b);
            b = body.removeNamespaceDeclaration(prefix);
            assertFalse("removeNamespaceDeclaration() did not return false", b);
            assertNull(body.getNamespaceURI(prefix));
        } catch (Exception e) {
View Full Code Here

Examples of javax.xml.soap.SOAPBody.removeNamespaceDeclaration()

            SOAPEnvelope envelope = msg.getSOAPPart().getEnvelope();
            SOAPBody body = envelope.getBody();
            body.addNamespaceDeclaration(prefix, uri);
            boolean b = body.removeNamespaceDeclaration(prefix);
            assertTrue("removeNamespaceDeclaration() did not return true", b);
            b = body.removeNamespaceDeclaration(prefix);
            assertFalse("removeNamespaceDeclaration() did not return false", b);
            assertNull(body.getNamespaceURI(prefix));
        } catch (Exception e) {
            fail("Exception: " + e);
        }
View Full Code Here

Examples of javax.xml.soap.SOAPBody.removeNamespaceDeclaration()

            String uri = "myURI";
            SOAPMessage msg = MessageFactory.newInstance().createMessage();
            SOAPEnvelope envelope = msg.getSOAPPart().getEnvelope();
            SOAPBody body = envelope.getBody();
            body.addNamespaceDeclaration(prefix, uri);
            boolean b = body.removeNamespaceDeclaration(prefix);
            assertTrue("removeNamespaceDeclaration() did not return true", b);
            b = body.removeNamespaceDeclaration(prefix);
            assertFalse("removeNamespaceDeclaration() did not return false", b);
            assertNull(body.getNamespaceURI(prefix));
        } catch (Exception e) {
View Full Code Here

Examples of javax.xml.soap.SOAPBody.removeNamespaceDeclaration()

            SOAPEnvelope envelope = msg.getSOAPPart().getEnvelope();
            SOAPBody body = envelope.getBody();
            body.addNamespaceDeclaration(prefix, uri);
            boolean b = body.removeNamespaceDeclaration(prefix);
            assertTrue("removeNamespaceDeclaration() did not return true", b);
            b = body.removeNamespaceDeclaration(prefix);
            assertFalse("removeNamespaceDeclaration() did not return false", b);
            assertNull(body.getNamespaceURI(prefix));
        } catch (Exception e) {
            fail("Exception: " + e);
        }
View Full Code Here

Examples of javax.xml.soap.SOAPElement.removeNamespaceDeclaration()

                if (header != null) {
                    String prefixAtHeader = header.getPrefix();
                    SOAPElement env = getEnvelope();
                    header.detachNode();
                    if (prefixAtHeader != null && !prefixAtHeader.equals(env.getPrefix())) {
                        env.removeNamespaceDeclaration(prefixAtHeader);
                    }
                }
            }
        } catch (SOAPException e) {
            throw new XMLStreamException(e);
View Full Code Here

Examples of javax.xml.soap.SOAPElement.removeNamespaceDeclaration()

      if (getFrom() != null)
      {
        EndpointReferenceImpl epr = (EndpointReferenceImpl)getFrom();
        epr.setRootQName(ADDR.getFromQName());
        SOAPElement soapElement = factory.createElement(epr.toElement());
        soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
        soapHeader.addChildElement(soapElement);
      }

      // Write wsa:ReplyTo
      if (getReplyTo() != null)
View Full Code Here

Examples of javax.xml.soap.SOAPElement.removeNamespaceDeclaration()

      if (getReplyTo() != null)
      {
        EndpointReferenceImpl epr = (EndpointReferenceImpl)getReplyTo();
        epr.setRootQName(ADDR.getReplyToQName());
        SOAPElement soapElement = factory.createElement(epr.toElement());
        soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
        soapHeader.addChildElement(soapElement);
      }

      // Write wsa:FaultTo
      if (getFaultTo() != null)
View Full Code Here

Examples of javax.xml.soap.SOAPElement.removeNamespaceDeclaration()

      if (getFaultTo() != null)
      {
        EndpointReferenceImpl epr = (EndpointReferenceImpl)getFaultTo();
        epr.setRootQName(ADDR.getFaultToQName());
        SOAPElement soapElement = factory.createElement(epr.toElement());
        soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
        soapHeader.addChildElement(soapElement);
      }

      appendRequiredHeader(soapHeader, ADDR.getActionQName(), getAction());
     
View Full Code Here

Examples of javax.xml.soap.SOAPElement.removeNamespaceDeclaration()

      if (getFrom() != null)
      {
        EndpointReferenceImpl epr = (EndpointReferenceImpl)getFrom();
        epr.setRootQName(ADDR.getFromQName());
        SOAPElement soapElement = factory.createElement(epr.toElement());
        soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
        soapHeader.addChildElement(soapElement);
      }

      // Write wsa:ReplyTo
      if (getReplyTo() != null)
View Full Code Here

Examples of javax.xml.soap.SOAPElement.removeNamespaceDeclaration()

      if (getReplyTo() != null)
      {
        EndpointReferenceImpl epr = (EndpointReferenceImpl)getReplyTo();
        epr.setRootQName(ADDR.getReplyToQName());
        SOAPElement soapElement = factory.createElement(epr.toElement());
        soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
        soapHeader.addChildElement(soapElement);
      }

      // Write wsa:FaultTo
      if (getFaultTo() != 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.