Package org.jboss.ws.core

Examples of org.jboss.ws.core.HTTPMessageImpl


            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

         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

         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

      String resMessage = (String)metadata.get(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE);
      if (resCode != null && validResponseCodes.contains(resCode) == false)
         throw new WSException("Invalid HTTP server response [" + resCode + "] - " + resMessage);

      MimeHeaders mimeHeaders = getMimeHeaders(metadata);
      HTTPMessageImpl soapMsg = new HTTPMessageImpl(mimeHeaders, inputStream);
      return soapMsg;
   }
View Full Code Here

         dataObject = ((OnewayInvocation)dataObject).getParameters()[0];

      if ((dataObject instanceof HTTPMessageImpl) == false)
         throw new IllegalArgumentException("Not a HTTPMessage: " + dataObject);

      HTTPMessageImpl httpMessage = (HTTPMessageImpl)dataObject;
      Element root = httpMessage.getXmlFragment().toElement();

      // debug the outgoing message
      if (log.isTraceEnabled())
      {
         log.trace("Outgoing Message\n" + DOMWriter.printNode(root, true));
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

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.