darlan_machado 3 de jul. de 2019
diegoarantes 3 de jul. de 2019
Ele fica no formato Object
o XML de retorno do WebService é este:
<? xml version = "1.0" ?>
< soap : Envelope xmlns : soap = "http://www.w3.org/2003/05/soap-envelope" xmlns : xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns : xsd = "http://www.w3.org/2001/XMLSchema" >
< soap : Body >
< consultaResponse xmlns = "http://tempuri.org/" >
< consultaResult >
< INFO - XML xmlns = "" >
< SOLICITACAO >
< TIPO > PLACA </ TIPO >
< DADO > BMW0171 </ DADO >
< NUMERO_RESPOSTA > YY0703E47423 </ NUMERO_RESPOSTA >
< TEMPO > 0.182121 </ TEMPO >
< MENSAGEM > 1 </ MENSAGEM >
< HORARIO > 2019 -07-03 15 : 47 : 42 </ HORARIO >
</ SOLICITACAO >
< HISTORICO_PESQUISA >
< CONTROLE > 1 </ CONTROLE >
< QUANTIDADE_PESQUISA_ULT_MESES > 8 </ QUANTIDADE_PESQUISA_ULT_MESES >
< HISTORICO > 02 / 07 / 2019 ; 02 / 07 / 2019 ; 02 / 07 / 2019 ; 02 / 07 / 2019 ; 02 / 07 / 2019 ; 02 / 07 / 2019 ; 02 / 07 / 2019 ; 02 / 07 / 2019 </ HISTORICO >
</ HISTORICO_PESQUISA >
< RESPOSTA >
< PLACA > BMW0171 </ PLACA >
< CHASSI > WBAA25A4RRAA00859 </ CHASSI >
< ANO > 1994 / 1994 </ ANO >
< MARCA_MODELO > 325 IA SC4 REGINO </ MARCA_MODELO >
< SITUACAO_CHASSI > NORMAL </ SITUACAO_CHASSI >
< ANOFABRICACAO > 1994 </ ANOFABRICACAO >
< ANOMODELO > 1994 </ ANOMODELO >
< COMBUSTIVEL > GASOLINA </ COMBUSTIVEL >
< COR > PRETA </ COR >
< RENAVAM > [ telefone removido ] </ RENAVAM >
< SEGMENTO > AUTO </ SEGMENTO >
< SUB_SEGMENTO > AU - SEDAN GRANDE </ SUB_SEGMENTO >
< NR_MOTOR > [ telefone removido ] </ NR_MOTOR >
< NR_CAMBIO />
< NR_CARROCERIA />
< NR_EIXOTRASEIRO />
< QUAN_EIXOS />
< SCORE >
< SCORE > 1 </ SCORE >
< SCORE_PONTUACAO > C </ SCORE_PONTUACAO >
< ACEITA_VEICULO > 95 </ ACEITA_VEICULO >
< PERCENTUAL_SOBRE_REF > 100 </ PERCENTUAL_SOBRE_REF >
< EXIGENCIA_VISTORIA_ESPECIAL > MENOR PROBABILIDADE </ EXIGENCIA_VISTORIA_ESPECIAL >
</ SCORE >
< CHECKLIST >
< FRENTE />
< TRASEIRA />
< TETO />
< INTERIOR />
< LATERAL_ESQUERDA />
< LATERAL_DIREITA />
< RODAS />
< QUEIMADO />
< AIRBAG />
< OBS />
</ CHECKLIST >
< LEILAO >
< LEILOEIRO > N / I </ LEILOEIRO >
< COMITENTE />
< LOTE />
< DATA_LEILAO > 30 / 07 / 2003 </ DATA_LEILAO >
< COND_VEICULO > INTEIRO </ COND_VEICULO >
< SIT_CHASSI />
< COND_MOTOR />
< COND_CAMBIO />
< COND_MECANICA />
< OBS />
</ LEILAO >
< LEILAO >
< LEILOEIRO > N / I </ LEILOEIRO >
< COMITENTE />
< LOTE > 0022 A </ LOTE >
< DATA_LEILAO > 30 / 07 / 2003 </ DATA_LEILAO >
< COND_VEICULO />
< SIT_CHASSI />
< COND_MOTOR />
< COND_CAMBIO />
< COND_MECANICA />
< OBS />
</ LEILAO >
</ RESPOSTA >
</ INFO - XML >
</ consultaResult >
</ consultaResponse >
</ soap : Body >
</ soap : Envelope >
darlan_machado 3 de jul. de 2019
E o que está errado? Se você conferir ele com os XSDs, qual o resultado? Valida ou não?
diegoarantes 3 de jul. de 2019
Não tenho os XSDs, o que eu verifiquei é que os campos que são retornados no XML não estão no WSDL.
darlan_machado 3 de jul. de 2019
Mas os campos não precisam estar. O web service definition language pode referenciar XSDs (xml schema definitions) que irão especificar como as classes devem ser estruturadas.
diegoarantes 3 de jul. de 2019
Este é o WSDL, parece não ter XSDs Referenciados:
<wsdl:types>
<s:schema elementFormDefault= "qualified" targetNamespace= "http://tempuri.org/" >
<s:element name= "consulta" >
<s:complexType>
<s:sequence>
<s:element minOccurs= "0" maxOccurs= "1" name= "dado" type= "s:string" />
<s:element minOccurs= "0" maxOccurs= "1" name= "tipo" type= "s:string" />
<s:element minOccurs= "0" maxOccurs= "1" name= "chave" type= "s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name= "consultaResponse" >
<s:complexType>
<s:sequence>
<s:element minOccurs= "0" maxOccurs= "1" name= "consultaResult" >
<s:complexType mixed= "true" >
<s:sequence>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name= "consultaSoapIn" >
<wsdl:part name= "parameters" element= "tns:consulta" />
</wsdl:message>
<wsdl:message name= "consultaSoapOut" >
<wsdl:part name= "parameters" element= "tns:consultaResponse" />
</wsdl:message>
<wsdl:portType name= "L0934Soap" >
<wsdl:operation name= "consulta" >
<wsdl:input message= "tns:consultaSoapIn" />
<wsdl:output message= "tns:consultaSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name= "L0934Soap" type= "tns:L0934Soap" >
<soap:binding transport= "http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name= "consulta" >
<soap:operation soapAction= "http://tempuri.org/consulta" style= "document" />
<wsdl:input>
<soap:body use= "literal" />
</wsdl:input>
<wsdl:output>
<soap:body use= "literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name= "L0934Soap12" type= "tns:L0934Soap" >
<soap12:binding transport= "http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name= "consulta" >
<soap12:operation soapAction= "http://tempuri.org/consulta" style= "document" />
<wsdl:input>
<soap12:body use= "literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use= "literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name= "L0934" >
<wsdl:port name= "L0934Soap" binding= "tns:L0934Soap" >
<soap:address location= "http://datacast.info/WSCNVL35/L0934.asmx" />
</wsdl:port>
<wsdl:port name= "L0934Soap12" binding= "tns:L0934Soap12" >
<soap12:address location= "http://datacast.info/WSCNVL35/L0934.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
adriano_si 3 de jul. de 2019
A grande questão é QUAL O FORMATO ESPERADO.
Fiz um cliente com o serviço e obviamente ele me retorna null no content porque não tenho o dado, o tipo e a chave pra consultar. Mas no seu caso deveria funcionar porque eu acredito que você tem essas informações.
O que você não está recebendo de retorno que deveria estar?
diegoarantes 3 de jul. de 2019
Então com os dados preenchidos era para retornar o objeto conforme o XML acima.
darlan_machado 4 de jul. de 2019
Acessa isso https://datacast.info/WSCNVL35/L0934.asmx?op=consulta
Eu achei essa parte acessando https://datacast.info/WSCNVL35/L0934.asmx?WSDL?xsd=0 e clicando no link “consulta” que aparece no canto superior esquerdo da tela que se abre.