Web services DominoDesigner8.5.2中的WSDL数组类型
我正在使用正在创建以下代码的WSDL文件-Web services DominoDesigner8.5.2中的WSDL数组类型,web-services,wsdl,lotus-notes,lotusscript,Web Services,Wsdl,Lotus Notes,Lotusscript,我正在使用正在创建以下代码的WSDL文件- Class test_n0 As ArrayType_n1 Public test() As test_test2_n0 Sub NEW End Sub End Class Class As test_test2_n0 Public t1 As StringType_n1 Public t2 As StringType_n1 Public t3 As StringType_n1 Sub NEW End Sub End Cl
Class test_n0 As ArrayType_n1
Public test() As test_test2_n0
Sub NEW
End Sub
End Class
Class As test_test2_n0
Public t1 As StringType_n1
Public t2 As StringType_n1
Public t3 As StringType_n1
Sub NEW
End Sub
End Class
我无法处理lotus脚本中的ArrayType。有人能帮我吗
示例WSDLs-我无法复制整个..但它如下所示
<xs:complexType name="SDDBComputer2InstanceType">
<xs:sequence>
<xs:element name="test" type="cmn:StringType" nillable="true" minOccurs="0"/>
<xs:element name="test.hba" minOccurs="0">
<xs:complexType>
<xs:complexContent>
<xs:extension base="cmn:ArrayType">
<xs:sequence>
<xs:element name="test.hba" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:complexContent>
<xs:extension base="cmn:StructureType">
<xs:sequence>
<xs:element name="t1" type="cmn:StringType" nillable="true" minOccurs="0"/>
<xs:element name="t2" type="cmn:StringType" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
//这就是我在为数组分配单结构元素时遇到的问题。您的名称空间看起来是错误的。我怀疑你删除了那些你无法发布的内容 据我所知,问题在于这条线
<xs:extension base="cmn:ArrayType">
如果是这种情况,则需要检查模式中的cmn
。这将在LS代码的定义标记的名称空间中引用,如下所示:
const n1 = "URL to Schema"
一旦你有了这个模式,你需要看看它是什么结构。基于您的LS代码,这将是一种
Public test() As test_test2_n0
test\u test2
将在n0
架构中引用。你也需要检查一下。目前代码片段看起来有效,但如果没有完整的WSDL/XSD文件(不是默认文件),我无法确认这一点
除此之外,还有其他一些事情需要检查
将WSDL作为提供者导入设计器客户端。有时,如果有它不喜欢的东西,它会给出一个更具描述性的信息
将WSDL作为Java使用者导入,并将创建的对象与LotusScript进行比较,看看有什么不同(假设它作为Java导入)
LotusScript对命名方法/变量有36个字符的限制。但我在你的片段中看不到这是一个问题的证据
LotusScript不区分大小写,而Java不区分大小写。因此,您可能会得到重复的引用
LotusScript+WSDL不相互检查保留的关键字(例如文本、文件、注释文档)。如果您有其中之一,则可能会导致导入问题
最后它解决了。感谢@Simon对您的指导和帮助
我在lotuscript代码中做了一些变通,重新声明了这里声明的数组,它成功了。
启动web服务并声明web服务的所有其他元素后,我再次使用-
Redim test(10) as test_test2_n0
现在我可以在上面声明的数组中分配test_test2_n0(结构类型)的元素
所以我最后的代码在这里-
Web服务使用者-由notes使用WSDL创建-
Class test_n0 As ArrayType_n1
Public test() As test_test2_n0
Sub NEW
End Sub
End Class
Class test_test2_n0 As StructureType_n1
Public t1 As StringType_n1
Public t2 As StringType_n1
Public t3 As StringType_n1
Sub NEW
End Sub
End Class
Notes代理中的示例代码-
Dim testStruct_Sub As New test_test2_n0
Dim testArray_Sub As New test_n0
Redim test(10) as test_test2_n0
Set testStruct_Sub.t1= "Some Value"
Set testStruct_Sub.t2= "Some Value"
Set testStruct_Sub.t3= "Some Value"
Set testArray_Sub.test(0) = testStruct_Sub
我的学习-
如果在LotusScript代码中没有识别任何类型,请使用兼容的类型类重新声明变量
如果在consumer中创建了两个同名的类(一个使用StructureType,另一个使用ArrayType),那么必须重新设计模式,使其只有一个结构数组
我花了很长时间才理解第二点,我发现Notes有局限性。你能发布你的示例WSDL吗?@Simon添加了示例WSDL。我不能把全部内容放在这里,因为它是由第三方提供的。仍然没有太多内容。您可以在标记中发布名称空间吗?如果没有,我将发布一些步骤进行调查。
这行吗?感谢您的快速帮助。很遗憾,由于无法看到架构,我无法对其进行更多的评论。是的。这是正确的。代码的创建方式与上面提到的相同。当我访问类test\u n0中的test()作为ArrayType\u n1 Public test()作为test\u test2\u n0 Sub NEW End Sub End类时,我被卡住了。我无法在lotusscript中处理数组。Lotus脚本代码如下-Dim testSome\u Sub as New test\u n0 Dim testsome2\u Sub as New test\u test2\u n0 testsome2\u Sub.t1.Value=“some Value”
Redim test(10) as test_test2_n0
Class test_n0 As ArrayType_n1
Public test() As test_test2_n0
Sub NEW
End Sub
End Class
Class test_test2_n0 As StructureType_n1
Public t1 As StringType_n1
Public t2 As StringType_n1
Public t3 As StringType_n1
Sub NEW
End Sub
End Class
Dim testStruct_Sub As New test_test2_n0
Dim testArray_Sub As New test_n0
Redim test(10) as test_test2_n0
Set testStruct_Sub.t1= "Some Value"
Set testStruct_Sub.t2= "Some Value"
Set testStruct_Sub.t3= "Some Value"
Set testArray_Sub.test(0) = testStruct_Sub