1

我正在尝试使用在 Apache Axis 上生成的 Web 服务:

http://webservicepilot.tecdoc.net/pegasus-2-0/wsdl/TecdocToCatWL

VehicleManufacturers3Request req = new VehicleManufacturers3Request()
    {
        provider = 289,
        lang = "fr",
        carType ="1",
        evalFavor = false,
        favouredList = 1,
        countryGroupFlag = false,
        countriesCarSelection = "fr"
    };

getVehicleManufacturers3RequestBody requestBody = new getVehicleManufacturers3RequestBody(req);
getVehicleManufacturers3Request request = new getVehicleManufacturers3Request(requestBody);

TecdocToCat cat = new TecdocToCatClient();           

getVehicleManufacturers3Response response = cat.getVehicleManufacturers3(request);

使用提琴手,我看到我得到了回应:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope 
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
        xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <getVehicleManufacturers3Response 
            xmlns="http://webservicepilot.tecdoc.net/pegasus-2-0/services/TecdocToCatWL">
        <getVehicleManufacturers3Return xmlns="">
            <data>
                <array>
                <array>
                    <manuId>609</manuId>
                    <manuName>AC</manuName>
                </array>
                <empty>false</empty>
            </data>
            <status>200</status>
            <statusText xsi:nil="true"/>
        </getVehicleManufacturers3Return>
    </getVehicleManufacturers3Response>
</soapenv:Body></soapenv:Envelope>

但是response.Body是空的。

有人可以说可能的问题是什么吗?

4

1 回答 1

0

问题是我使用了错误版本的网络服务。

于 2013-01-10T08:58:56.150 回答