Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1.7, 3.1.10
-
None
-
Moderate
Description
If a instance of dispatch is created in the following way:
QName serviceName = new QName("http://org.apache.cxf", "stockQuoteReporter"); Service s = Service.create(serviceName); QName portName = new QName("http://org.apache.cxf", "stockQuoteReporterPort"); Dispatch<ByteDataSource> dispatch = s.createDispatch(portName, ByteDataSource.class, Service.Mode.MESSAGE);}}
then invoking the created Dispatch instance like so:
dispatch.invoke(new ByteDataSource("".getBytes()));
results in an exception with the message "DataSource is not valid in MESSAGE mode with XML/HTTP binding."
This contradicts your own documentation(and I believe the JAX-WS spec) in that these are this the only binding and mode you can use in combination with a DataSource :
Dispatch objects can use objects that implement the javax.activation.DataSource interface when the following conditions are true:
the Dispatch object is using the HTTP binding.
the Dispatch object is using message mode.