Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

167
Visualizações
External Java Axis service - deserialization issue

I'm encountering a very frustrating issue. All XML responses from the service are wrapped under the same element ("response"). For example, if I login, I will get a "response", not a "loginResponse". If I search something, I will also get "response", not "searchResponse".

All responses have this structure:

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <response method="methodName">
         <payload>
** other elements**
         </payload>
      </response>
   </S:Body>
</S:Envelope>

Why is this a problem? Well, all my proxy classes expect an element to deserialze, as such:

[System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:xxx-premium#xxxLogin", Use=System.Web.Services.Description.SoapBindingUse.Literal,ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]

[return: System.Xml.Serialization.XmlElementAttribute("response", Namespace="")]

**random method** 

The issue is that, if all element names have the same name, I will get an exception such as :

InvalidOperationException: The top XML element 'response' from namespace '' references distinct types

It makes sense, since this mechanism uses reflection. The XML response has no namespace as well.

For your info: I used the old wsdl.exe (web reference) since using Svcutil did not work.

Upon running assertion tests in SoapUI, I also received a "schema compliance: FAILED" message.

Obviously, changing the name in the proxy code will cause the response to be null.

Is there a solution to this or the only option is to contact the provider to change their nightmare of a service?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda