无法编组类型“ BusinessUserRegRqType”作为元素,因为它缺少@XmlRootElement批注]

时间:2018-12-27 09:49:45

标签: java soap wsdl

当我通过soap ui发送请求时,出现以下错误 “无法将类型为“ com.cit.vericash.schema.emp.businessuser.payment.businessuserreg.v1_0.BusinessUserRegRqType”的元素编组为元素,因为它缺少@XmlRootElement注释]”

这是xsd文件                                                                                                                                                                                                                                          

        <xs:element name="Email" >
        <xs:simpleType>
            <xs:annotation>
                <xs:documentation>Email must be valid to email address</xs:documentation>
            </xs:annotation>
            <xs:restriction base="xs:string">
            <xs:pattern value="^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$"/>
            </xs:restriction>
        </xs:simpleType>
        </xs:element>
        <xs:element name="BusinessEntityId" type="xs:long"/>
        <xs:element name="UserProfile" type="xs:string"/>
        <xs:element name="RiskProfile" type="xs:string"/>
        <xs:element name="UserType">
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="Wallet Owner User"/>
                    <xs:enumeration value="Business User"/>
                    <xs:enumeration value="Portal Manager"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:element>
        <xs:element name="BusinessAccount">
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="General"/>
                    <xs:enumeration value="Settlement"/>
                    <xs:enumeration value="Commission"/>
                    <xs:enumeration value="Balancing"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:element>
        <xs:element ref="common:ExtraData" minOccurs="0"/>
    </xs:sequence>
</xs:complexType>
<xs:element name="BusinessUserRegRs" type="BusinessUserRegRs_Type"/>
<xs:complexType name="BusinessUserRegRs_Type">
    <xs:sequence>
        <xs:element ref="common:HeaderRs"/>
        <xs:element ref="common:MessageStatus"/>
        <xs:element name="BusinessUserRegRqDetails" type="BusinessUserRegRqDetails_Type" nillable="false" minOccurs="1" maxOccurs="1"/>
        <xs:element ref="common:Signature"/>
    </xs:sequence>
</xs:complexType>

这是wsdl

                                                                                                                                                                                                                                                                                                                     

注意->我直接从wsdl生成了类。

0 个答案:

没有答案