Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda