org.apache.ode.jbi.msgmap
Class ServiceMixMapper
java.lang.Object
org.apache.ode.jbi.msgmap.BaseXmlMapper
org.apache.ode.jbi.msgmap.ServiceMixMapper
- All Implemented Interfaces:
- Mapper
public class ServiceMixMapper
- extends BaseXmlMapper
- implements Mapper
Message mapper for dealing with the degenerate messages that servicemix components such as servicemix-http provide. These
messages are not normalized and hence do not conform to the JBI specification. They are in fact whatever the SOAP body element
happens to be. This mapper will make a reasonable attempt to handle these messages, which means don't count on it working.
Method Summary |
Mapper.Recognized |
isRecognized(javax.jbi.messaging.NormalizedMessage nmsMsg,
javax.wsdl.Operation op)
Determine if this mapper recognizes the format of the NMS message. |
javax.wsdl.Fault |
toFaultType(javax.jbi.messaging.Fault jbiFlt,
java.util.Collection<javax.wsdl.Fault> faults)
Infer the fault type based on the message. |
void |
toNMS(javax.jbi.messaging.NormalizedMessage nmsMsg,
Message odeMsg,
javax.wsdl.Message msgdef,
javax.xml.namespace.QName fault)
Convert a ODE message to NMS format. |
void |
toODE(Message odeMsg,
javax.jbi.messaging.NormalizedMessage nmsMsg,
javax.wsdl.Message msgdef)
Convert an NMS message to ODE format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceMixMapper
public ServiceMixMapper()
isRecognized
public Mapper.Recognized isRecognized(javax.jbi.messaging.NormalizedMessage nmsMsg,
javax.wsdl.Operation op)
- Description copied from interface:
Mapper
- Determine if this mapper recognizes the format of the NMS message.
- Specified by:
isRecognized
in interface Mapper
- Returns:
toNMS
public void toNMS(javax.jbi.messaging.NormalizedMessage nmsMsg,
Message odeMsg,
javax.wsdl.Message msgdef,
javax.xml.namespace.QName fault)
throws javax.jbi.messaging.MessagingException,
MessageTranslationException
- Description copied from interface:
Mapper
- Convert a ODE message to NMS format. This call must only be called if
Mapper.isRecognized(NormalizedMessage, Operation)
returned,
true
.
- Specified by:
toNMS
in interface Mapper
- Throws:
javax.jbi.messaging.MessagingException
MessageTranslationException
toODE
public void toODE(Message odeMsg,
javax.jbi.messaging.NormalizedMessage nmsMsg,
javax.wsdl.Message msgdef)
throws MessageTranslationException
- Description copied from interface:
Mapper
- Convert an NMS message to ODE format. This call must only be called if
Mapper.isRecognized(NormalizedMessage, Operation)
returned,
true
.
- Specified by:
toODE
in interface Mapper
- Throws:
MessageTranslationException
toFaultType
public javax.wsdl.Fault toFaultType(javax.jbi.messaging.Fault jbiFlt,
java.util.Collection<javax.wsdl.Fault> faults)
throws MessageTranslationException
- Description copied from interface:
Mapper
- Infer the fault type based on the message.
- Specified by:
toFaultType
in interface Mapper
- Parameters:
jbiFlt
- JBI fault messagefaults
- collection of possible faults
- Returns:
- matching fault, or null if no match
- Throws:
MessageTranslationException