Package org.jboss.ws.core

Examples of org.jboss.ws.core.EndpointInvocation


      setInboundContextProperties();

      try
      {
         boolean oneway = false;
         EndpointInvocation sepInv = null;
         OperationMetaData opMetaData = null;
         CommonBinding binding = bindingProvider.getCommonBinding();
         binding.setHeaderSource(delegate);

         if (binding instanceof CommonSOAPBinding)
View Full Code Here


   {
      log.debug("unbindRequestMessage: " + opMetaData.getQName());
      try
      {
         // Construct the endpoint invocation object
         EndpointInvocation epInv = new EndpointInvocation(opMetaData);

         SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
         if (msgContext == null)
            throw new WSException("MessageContext not available");

         ParameterMetaData paramMetaData = opMetaData.getParameters().get(0);
         QName xmlName = paramMetaData.getXmlName();
         epInv.setRequestParamValue(xmlName, reqMessage);

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

      setInboundContextProperties();

      try
      {
         boolean oneway = false;
         EndpointInvocation sepInv = null;
         OperationMetaData opMetaData = null;
         CommonBinding binding = bindingProvider.getCommonBinding();
         binding.setHeaderSource(delegate);

         if (binding instanceof CommonSOAPBinding)
View Full Code Here

   {
      log.debug("unbindRequestMessage: " + opMetaData.getQName());
      try
      {
         // Construct the endpoint invocation object
         EndpointInvocation epInv = new EndpointInvocation(opMetaData);

         CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
         if (msgContext == null)
            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;
      }
      catch (Exception e)
      {
View Full Code Here

   {
      log.debug("unbindRequestMessage: " + opMetaData.getQName());
      try
      {
         // Construct the endpoint invocation object
         EndpointInvocation epInv = new EndpointInvocation(opMetaData);

         CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
         if (msgContext == null)
            throw new WSException("MessageContext not available");

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

         SOAPMessage reqMessage = (SOAPMessage)payload;
         SOAPBodyImpl body = (SOAPBodyImpl)reqMessage.getSOAPBody();
        
         SOAPContentElement bodyElement = (SOAPContentElement)body.getBodyElement();
         Source source = bodyElement.getXMLFragment().getSource();
         if (source == null)
            throw new IllegalStateException("Payload cannot be null");

         epInv.setRequestParamValue(xmlName, source);

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

                  OperationMetaData opMetaData = messageContext.getOperationMetaData();
                  CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
                  CommonBinding binding = bindingProvider.getCommonBinding();
                 
                  log.debug("Handler modified payload, unbind message and update invocation args");
                  EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, messageContext.getMessageAbstraction());
                  wsInv.getInvocationContext().addAttachment(EndpointInvocation.class, epInv);
               }
               catch (BindingException ex)
               {
                  throw new WSException(ex);
View Full Code Here

*/
public class DelegatingInvocation extends Invocation
{
   private EndpointInvocation getEndpointInvocation()
   {
      EndpointInvocation epInv = getInvocationContext().getAttachment(EndpointInvocation.class);
      if (epInv == null)
         throw new IllegalStateException("Cannot obtain endpoint invocation");

      return epInv;
   }
View Full Code Here

   }

   @Override
   public void setReturnValue(Object value)
   {
      EndpointInvocation epInv = getEndpointInvocation();
      epInv.setReturnValue(value);

      SOAPMessageContext msgContext = (SOAPMessageContext)getInvocationContext().getAttachment(javax.xml.rpc.handler.MessageContext.class);
      if (msgContext != null && msgContext.getMessage() == null)
      {
         try
         {
            // Bind the response message
            OperationMetaData opMetaData = epInv.getOperationMetaData();
            CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
            CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
            SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
            msgContext.setMessage(resMessage);
         }
View Full Code Here

   }

   @Override
   public Object[] getArgs()
   {
      EndpointInvocation epInv = getEndpointInvocation();
      return epInv.getRequestPayload();
   }
View Full Code Here

   }

   @Override
   public Object getReturnValue()
   {
      EndpointInvocation epInv = getEndpointInvocation();
      return epInv.getReturnValue();
   }
View Full Code Here

TOP

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

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.