我看到有的文章说String[]可以直接被支持,有的又说需要把它作为复杂类型,现在我有一个方法其中一个参数是String[],用wtp生成的webservice和客户端无法正确调用,我应该怎么做?

解决方案 »

  1.   

    需要用复杂数据类型来表示:
    <complexType name="ArrayOf_tns1_PABContactData">
        <complexContent>
            <restriction base="soapenc:Array">
                <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:PABContactData[]" />
            </restriction>
        </complexContent>
    </complexType>使用:<complexType name="PABUserData">
        <sequence>
            <element name="contacts" nillable="true" type="impl:ArrayOf_tns1_PABContactData" />
            <element name="lastUpdateNum" type="xsd:int" />
        </sequence>
    </complexType>
      

  2.   

    ?wsdl   吗?解释一下什么意思可以吗?