Package org.jboss.ws.core.soap

Examples of org.jboss.ws.core.soap.SOAPFactoryImpl


         XMLFragment xmlFragment = new XMLFragment(result);
         String xmlStr = xmlFragment.toXMLString();
         log.debug("Fault detail: " + xmlStr);

         Element domElement = xmlFragment.toElement();
         SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
         return soapFactory.createElement(domElement);
      }
      catch (BindingException e)
      {
         throw new WebServiceException(e);
      }
View Full Code Here


  public void writeHeaders(SOAPMessage message) throws AddressingException
  {
    try
    {
      SOAPFactoryImpl factory = (SOAPFactoryImpl)SOAPFactory.newInstance();
      SOAPHeader soapHeader = message.getSOAPHeader();         
     
      // Add the xmlns:wsa declaration
      soapHeader.addNamespaceDeclaration(ADDR.getNamespacePrefix(), ADDR.getNamespaceURI());
           
      // Write wsa:To
      if (getTo() != null)
      {
        SOAPElement element = soapHeader.addChildElement(new NameImpl(ADDR.getToQName()));
        element.addTextNode(getTo().getURI().toString());
      }

      // Write wsa:From
      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)
      {
        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)
      {
        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

   private SOAPElement appendElement(SOAPElement soapElement, Object obj)
   {
      SOAPElement child = null;
      try
      {
         SOAPFactoryImpl factory = (SOAPFactoryImpl)SOAPFactory.newInstance();
         if (obj instanceof Element)
         {
            child = factory.createElement((Element)obj);
            soapElement.addChildElement(child);
         }
         else if (obj instanceof String)
         {
            Element el = DOMUtils.parse((String)obj);
            child = factory.createElement(el);
            soapElement.addChildElement(child);
         }
         else
         {
            throw new AddressingException("Unsupported element: " + obj.getClass().getName());
View Full Code Here

         XMLFragment xmlFragment = new XMLFragment(result);
         String xmlStr = xmlFragment.toXMLString();
         log.debug("Fault detail: " + xmlStr);

         Element domElement = xmlFragment.toElement();
         SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
         return soapFactory.createElement(domElement);
      }
      catch (BindingException e)
      {
         throw new WebServiceException(e);
      }
View Full Code Here

      return new MessageFactoryImpl();
   }

   public SOAPFactory getSOAPFactory()
   {
      return new SOAPFactoryImpl();
   }
View Full Code Here

/* 55 */     if (log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
/*    */
/*    */     try
/*    */     {
/* 59 */       Element domElement = DOMUtils.parse(xmlFragment);
/* 60 */       SOAPElement soapElement = new SOAPFactoryImpl().createElement(domElement);
/* 61 */       return soapElement;
/*    */     }
/*    */     catch (RuntimeException rte)
/*    */     {
/* 65 */       throw rte;
View Full Code Here

/*     */   public void writeHeaders(SOAPMessage message)
/*     */     throws AddressingException
/*     */   {
/*     */     try
/*     */     {
/* 214 */       SOAPFactoryImpl factory = (SOAPFactoryImpl)SOAPFactory.newInstance();
/* 215 */       SOAPHeader soapHeader = message.getSOAPHeader();
/*     */
/* 218 */       soapHeader.addNamespaceDeclaration(ADDR.getNamespacePrefix(), ADDR.getNamespaceURI());
/*     */
/* 221 */       if (getTo() != null)
/*     */       {
/* 223 */         SOAPElement element = soapHeader.addChildElement(new NameImpl(ADDR.getToQName()));
/* 224 */         element.addTextNode(getTo().getURI().toString());
/*     */       }
/*     */
/* 228 */       if (getFrom() != null)
/*     */       {
/* 230 */         EndpointReferenceImpl epr = (EndpointReferenceImpl)getFrom();
/* 231 */         epr.setRootQName(ADDR.getFromQName());
/* 232 */         SOAPElement soapElement = factory.createElement(epr.toElement());
/* 233 */         soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
/* 234 */         soapHeader.addChildElement(soapElement);
/*     */       }
/*     */
/* 238 */       if (getReplyTo() != null)
/*     */       {
/* 240 */         EndpointReferenceImpl epr = (EndpointReferenceImpl)getReplyTo();
/* 241 */         epr.setRootQName(ADDR.getReplyToQName());
/* 242 */         SOAPElement soapElement = factory.createElement(epr.toElement());
/* 243 */         soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
/* 244 */         soapHeader.addChildElement(soapElement);
/*     */       }
/*     */
/* 248 */       if (getFaultTo() != null)
/*     */       {
/* 250 */         EndpointReferenceImpl epr = (EndpointReferenceImpl)getFaultTo();
/* 251 */         epr.setRootQName(ADDR.getFaultToQName());
/* 252 */         SOAPElement soapElement = factory.createElement(epr.toElement());
/* 253 */         soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
/* 254 */         soapHeader.addChildElement(soapElement);
/*     */       }
/*     */
/* 257 */       appendRequiredHeader(soapHeader, ADDR.getActionQName(), getAction());
View Full Code Here

/*     */         }
/*     */       }
/*     */     }
/*     */     catch (RuntimeException rte)
/*     */     {
/*     */       SOAPFactoryImpl factory;
/*     */       Iterator i$;
/* 359 */       throw rte;
/*     */     }
/*     */     catch (Exception ex)
/*     */     {
View Full Code Here

/* 116 */     return new MessageFactoryImpl();
/*     */   }
/*     */
/*     */   public SOAPFactory getSOAPFactory()
/*     */   {
/* 121 */     return new SOAPFactoryImpl();
/*     */   }
View Full Code Here

/* 313 */       XMLFragment xmlFragment = new XMLFragment(result);
/* 314 */       String xmlStr = xmlFragment.toXMLString();
/* 315 */       log.debug("Fault detail: " + xmlStr);
/*     */
/* 317 */       Element domElement = xmlFragment.toElement();
/* 318 */       SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
/* 319 */       return soapFactory.createElement(domElement);
/*     */     }
/*     */     catch (BindingException e) {
/*     */     }
/* 323 */     throw new WebServiceException(e);
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.soap.SOAPFactoryImpl

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.