Package org.jboss.ws.core

Examples of org.jboss.ws.core.EndpointInvocation


/*    */
/*    */ public class DelegatingInvocation extends Invocation
/*    */ {
/*    */   private EndpointInvocation getEndpointInvocation()
/*    */   {
/* 46 */     EndpointInvocation epInv = (EndpointInvocation)getInvocationContext().getAttachment(EndpointInvocation.class);
/* 47 */     if (epInv == null) {
/* 48 */       throw new IllegalStateException("Cannot obtain endpoint invocation");
/*    */     }
/* 50 */     return epInv;
/*    */   }
View Full Code Here


/* 50 */     return epInv;
/*    */   }
/*    */
/*    */   public void setReturnValue(Object value)
/*    */   {
/* 56 */     EndpointInvocation epInv = getEndpointInvocation();
/* 57 */     epInv.setReturnValue(value);
/*    */
/* 59 */     SOAPMessageContext msgContext = (SOAPMessageContext)getInvocationContext().getAttachment(MessageContext.class);
/* 60 */     if ((msgContext != null) && (msgContext.getMessage() == null))
/*    */     {
/*    */       try
/*    */       {
/* 65 */         OperationMetaData opMetaData = epInv.getOperationMetaData();
/* 66 */         CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
/* 67 */         CommonBinding binding = bindingProvider.getCommonBinding();
/* 68 */         SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
/* 69 */         msgContext.setMessage(resMessage);
/*    */       }
View Full Code Here

/*    */     }
/*    */   }
/*    */
/*    */   public Object[] getArgs()
/*    */   {
/* 81 */     EndpointInvocation epInv = getEndpointInvocation();
/* 82 */     return epInv.getRequestPayload();
/*    */   }
View Full Code Here

/* 82 */     return epInv.getRequestPayload();
/*    */   }
/*    */
/*    */   public Object getReturnValue()
/*    */   {
/* 88 */     EndpointInvocation epInv = getEndpointInvocation();
/* 89 */     return epInv.getReturnValue();
/*    */   }
View Full Code Here

/*     */
/* 159 */     setInboundContextProperties();
/*     */     try
/*     */     {
/* 163 */       boolean oneway = false;
/* 164 */       EndpointInvocation sepInv = null;
/* 165 */       OperationMetaData opMetaData = null;
/* 166 */       CommonBinding binding = this.bindingProvider.getCommonBinding();
/* 167 */       binding.setHeaderSource(this.delegate);
/*     */
/* 170 */       boolean handlersPass = callRequestHandlerChain(sepMetaData, handlerType[0]);
View Full Code Here

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

/*     */     throws BindingException
/*     */   {
/*  72 */     log.debug("unbindRequestMessage: " + opMetaData.getQName());
/*     */     try
/*     */     {
/*  76 */       EndpointInvocation epInv = new EndpointInvocation(opMetaData);
/*     */
/*  78 */       SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
/*  79 */       if (msgContext == null) {
/*  80 */         throw new WSException("MessageContext not available");
/*     */       }
/*  82 */       ParameterMetaData paramMetaData = (ParameterMetaData)opMetaData.getParameters().get(0);
/*  83 */       QName xmlName = paramMetaData.getXmlName();
/*  84 */       epInv.setRequestParamValue(xmlName, reqMessage);
/*     */
/*  86 */       return epInv;
/*     */     }
/*     */     catch (Exception e)
/*     */     {
View Full Code Here

/*     */   public EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, MessageAbstraction reqMessage) throws BindingException
/*     */   {
/*  71 */     log.debug("unbindRequestMessage: " + opMetaData.getQName());
/*     */     try
/*     */     {
/*  75 */       EndpointInvocation epInv = new EndpointInvocation(opMetaData);
/*     */
/*  77 */       CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
/*  78 */       if (msgContext == null) {
/*  79 */         throw new WSException("MessageContext not available");
/*     */       }
/*  81 */       ParameterMetaData paramMetaData = (ParameterMetaData)opMetaData.getParameters().get(0);
/*  82 */       QName xmlName = paramMetaData.getXmlName();
/*     */
/*  84 */       HTTPMessageImpl httpMessage = (HTTPMessageImpl)reqMessage;
/*  85 */       Source source = httpMessage.getXmlFragment().getSource();
/*     */
/*  87 */       epInv.setRequestParamValue(xmlName, source);
/*     */
/*  89 */       return epInv;
/*     */     }
/*     */     catch (Exception e)
/*     */     {
View Full Code Here

/*     */     throws BindingException
/*     */   {
/*  83 */     log.debug("unbindRequestMessage: " + opMetaData.getQName());
/*     */     try
/*     */     {
/*  87 */       EndpointInvocation epInv = new EndpointInvocation(opMetaData);
/*     */
/*  89 */       CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
/*  90 */       if (msgContext == null) {
/*  91 */         throw new WSException("MessageContext not available");
/*     */       }
/*  93 */       ParameterMetaData paramMetaData = (ParameterMetaData)opMetaData.getParameters().get(0);
/*  94 */       QName xmlName = paramMetaData.getXmlName();
/*     */
/*  96 */       SOAPMessage reqMessage = (SOAPMessage)payload;
/*  97 */       SOAPBodyImpl body = (SOAPBodyImpl)reqMessage.getSOAPBody();
/*     */
/*  99 */       SOAPContentElement bodyElement = (SOAPContentElement)body.getBodyElement();
/* 100 */       Source source = bodyElement.getXMLFragment().getSource();
/* 101 */       if (source == null) {
/* 102 */         throw new IllegalStateException("Payload cannot be null");
/*     */       }
/* 104 */       epInv.setRequestParamValue(xmlName, source);
/*     */
/* 106 */       return epInv;
/*     */     }
/*     */     catch (Exception e)
/*     */     {
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.