Web 服务返回类型

发布于 2024-08-14 04:27:04 字数 168 浏览 2 评论 0原文

Web 服务可能的返回类型有哪些?我正在使用 NetBeans 6.7.1 并使用 Java 工作。 我想创建一个返回 String[] 的 Web 服务...我创建了一个授权类,并且我想在已经创建的 Web 服务中添加一个函数。问题是它不允许我进行返回类型字符串的操作。

有什么解决办法,请帮忙! 谢谢!

what are the possible return types for a web service? I am using NetBeans 6.7.1 and working in Java.
I want to make a web service that would return String[]... I made a class of Authorization and I want to add a function in an already made web service. the problem is that it doesnt let me make an operation of return type string.

Any solution, please help!
Thanx!

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

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

发布评论

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

评论(1

躲猫猫 2024-08-21 04:27:04
    <xs:complexType name="VoucherType">
    <xs:complexContent>
        <xs:extension base="tns:requestType">
            <xs:sequence>
                <xs:element name="DateRedeemed" type="xs:date"  minOccurs="0"/>
                <xs:element name="SerialNumber" type="xs:string"    minOccurs="0"/>
                <xs:element name="Value" type="xs:boolean" minOccurs="0"/>
            </xs:sequence>
        </xs:extension>
    </xs:complexContent>
</xs:complexType>

这是一个简单的例子。

只是返回基本类型。
不确定返回字符串数组

    <xs:complexType name="VoucherType">
    <xs:complexContent>
        <xs:extension base="tns:requestType">
            <xs:sequence>
                <xs:element name="DateRedeemed" type="xs:date"  minOccurs="0"/>
                <xs:element name="SerialNumber" type="xs:string"    minOccurs="0"/>
                <xs:element name="Value" type="xs:boolean" minOccurs="0"/>
            </xs:sequence>
        </xs:extension>
    </xs:complexContent>
</xs:complexType>

This is a simple example.

Just returning the basic types.
Not sure about returning arrays of Strings

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