我写了一个 nodeJs 服务并尝试使用 strong-soap 库来尝试在 IBM Filenet 上执行搜索。这是我用参数编写的函数,用于尝试执行搜索:
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,因为有一些我可以使用的工作示例。