On 8/8/06, speed <[EMAIL PROTECTED]> wrote:
Thank you for quick reply. If you have time, I would like to understand
the
reason behind this problem for curiosity sake and also will help me
understand ServiceMix better.
The JBI spec mandates a valid xml payload as the content of the message.
ServiceMix allow null contents or other kind of non-xml content, though all
components have not been extensively tested with such things.
One another thing is that, I am using out of the box VFS FilePoller and
FileWriter (within static-recipient-list, EIP) which uses
BinaryFileMarshaler, again as is. So how do I define a dummy XML payload,
which property should be set?
Would you mind raising a JIRA for that ? The BinaryFileMarshaler should be
able
to handle that. As a workaround (if you don' t want to use svn head), you
should implement your own marshaler by inheriting the BinaryFileMarshaler
and just override readMessage wih
public void readMessage(MessageExchange exchange, NormalizedMessage
message, InputStream in, String path) throws IOException, JBIException {
super.readMessage(exchange, message, in, path);
message.setContent(new StringContent("<payload/>"));
}
Another kind of similar problem I am facing with EIP component usage of
static-routing-slip and/or pipeline consists of the following error, again
everything works fine though, I believe it has something to do with the
response message being received:
error: javax.jbi.messaging.MessagingException: illegal
exchange status: done
This usually happen when a component does not recognize an InOut mep and
use it as an InOnly mep.
I am using lightweight components extended from TranformComponentSupport.
If your component returns false when the "transform"
method is called and the exchange is an InOut mep, this error will occur.
Here is servicemix.xml snippet, please let me know if I am doing anything
wrong here:
<!-- this is the BinaryFileMarshaler for reading and writing binay files
from a ftp server -->
<bean id="marshaler"
class="org.apache.servicemix.components.util.BinaryFileMarshaler"
singleton="true">
<property name="contentType" value="binarydata"/>
<property name="attachment" value="file"/>
</bean>
<!-- pipeline and routing slip ->
<sm:activationSpec>
<sm:component>
<eip:component>
<eip:endpoints>
<eip:pipeline
service="bc:pipeline" endpoint="endpoint">
<eip:transformer>
<eip:exchange-target
service="bc:routingSlip" />
</eip:transformer>
<eip:target>
<eip:exchange-target
service="bc:tracer" />
</eip:target>
</eip:pipeline>
</eip:endpoints>
</eip:component>
</sm:component>
</sm:activationSpec>
<sm:activationSpec>
<sm:component>
<eip:component>
<eip:endpoints>
<eip:static-routing-slip
service="bc:routingSlip"
endpoint="endpoint">
<eip:targets>
<eip:exchange-target
service="bc:xmltransformer" />
<eip:exchange-target
service="bc:processList" />
<eip:exchange-target
service="bc:mailsender" />
</eip:targets>
</eip:static-routing-slip>
</eip:endpoints>
</eip:component>
</sm:component>
</sm:activationSpec>
Once agin thank you for kind help.
speed
--
View this message in context:
http://www.nabble.com/EIP-components-throw-NullPointerException-tf2057346.html#a5696712
Sent from the ServiceMix - User forum at Nabble.com.
--
Cheers,
Guillaume Nodet