Package org.jboss.ws.core.soap

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


      Result result = ser.serialize(xmlName, xmlType, value, serContext, null);
      assertNotNull(result);

      AbstractDeserializerFactory deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(byte[].class, xmlType);
      DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
      Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
      byte[] out = (byte[])des.deserialize(xmlName, xmlType, source, serContext);

      assertEquals(new String(value), new String(out));
   }
View Full Code Here


            try
            {
               SerializerSupport ser = (SerializerSupport)serFactory.getSerializer();
               Result result = ser.serialize(xmlName, xmlType, faultCause, serContext, null);
               XMLFragment xmlFragment = new XMLFragment(result);

               Element domElement = xmlFragment.toElement();
               SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
               SOAPElement soapElement = soapFactory.createElement(domElement);

               detail = soapFault.addDetail();
               detail.addChildElement(soapElement);
View Full Code Here

   private XMLFragment xmlFragment;  

   public HTTPMessageImpl(MimeHeaders mimeHeaders, InputStream inputStream)
   {
      this.mimeHeaders = mimeHeaders;
      this.xmlFragment = new XMLFragment(new StreamSource(inputStream));
   }
View Full Code Here

   }

   public HTTPMessageImpl(Source source)
   {
      this.mimeHeaders = new MimeHeaders();
      this.xmlFragment = new XMLFragment(source);
     
      initDefaultMimeHeaders();
   }
View Full Code Here

   }

   public HTTPMessageImpl(Result result)
   {
      this.mimeHeaders = new MimeHeaders();
      this.xmlFragment = new XMLFragment(result);
     
      initDefaultMimeHeaders();
   }
View Full Code Here

            try
            {
               SerializerSupport ser = (SerializerSupport)serFactory.getSerializer();
               Result result = ser.serialize(xmlName, xmlType, faultCause, serContext, null);
               XMLFragment xmlFragment = new XMLFragment(result);

               Element domElement = xmlFragment.toElement();
               SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
               SOAPElement soapElement = soapFactory.createElement(domElement);

               detail = soapFault.addDetail();
               detail.addChildElement(soapElement);
View Full Code Here

            {
               ser = nullSerializer;
            }

            Result result = ser.serialize(new QName("item"), xmlType, compValue, serContext, null);
            buffer.append(new XMLFragment(result).toXMLString());
         }
      }
   }
View Full Code Here

               }
            }
            else
            {
               SOAPContentElement contentElement = (SOAPContentElement)bodyElement;
               contentElement.setXMLFragment(new XMLFragment(source));
            }
         }
         catch (SOAPException ex)
         {
            throw new WebServiceException("Cannot set xml payload", ex);
         }
      }
      else if (message instanceof HTTPMessageImpl)
      {
         HTTPMessageImpl httpMessage = (HTTPMessageImpl)message;
         httpMessage.setXmlFragment(new XMLFragment(source));
      }

      MessageContextAssociation.peekMessageContext().setModified(true);

   }
View Full Code Here

         SOAPBodyImpl soapBody = (SOAPBodyImpl)resMessage.getSOAPBody();
         SOAPContentElement bodyElement = new SOAPBodyElementDoc(xmlName);
         bodyElement = (SOAPContentElement)soapBody.addChildElement(bodyElement);

         Source payload = (Source)epInv.getReturnValue();
         bodyElement.setXMLFragment(new XMLFragment(payload));

         return resMessage;
      }
      catch (Exception e)
      {
View Full Code Here

         String xmlString = DOMWriter.printNode(root, true);
         msgLog.trace(messagePrefix + "\n" + xmlString);
      }
      else if (message instanceof byte[])
      {
         Element root = new XMLFragment(new StreamSource(new ByteArrayInputStream((byte[])message))).toElement();
         String xmlString = DOMWriter.printNode(root, true);
         msgLog.trace(messagePrefix + "\n" + xmlString);
      }
      else if (message instanceof String)
      {
         Element root = new XMLFragment(new StreamSource(new ByteArrayInputStream(((String)message).getBytes()))).toElement();
         String xmlString = DOMWriter.printNode(root, true);
         msgLog.trace(messagePrefix + "\n" + xmlString);
      }
      else
      {
View Full Code Here

TOP

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

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.