org.mule.module.cxf
Class CxfOutboundMessageProcessor

java.lang.Object
  extended by org.mule.processor.AbstractInterceptingMessageProcessor
      extended by org.mule.module.cxf.CxfOutboundMessageProcessor
All Implemented Interfaces:
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.AbstractInterceptingMessageProcessor
logger, next
 
Constructor Summary
CxfOutboundMessageProcessor(org.apache.cxf.endpoint.Client client)
           
 
Method Summary
protected  MuleEvent buildResponseMessage(MuleEvent request, MuleEvent transportResponse, java.lang.Object[] response)
           
protected  void cleanup()
           
protected  MuleEvent doSendWithClient(MuleEvent event)
           
protected  MuleEvent doSendWithProxy(MuleEvent event)
           
protected  java.lang.Object[] getArgs(MuleEvent event)
           
protected  org.apache.cxf.service.model.BindingOperationInfo getBindingOperationFromEndpoint(org.apache.cxf.endpoint.Endpoint ep, java.lang.String operationName)
           
 org.apache.cxf.endpoint.Client getClient()
           
 java.lang.reflect.Method getMethod(MuleEvent event)
           
protected  java.lang.String getMethodOrOperationName(MuleEvent event)
           
 java.lang.String getOperation()
           
 org.apache.cxf.service.model.BindingOperationInfo getOperation(MuleEvent event)
           
protected  org.apache.cxf.service.model.BindingOperationInfo getOperation(java.lang.String opName)
           
 CxfPayloadToArguments getPayloadToArguments()
           
protected  boolean isClientProxyAvailable()
           
 boolean isProxy()
           
 java.lang.String parseSoapAction(java.lang.String soapAction, javax.xml.namespace.QName method, MuleEvent event)
           
 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(javax.xml.ws.BindingProvider clientProxy)
           
 void setOperation(java.lang.String operation)
           
 void setPayloadToArguments(CxfPayloadToArguments payloadToArguments)
           
 void setProxy(boolean proxy)
           
protected  org.apache.cxf.service.model.BindingOperationInfo tryToGetTheOperationInDotNetNamingConvention(org.apache.cxf.endpoint.Endpoint ep, java.lang.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.AbstractInterceptingMessageProcessor
setListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CxfOutboundMessageProcessor

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

cleanup

protected void cleanup()

getArgs

protected java.lang.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 AbstractInterceptingMessageProcessor
Throws:
MuleException

doSendWithProxy

protected MuleEvent doSendWithProxy(MuleEvent event)
                             throws java.lang.Exception
Throws:
java.lang.Exception

doSendWithClient

protected MuleEvent doSendWithClient(MuleEvent event)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getMethod

public java.lang.reflect.Method getMethod(MuleEvent event)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getOperation

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

tryToGetTheOperationInDotNetNamingConvention

protected org.apache.cxf.service.model.BindingOperationInfo tryToGetTheOperationInDotNetNamingConvention(org.apache.cxf.endpoint.Endpoint ep,
                                                                                                         java.lang.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.

Parameters:
opName -
ep -
Returns:

getBindingOperationFromEndpoint

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

getMethodOrOperationName

protected java.lang.String getMethodOrOperationName(MuleEvent event)
                                             throws DispatchException
Throws:
DispatchException

getOperation

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

buildResponseMessage

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

parseSoapAction

public java.lang.String parseSoapAction(java.lang.String soapAction,
                                        javax.xml.namespace.QName method,
                                        MuleEvent event)

setPayloadToArguments

public void setPayloadToArguments(CxfPayloadToArguments payloadToArguments)

isClientProxyAvailable

protected boolean isClientProxyAvailable()

isProxy

public boolean isProxy()

setProxy

public void setProxy(boolean proxy)

getOperation

public java.lang.String getOperation()

setOperation

public void setOperation(java.lang.String operation)

setClientProxy

public void setClientProxy(javax.xml.ws.BindingProvider clientProxy)

getPayloadToArguments

public CxfPayloadToArguments getPayloadToArguments()

getClient

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


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