org.mule.module.cxf
Class CxfOutboundMessageProcessor

java.lang.Object
  extended by org.mule.processor.AbstractInterceptingMessageProcessorBase
      extended by org.mule.processor.AbstractInterceptingMessageProcessor
          extended by org.mule.module.cxf.CxfOutboundMessageProcessor
All Implemented Interfaces:
AnnotatedObject, MuleContextAware, InterceptingMessageProcessor, MessageProcessor, MessageSource

public class CxfOutboundMessageProcessor
extends AbstractInterceptingMessageProcessor

The CxfOutboundMessageProcessor performs outbound CXF processing, sending an event through the CXF client, then on to the next MessageProcessor.


Field Summary
 
Fields inherited from class org.mule.processor.AbstractInterceptingMessageProcessorBase
logger, muleContext, next, notificationHandler
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
CxfOutboundMessageProcessor(org.apache.cxf.endpoint.Client client)
           
 
Method Summary
protected  Object[] addHoldersToResponse(Object response, Object[] args)
           
protected  MuleEvent buildResponseMessage(MuleEvent request, MuleEvent transportResponse, Object[] response)
           
protected  void cleanup()
           
protected  MuleEvent doSendWithClient(MuleEvent event)
           
protected  MuleEvent doSendWithProxy(MuleEvent event)
           
protected  Object[] getArgs(MuleEvent event)
           
protected  org.apache.cxf.service.model.BindingOperationInfo getBindingOperationFromEndpoint(org.apache.cxf.endpoint.Endpoint ep, String operationName)
           
 org.apache.cxf.endpoint.Client getClient()
           
 Method getMethod(MuleEvent event)
           
protected  String getMethodOrOperationName(MuleEvent event)
           
 String getOperation()
           
 org.apache.cxf.service.model.BindingOperationInfo getOperation(MuleEvent event)
           
protected  org.apache.cxf.service.model.BindingOperationInfo getOperation(String opName)
           
 CxfPayloadToArguments getPayloadToArguments()
           
protected  boolean isClientProxyAvailable()
           
 boolean isProxy()
           
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
 MuleEvent processNext(MuleEvent event)
          This method is public so it can be invoked from the MuleUniversalConduit.
 void setClientProxy(BindingProvider clientProxy)
           
 void setDecoupledEndpoint(String decoupledEndpoint)
           
 void setOperation(String operation)
           
 void setPayloadToArguments(CxfPayloadToArguments payloadToArguments)
           
 void setProxy(boolean proxy)
           
protected  org.apache.cxf.service.model.BindingOperationInfo tryToGetTheOperationInDotNetNamingConvention(org.apache.cxf.endpoint.Endpoint ep, String opName)
           This method tries to call getBindingOperationFromEndpoint(Endpoint, String) with the .NET naming convention for .NET webservices (method names start with a capital letter).
 
Methods inherited from class org.mule.processor.AbstractInterceptingMessageProcessorBase
getAnnotation, getAnnotations, getListener, getMuleContext, isEventValid, setAnnotations, setListener, setMuleContext, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.source.MessageSource
setListener
 

Constructor Detail

CxfOutboundMessageProcessor

public CxfOutboundMessageProcessor(org.apache.cxf.endpoint.Client client)
Method Detail

cleanup

protected void cleanup()

getArgs

protected Object[] getArgs(MuleEvent event)
                    throws TransformerException
Throws:
TransformerException

process

public MuleEvent process(MuleEvent event)
                  throws MuleException
Description copied from interface: MessageProcessor
Invokes the MessageProcessor.

Parameters:
event - MuleEvent to be processed
Returns:
optional response MuleEvent
Throws:
MuleException

processNext

public MuleEvent processNext(MuleEvent event)
                      throws MuleException
This method is public so it can be invoked from the MuleUniversalConduit.

Overrides:
processNext in class AbstractInterceptingMessageProcessorBase
Throws:
MuleException

doSendWithProxy

protected MuleEvent doSendWithProxy(MuleEvent event)
                             throws Exception
Throws:
Exception

doSendWithClient

protected MuleEvent doSendWithClient(MuleEvent event)
                              throws Exception
Throws:
Exception

getMethod

public Method getMethod(MuleEvent event)
                 throws Exception
Throws:
Exception

getOperation

protected org.apache.cxf.service.model.BindingOperationInfo getOperation(String opName)
                                                                  throws Exception
Throws:
Exception

tryToGetTheOperationInDotNetNamingConvention

protected org.apache.cxf.service.model.BindingOperationInfo tryToGetTheOperationInDotNetNamingConvention(org.apache.cxf.endpoint.Endpoint ep,
                                                                                                         String opName)

This method tries to call getBindingOperationFromEndpoint(Endpoint, String) with the .NET naming convention for .NET webservices (method names start with a capital letter).

CXF generates method names compliant with Java naming so if the WSDL operation names starts with uppercase letter, matching with method name does not work - thus the work around.


getBindingOperationFromEndpoint

protected org.apache.cxf.service.model.BindingOperationInfo getBindingOperationFromEndpoint(org.apache.cxf.endpoint.Endpoint ep,
                                                                                            String operationName)

getMethodOrOperationName

protected String getMethodOrOperationName(MuleEvent event)
                                   throws DispatchException
Throws:
DispatchException

getOperation

public org.apache.cxf.service.model.BindingOperationInfo getOperation(MuleEvent event)
                                                               throws Exception
Throws:
Exception

buildResponseMessage

protected MuleEvent buildResponseMessage(MuleEvent request,
                                         MuleEvent transportResponse,
                                         Object[] response)

addHoldersToResponse

protected Object[] addHoldersToResponse(Object response,
                                        Object[] args)

setPayloadToArguments

public void setPayloadToArguments(CxfPayloadToArguments payloadToArguments)

isClientProxyAvailable

protected boolean isClientProxyAvailable()

isProxy

public boolean isProxy()

setProxy

public void setProxy(boolean proxy)

getOperation

public String getOperation()

setOperation

public void setOperation(String operation)

setClientProxy

public void setClientProxy(BindingProvider clientProxy)

getPayloadToArguments

public CxfPayloadToArguments getPayloadToArguments()

getClient

public org.apache.cxf.endpoint.Client getClient()

setDecoupledEndpoint

public void setDecoupledEndpoint(String decoupledEndpoint)


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.