SOAP messages not fully processed over TCP / MINA
-------------------------------------------------
Key: CXF-3335
URL: https://issues.apache.org/jira/browse/CXF-3335
Project: CXF
Issue Type: Bug
Components: JAX-WS Runtime
Affects Versions: 2.3.1
Environment: Apache MINA 2.0.2
Reporter: Burton Alexander
Priority: Minor
To simplify internal SOAP message transport I've created a class which
implements the specific SOAP interface (SOAPPort from SIRI -
http://www.siri.org.uk/) and starts a CXF Server using the following code:
private void startService(String address, boolean loggingEnabled) {
JaxWsServerFactoryBean sfb = new JaxWsServerFactoryBean();
sfb.setAddress(address);
sfb.setServiceClass(SOAPPort.class);
sfb.getServiceFactory().setInvoker(new BeanInvoker(this));
if(loggingEnabled) sfb.getInInterceptors().add(new LoggingInInterceptor());
server = sfb.create();
}
When the string address is an HTTP address the system functions as expected.
However, when attempting to use TCP (soap.tcp://) none of the SOAP interface
methods implemented in the enclosing class are invoked.
I've traced the problem as far as SoapTcpDestination's messageReceived method
(implemented from MINA's IoHandler interface). It is being called twice - once
for channel creation and once for channel opened, but not for the actual
message itself:
if (((SoapTcpMessage)message).getChannelId() == 0) { // channel id is always
zero
ChannelService.service(session, (SoapTcpMessage)message);
} else {
Message msg = new MessageImpl();
Exchange exchange = new ExchangeImpl();
exchange.setConduit(conduit);
exchange.setDestination(this);
msg.setExchange(exchange);
msg.setContent(InputStream.class,
((SoapTcpMessage)message).getContentAsStream());
msg.setContent(SoapTcpChannel.class, getChannel(session,
(SoapTcpMessage)message));
msg.setContent(IoSession.class, session);
incomingObserver.onMessage(msg); // never gets executed.
}
To send messages to the created CXF Server I use the following code:
private static SOAPPort getSoapPort(String address) {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(SOAPPort.class);
factory.setAddress(address);
factory.getInInterceptors().add(new LoggingInInterceptor());
factory.getOutInterceptors().add(new LoggingOutInterceptor());
return (SOAPPort) factory.create();
}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira