我编写了一个nodeJs服务,并尝试使用Strong-Soap库尝试在IBM Filenet上执行ExecuteSearch。这是我编写的带有参数的函数,用于尝试执行搜索:
filenetResponse = await client.FNCEWS35Service.FNCEWS35InlinePort.ExecuteSearch({
ExecuteSearchRequest: {
SelectionFilter: {
IncludeProperties: { $attributes: { maxRecursion: 1, maxSize: 1, maxElements: 1 }, $value: 'test' },
IncludeTypes: { $attributes: { maxRecursion: 1, maxSize: 1, maxElements: 1 }, $value: 'test' },
ExcludeProperties: 'test',
$attributes: {
maxRecursion: 1,
maxSize: 1,
maxElements: 1
}
},
$attributes: {
maxElements: 1,
continueFrom: 'test',
continuable: true
}
}
});
将其发送到Filenet时出现以下错误:
"root": {
"Envelope": {
"Body": {
"Fault": {
"faultcode": "e:Server",
"faultstring": "class com.filenet.api.exception.EngineRuntimeException:Web services value for {http://www.w3.org/2001/XMLSchema-instance}type expected. Path when error was detected ExecuteSearchRequest.",
"detail": {
"ErrorStack": {
"ErrorName": "REQUIRED_VALUE_ABSENT",
"ErrorRecord": {
"Source": "com.filenet.api.exception.EngineRuntimeException",
"Description": "Web services value for {http://www.w3.org/2001/XMLSchema-instance}type expected. Path when error was detected ExecuteSearchRequest.",
"Diagnostic": [
{
"$attributes": {
"diagnosticType": "exceptionCode"
},
"$value": "TRANSPORT_WSI_VALUE_EXPECTED"
},
我已经将要发送的参数与ExecuteSearch describe()进行了比较,但找不到导致错误的缺少的类型。
我在想它是否是标题,所以我也尝试添加它,但是它仍然给我同样的错误:
client.addSoapHeader({ id: '', NoTxResume: '' }, 'TxId');
client.addSoapHeader({ Locale: 'en-us', Timezone: '' }, 'Localization');
我开始怀疑是应该继续尝试还是放弃这个想法,转而使用Java,因为有一些可以使用的示例。