0
我通過右鍵單擊「服務引用」並輸入包含wsdl的URL來在VS中創建服務引用。simpleType的代理不生成
它的工作類型,但屬性AddRobinsonEntryRequest.subscriberEmails創建爲字符串。它應該是一個EmailAddress類型的數組。
我使用XMLSpy驗證了wsdl,並聲明它是有效的。
如果我在VS中打開相同的文件,我得到的錯誤:類型http://backclick.de/rpc/soap/schemas/types/types:ListOfEmailAddress未定義。
上線9
這裏的wsdl:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch0="http://backclick.de/rpc/soap/schemas/messages" xmlns:sch1="http://backclick.de/rpc/soap/schemas/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://backclick.de/rpc/soap/schemas/types" targetNamespace="http://backclick.de/rpc/soap/schemas/types">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://backclick.de/rpc/soap/schemas/messages" xmlns:types="http://backclick.de/rpc/soap/schemas/types" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://backclick.de/rpc/soap/schemas/messages">
<import namespace="http://backclick.de/rpc/soap/schemas/types"/>
<element name="AddRobinsonEntryRequest">
<complexType>
<all>
<element name="subscriberEmails" type="types:ListOfEmailAddress"/>
</all>
</complexType>
</element>
<element name="AddRobinsonEntryResponse">
<complexType>
<sequence>
<element name="success" type="boolean"/>
</sequence>
</complexType>
</element>
</schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://backclick.de/rpc/soap/schemas/types">
<simpleType name="ListOfEmailAddress">
<list itemType="tns:EmailAddress"/>
</simpleType>
<simpleType name="EmailAddress">
<restriction base="string">
<pattern value="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]([a-z0-9-]*[a-z0-9])?"/>
</restriction>
</simpleType>
</schema>
</wsdl:types>
<wsdl:message name="AddRobinsonEntryResponse">
<wsdl:part name="AddRobinsonEntryResponse" element="sch0:AddRobinsonEntryResponse"/>
</wsdl:message>
<wsdl:message name="AddRobinsonEntryRequest">
<wsdl:part name="AddRobinsonEntryRequest" element="sch0:AddRobinsonEntryRequest"/>
</wsdl:message>
<wsdl:portType name="BackclickService">
<wsdl:operation name="AddRobinsonEntry">
<wsdl:input name="AddRobinsonEntryRequest" message="sch1:AddRobinsonEntryRequest"/>
<wsdl:output name="AddRobinsonEntryResponse" message="sch1:AddRobinsonEntryResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BackclickServiceSoap11" type="tns:BackclickService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="AddRobinsonEntry">
<soap:operation soapAction=""/>
<wsdl:input name="AddRobinsonEntryRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="AddRobinsonEntryResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BackclickServiceService">
<wsdl:port name="BackclickServiceSoap11" binding="tns:BackclickServiceSoap11">
<soap:address location="http://asp.backclick.de:80/bc/rpc/soap"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
這是導致proxyclass:
public partial class AddRobinsonEntryRequest : object, System.ComponentModel.INotifyPropertyChanged {
private string subscriberEmailsField;
/// <remarks/>
public string subscriberEmails {
get {
return this.subscriberEmailsField;
}
set {
this.subscriberEmailsField = value;
this.RaisePropertyChanged("subscriberEmails");
}
}
我有什麼做的就是subscriberEmailsField生成一個數組?