Package org.jboss.ws.core

Examples of org.jboss.ws.core.HTTPMessageImpl


         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


         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

         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

         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

      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

         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

/*  58 */     this.jaxbContext = jaxbContext;
/*     */   }
/*     */
/*     */   public MessageAbstraction getRequestMessage(Object obj)
/*     */   {
/*  63 */     HTTPMessageImpl reqMsg = null;
/*     */     try
/*     */     {
/*  66 */       if (Source.class.isAssignableFrom(this.type))
/*     */       {
/*  68 */         Source source = (Source)obj;
/*  69 */         reqMsg = new HTTPMessageImpl(source);
/*  70 */         if (this.validateDispatch)
/*  71 */           reqMsg.doValidate();
/*     */       }
/*  73 */       else if (this.jaxbContext != null)
/*     */       {
/*  75 */         Marshaller marshaller = this.jaxbContext.createMarshaller();
/*  76 */         marshaller.setProperty("jaxb.fragment", Boolean.valueOf(true));
/*  77 */         BufferedStreamResult result = new BufferedStreamResult();
/*  78 */         marshaller.marshal(obj, result);
/*     */
/*  80 */         reqMsg = new HTTPMessageImpl(result);
/*     */       }
/*     */     }
/*     */     catch (RuntimeException rte)
/*     */     {
/*  85 */       throw rte;
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.