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);

         // call the request handler chain
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

      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

                  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 void testBindRequestMessage() throws Exception
   {
      CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
      CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();

      EndpointInvocation epInv = new EndpointInvocation(opMetaData);
      epInv.initInputParams(new Object[]{"Hello World!"});

      SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData, epInv, null);

      ByteArrayOutputStream outs = new ByteArrayOutputStream();
      reqMessage.writeTo(outs);
View Full Code Here

      ParameterMetaData paramMetaData = new ParameterMetaData(opMetaData, xmlName, Constants.TYPE_LITERAL_STRING, "java.lang.String");
      opMetaData.addParameter(paramMetaData);
      paramMetaData.setInHeader(true);
      paramMetaData.setIndex(1);

      EndpointInvocation epInv = new EndpointInvocation(opMetaData);
      epInv.initInputParams(new Object[]{"Hello World!", "IN header message"});

      SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData, epInv, null);

      ByteArrayOutputStream outs = new ByteArrayOutputStream();
      reqMessage.writeTo(outs);
View Full Code Here

      header.setHeaderValue("IN header message");

      Map headers = new HashMap();
      headers.put(xmlName, header);

      EndpointInvocation epInv = new EndpointInvocation(opMetaData);
      epInv.initInputParams(new Object[]{"Hello World!"});

      SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData, epInv, headers);

      ByteArrayOutputStream outs = new ByteArrayOutputStream();
      reqMessage.writeTo(outs);
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.