Package org.jboss.ws.core

Examples of org.jboss.ws.core.HTTPMessageImpl


         if (msgContext == null)
            throw new WSException("MessageContext not available");

         // Associate current message with message context
         Source source = (Source)epInv.getReturnValue();
         HTTPMessageImpl resMessage = new HTTPMessageImpl(source);
         msgContext.setMessageAbstraction(resMessage);

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


            source = contentElement.getXMLFragment().getSource();
         }
      }
      else if (message instanceof HTTPMessageImpl)
      {
         HTTPMessageImpl httpMessage = (HTTPMessageImpl)message;
         source = httpMessage.getXmlFragment().getSource();
      }
      return source;
   }
View Full Code Here

            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

         MessageAbstraction reqMessage;

         String bindingID = sepMetaData.getBindingId();
         if (HTTPBinding.HTTP_BINDING.equals(bindingID))
         {
            reqMessage = new HTTPMessageImpl(headers, inputStream);
         }
         else
         {

            msgFactory.setServiceMode(sepMetaData.getServiceMode());
View Full Code Here

      this.jaxbContext = jaxbContext;
   }

   public MessageAbstraction getRequestMessage(Object obj)
   {
      HTTPMessageImpl reqMsg = null;
      try
      {
         if (Source.class.isAssignableFrom(type))
         {
            Source source = (Source)obj;
            reqMsg = new HTTPMessageImpl(source);
            if(validateDispatch)
               reqMsg.doValidate();
         }
         else if (jaxbContext != null)
         {
            Marshaller marshaller = jaxbContext.createMarshaller();
            marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
            BufferedStreamResult result = new BufferedStreamResult();
            marshaller.marshal(obj, result);

            reqMsg = new HTTPMessageImpl(result);
         }
      }
      catch (RuntimeException rte)
      {
         throw rte;
View Full Code Here

      return reqMsg;
   }

   public Object getReturnObject(MessageAbstraction message)
   {
      HTTPMessageImpl resMsg = (HTTPMessageImpl)message;

      Object retObj = null;
      try
      {
         if (Source.class.isAssignableFrom(type))
         {
            retObj = resMsg.getXmlFragment().getSource();
         }
         else if (jaxbContext != null)
         {
            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
            Source source = resMsg.getXmlFragment().getSource();
            retObj = unmarshaller.unmarshal(source);
         }
      }
      catch (RuntimeException rte)
      {
View Full Code Here

         MessageAbstraction reqMessage;

         String bindingID = sepMetaData.getBindingId();
         if (HTTPBinding.HTTP_BINDING.equals(bindingID))
         {
            reqMessage = new HTTPMessageImpl(headers, inputStream);
         }
         else
         {

            msgFactory.setServiceMode(sepMetaData.getServiceMode());
View Full Code Here

            throw new WSException("MessageContext not available");

         ParameterMetaData paramMetaData = opMetaData.getParameters().get(0);
         QName xmlName = paramMetaData.getXmlName();

         HTTPMessageImpl httpMessage = (HTTPMessageImpl)reqMessage;
         Source source = httpMessage.getXmlFragment().getSource();

         epInv.setRequestParamValue(xmlName, source);

         return epInv;
      }
View Full Code Here

         if (msgContext == null)
            throw new WSException("MessageContext not available");

         // Associate current message with message context
         Source source = (Source)epInv.getReturnValue();
         HTTPMessageImpl resMessage = new HTTPMessageImpl(source);
         msgContext.setMessageAbstraction(resMessage);

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

         MessageAbstraction reqMessage;

         String bindingID = sepMetaData.getBindingId();
         if (HTTPBinding.HTTP_BINDING.equals(bindingID))
         {
            reqMessage = new HTTPMessageImpl(headers, inputStream);
         }
         else if (sepMetaData.isFeatureEnabled(JsonEncodingFeature.class))
         {
            MessageFactoryImpl factory = new MessageFactoryImpl();
            SOAPMessageImpl soapMsg = (SOAPMessageImpl)factory.createMessage();
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.HTTPMessageImpl

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.