当 jpos 通道标头字符串包含空格时,我遇到了一个问题。我在通道适配器配置中进行了如下配置,但是当我启动 Q2 服务器时,它似乎修剪了标头值。因此,对于某些请求,我没有从 jpos 服务器得到任何响应。
<channel-adaptor class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2" name="my-channel">
<channel class="CBCChannel" logger="Q2"
packager="org.jpos.iso.packager.GenericPackager" header="ISOHEADER ">
<property name="packager-config" value="/path/to/PACKAGER/iso87ascii.xml" />
<property name="host" value="xxx.xx.xx.xx"/>
<property name="port" value="yyyy" />
</channel>
<in>channel-send</in>
<out>channel-receive</out>
<property name="timeout" value="300000" />
<property name="keep-alive" value="true" />
<reconnect-delay>10000</reconnect-delay>
</channel-adaptor>
CBCChannel 只是扩展了 RawChannel
public class CBCChannel extends RawChannel {
public CBCChannel() throws ISOException {
}
public CBCChannel(String host, int port, ISOPackager p, byte[] header) {
super(host, port, p, header);
}
public CBCChannel(ISOPackager p, byte[] header) throws IOException {
super(p, header);
}
public CBCChannel(ISOPackager p, byte[] header, ServerSocket serverSocket) throws IOException {
super(p, header, serverSocket);
}
}
有没有办法配置包含空格而不忽略空格的频道标题?