Используйте JAVA WSDL в C# - PullRequest
       7

Используйте JAVA WSDL в C#

1 голос
/ 02 февраля 2020

У меня проблемы с использованием этой веб-службы в C#.

Мне нужно отправить запрос с двумя или более строками, а затем получить ответ со строкой массива. Я пытался использовать Service Reference и Web References, но не могу получить ответ. Я пробовал только с именем элемента = "consultarMovilesFlota"

Веб-сервис: http://gps.controlweb.com.ar: 8009 / wcAdmin / services / ServiceDataBykom? Wsdl Я изменил WSDL, чтобы добавить сюда

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://ws.wc.web.com.ar" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax21="http://response.bean.ws.wc.web.com.ar/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://ws.wc.web.com.ar">
<wsdl:documentation> Servicios de datos para empresas Bykom </wsdl:documentation>
<wsdl:types>
<xs:schema xmlns:ax22="http://response.bean.ws.wc.web.com.ar/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ws.wc.web.com.ar">
<xs:import namespace="http://response.bean.ws.wc.web.com.ar/xsd"/>
<xs:complexType name="Exception">
<xs:sequence>
<xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
<xs:element name="Exception">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Exception" nillable="true" type="ns:Exception"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="consultarMovilesFlota">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="user" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="pass" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="consultarMovilesFlotaResponse">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax22:DataResponseConsultaMovilesFlota"/>
<xs:complexType name="DataResponseConsultaMovilesFlota">
<xs:sequence>
<xs:element minOccurs="0" name="identificador" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="movilId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="patente" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<wsdl:message name="consultarMovilesFlotaRequest">
<wsdl:part name="parameters" element="ns:consultarMovilesFlota"/>
</wsdl:message>
<wsdl:message name="consultarMovilesFlotaResponse">
<wsdl:part name="parameters" element="ns:consultarMovilesFlotaResponse"/>
</wsdl:message>

<wsdl:portType name="ServiceDataBykomPortType">
<wsdl:operation name="consultarDistanciaRecorrida">
<wsdl:input message="ns:consultarDistanciaRecorridaRequest" wsaw:Action="urn:consultarDistanciaRecorrida"/>
<wsdl:output message="ns:consultarDistanciaRecorridaResponse" wsaw:Action="urn:consultarDistanciaRecorridaResponse"/>
<wsdl:fault message="ns:Exception" name="Exception" wsaw:Action="urn:consultarDistanciaRecorridaException"/>
</wsdl:operation>
<wsdl:operation name="consultarMovilesFlota">
<wsdl:input message="ns:consultarMovilesFlotaRequest" wsaw:Action="urn:consultarMovilesFlota"/>
<wsdl:output message="ns:consultarMovilesFlotaResponse" wsaw:Action="urn:consultarMovilesFlotaResponse"/>
<wsdl:fault message="ns:Exception" name="Exception" wsaw:Action="urn:consultarMovilesFlotaException"/>
</wsdl:operation>
<wsdl:binding name="ServiceDataBykomSoap11Binding" type="ns:ServiceDataBykomPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="consultarDistanciaRecorrida">
<soap:operation soapAction="urn:consultarDistanciaRecorrida" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="Exception">
<soap:fault use="literal" name="Exception"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="consultarMovilesFlota">
<soap:operation soapAction="urn:consultarMovilesFlota" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>

</wsdl:binding>
<wsdl:service name="ServiceDataBykom">
<wsdl:port name="ServiceDataBykomHttpSoap11Endpoint" binding="ns:ServiceDataBykomSoap11Binding">
<soap:address location="http://192.168.0.29:8009/wcAdmin/services/ServiceDataBykom.ServiceDataBykomHttpSoap11Endpoint/"/>
</wsdl:port>
<wsdl:port name="ServiceDataBykomHttpSoap12Endpoint" binding="ns:ServiceDataBykomSoap12Binding">
<soap12:address location="http://192.168.0.29:8009/wcAdmin/services/ServiceDataBykom.ServiceDataBykomHttpSoap12Endpoint/"/>
</wsdl:port>
<wsdl:port name="ServiceDataBykomHttpEndpoint" binding="ns:ServiceDataBykomHttpBinding">
<http:address location="http://192.168.0.29:8009/wcAdmin/services/ServiceDataBykom.ServiceDataBykomHttpEndpoint/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Спасибо!

...