使用来自 ColdFusion 的 WSDL 上的 wscompile 创建 BlackBerry 方法存根

发布于 2024-08-02 08:27:01 字数 431 浏览 1 评论 0原文

我一直在开发一个使用 ColdFusion 7 中的 Web 服务的 BlackBerry 应用程序。Java ME SDK 和 Java Wireless Toolkit 都要求生成的 WSDL 为文档/文字类型。

幸运的是,我对 Web 服务开发有所了解,因此我尝试在 cfcomponent 标记中设置“style=”document”。这生成了文档/文字样式 WSDL,但现在 wscompile 在多个地方生成以下错误:

发现未知的简单类型:javax.xml.soap.SOAPElement 发现未知的简单类型:java.util.Calendar

有什么想法为什么会发生这种情况吗?

JWSDP 工具确实可以正确解析 WSDL,但存根使用 J2ME 平台中不可用的命名空间。我本以为 ColdFusion WSDL 会更轻松地与 Java 系列中的其他产品配合使用。

I have been working on a BlackBerry application that consumes web services from ColdFusion 7. The Java ME SDK and the Java Wireless Toolkit both require that the generated WSDL be of the document/literal type.

Fortunately, I have input on the web service development so I tried setting 'style="document"' in the cfcomponent tag. This generated a document/literal style WSDL but now wscompile generates the following errors in several places:

Found unknown simple type: javax.xml.soap.SOAPElement
Found unknown simple type: java.util.Calendar

Any ideas why this is happening?

The WSDL does get parsed correctly by the JWSDP tool but the stubs use namespaces that are not available in the J2ME platform. I would have thought ColdFusion WSDL would work more easily with other products in the Java family.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苏大泽ㄣ 2024-08-09 08:27:01

如果服务变化不大(因此 WSDL 变化不大),您可以将 WSDL 保存为文本文件并根据需要进行修改。我的建议(再次假设服务或多或少已完成)是从 cfcomponent 标记中取出样式声明并生成 WSDL,然后将其保存为纯文本文件并进行修改BlackBerry 应用程序需要使用它。

If the service doesn't change much (so the WSDL won't change much) you can save the WSDL as a text file and modify it however you like. My suggestion -- again, assuming the service is more or less finalized -- would be to take the style declaration out of the cfcomponent tag and generate the WSDL, then save it as a plain text file and modify it as necessary to be consumed by the BlackBerry application.

只为一人 2024-08-09 08:27:01

事实证明,该问题与导致问题的方法参数的数据类型和返回类型有关。 WSDL 是有效的,并且 J2SE 的 wscompile 版本能够正确解析它。但由于移动平台上API功能的减少,某些数据类型无法使用J2ME版本的wscompile进行解析。

我确实需要在 ColdFusion Web 服务上的 cfcomponent 标记中保留“style=”document“”声明,因为 J2ME 的存根生成器只会解析文档/文字类型 WSDL 文件。

http://developers.sun.com/mobility/midp/articles/webservices/< /a> 提供 JAX-RPC for Java ME 支持的数据类型的参考。

It turns out that the issue was related to the data types of method parameters and return types that was causing the issue. The WSDL was valid and the version of wscompile for J2SE was able to parse it correctly. But due to the reduced API capabilities on the mobile platform, certain data types cannot be parsed with the J2ME version of wscompile.

I did need to keep the 'style="document"' declaration in the cfcomponent tag on the ColdFusion web service since the stub generator for J2ME will only parse document/literal type WSDL files.

http://developers.sun.com/mobility/midp/articles/webservices/ provides a reference for the data types supported in JAX-RPC for Java ME.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文