当我尝试创建XSD时,我从Eclipse中收到此错误:
无法将名称'p2p:Customer'解析为一个(n)'类型定义'组件。 sd-schema.xsd
这是标题:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p2p="http://clearxchange.com/release2_0" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" targetNamespace="http://clearxchange.com/release2_0" elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="xenc-schema.xsd"/>
在这里定义客户:
<xs:element name="Customer">
<xs:complexType>
<xs:sequence>
<xs:element name="organizationId" type="xs:string" />
<xs:element name="customerId" type="xs:string" />
<xs:element name="cifNumber" type="xs:string" />
<xs:element name="accountNumber" type="xs:string" />
<xs:element name="customerName" type="xs:string" />
<xs:element name="senderAddress"
type="p2p:InternationalAddressType3.8" />
<xs:element name="outOfNetworkPaymentDetails"
type="p2p:OutOfNetworkPaymentProfileDetails2.4" />
<xs:element name="debitNetworkPaymentDetails"
type="p2p:DebitNetworkPaymentProfileDetails3.6" />
</xs:sequence>
</xs:complexType>
</xs:element>
我在这里使用客户:
<xs:element name="MatchRecipientRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="customer" type="p2p:Customer" />
<xs:element name="id" type="xs:string" />
<xs:element name="token" type="p2p:TokenType" />
<xs:element name="tokenStatus" type="p2p:TokenStatusType" />
<!-- <xs:element name="matchRecipientResponse" type="p2p:MatchRecipientResponse38" /> -->
<xs:element name="paymentProfileType" type="p2p:PaymentProfileType" />
<xs:element name="personalPaymentProfile" type="p2p:PersonalPaymentProfileType3.8" />
<xs:element name="businessPaymentProfile" type="p2p:BusinessPaymentProfileType3.8" />
</xs:sequence>
</xs:complexType>
</xs:element>
我很困惑-有人知道我用这种方法做错了吗? 预先感谢。