在 MATLAB 中使用 Apache CXF
MATLAB 中的函数 createClassFromWsdl 有一些重大限制,就像不支持属性一样。在我看来,Apache CXF 生成 动态客户端 的能力可能是一种以相对用户友好的方式访问更广泛的 SOAP 端点的方法。只需将适当的 JAR 文件添加到 MATLAB 类路径中,您就可以从 MATLAB 命令行以交互方式创建强大的客户端。有人试过这个吗?有人可以举个例子吗?
The function createClassFromWsdl in MATLAB has some significant limitations, like not supporting attributes. It seems to me that the ability of Apache CXF to generate dynamic clients could be a way to access a wider variety of SOAP endpoints in a relatively user-friendly way. Simply adding the appropriate JAR files to your MATLAB classpath would allow you to interactively create robust clients from the MATLAB command line. Has anyone tried this? Would someone please provide an example?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
createclassfromwsdl
的功能确实有限。因此,我尝试了两个来自 Matlab 的用于 SOAP 通信的 java 包。1)安装 Axis2-1.5.4
2)
./wsdl2java.sh - uri http://webservice:port.. -o outfolder -uw
3)然后我必须修复生成存根以避免肥皂通信期间出现一些错误(您可能不需要它):
- 将
SOAP12Constants
的出现替换为SOAP11Constants
4)使用 ant 复制输出文件夹中的源
5)然后在 Matlab 中我使用以下初始化过程(假设 package.jar 是在 matlabpath 中,包位于folder_foo)
createclassfromwsdl
has really limited functionality. Therefore I tried two java packages for SOAP communication from Matlab.1)Install Axis2-1.5.4
2)
./wsdl2java.sh -uri http://webservice:port.. -o outfolder -uw
3) Then I had to fix the generated stubs in order to avoid some errors during soap communication (you might not need it):
- replace occurence of
SOAP12Constants
bySOAP11Constants
4)copile the sources in output folder using ant
5)Then in Matlab I use the following initialization procedure (assuming that the package.jar is in matlabpath and package is located in folder_foo)