谁能告诉我为什么我得到:
{"The specified type was not recognized: name='anyType', namespace='http://www.mywebsite.com/webservice/service.wsdl', at <response xmlns=''>."}
我得到的xml是:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.mywebsite.com/webservice/service.wsdl" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<SOAP-ENV:getCarsResponse>
<response SOAP-ENC:arrayType="ns1:anyType[2]" xsi:type="ns1:carlist">
<item xsi:type="SOAP-ENC:Struct">
<id xsi:type="xsd:string">1392</id>
<merk xsi:type="xsd:string">Citroen</merk>
<type xsi:type="xsd:string">C1</type>
<uitvoering xsi:type="xsd:string">1.0i Selection 5D</uitvoering>
<leaseprijs xsi:type="xsd:string">299,--</leaseprijs>
<looptijd xsi:type="xsd:string">18</looptijd>
<kilometrage xsi:type="xsd:string">25.000</kilometrage>
<thumbnail xsi:type="xsd:string">/i_upload/free/_th.gif</thumbnail>
</item>
<item xsi:type="SOAP-ENC:Struct">
<id xsi:type="xsd:string">1393</id>
<merk xsi:type="xsd:string">Citroen</merk>
<type xsi:type="xsd:string">C1</type>
<uitvoering xsi:type="xsd:string">1.0i Selection 5D</uitvoering>
<leaseprijs xsi:type="xsd:string">299,--</leaseprijs>
<looptijd xsi:type="xsd:string">18</looptijd>
<kilometrage xsi:type="xsd:string">25.000</kilometrage>
<thumbnail xsi:type="xsd:string">/i_upload/free/_th.gif</thumbnail>
</item>
</response>
</SOAP-ENV:getCarsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我以这种方式调用 SOAP 服务:
Service.service_portClient proxy = new Service.service_portClient();
proxy.getCars("Citroen", benzine);