[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlrpc-user
Subject:    Re: [Axiom] Cosuming SOAP WS which is neither 1.1 or 1.2
From:       Andreas Veithen <andreas.veithen () gmail ! com>
Date:       2017-05-20 12:58:06
Message-ID: CADx4_uUx9sYt-4VRuv7cZT7n_peYEA_7kdXfnp7o4KBbbBsGhw () mail ! gmail ! com
[Download RAW message or body]

SOAP is a well established and (at its core) simple standard, and Web
Service frameworks generally reach a high level of compliance. I don't
think it's a good idea to support various non compliances that only
matter in very special use cases that generally involve talking to
badly broken custom SOAP implementations. For those cases, a better
approach is to add a layer between your code and the broken SOAP
implementation that rewrites requests and/or responses to make them
compliant.

To consume a broken service, I see two options to do that:
1. Deploy a proxy service (potentially using some ESB product) that
does the transformation.
2. Add some form of interceptor to the service client. Since you
mention SAAJ and Axiom message factories, I guess you are using
Spring-WS. Obviously you can't use a ClientInterceptor, but you could
create a custom message factory that overrides the
createWebServiceMessage(InputStream) method to transform the message
and/or change its content type before it gets processed by Spring-WS
and SAAJ/Axiom.

Andreas

On Fri, May 19, 2017 at 11:02 PM, Subramanya Mujamadar
<smujamadar@gmail.com> wrote:
> Problem Description:
>
>
>   Need to consume a SOAP web service which is neither SOAP 1.1 nor SOAP 1.2
> complaint. When the response comes back from web server, SOAP message
> creation fails with the validation error from both SAAJ and AXIOM message
> factory.
>
>
> There are few problems with the web server as listed below
>
> It uses the 1.2 namespace "http://www.w3.org/2003/05/soap-envelope" but
> content-type in SOAP response is "text/xml; charset=ISO-8859-1".
> Vendor thinks they are SOAP 1.1 complaint but using wrong namespace.
> There are few more such validation errors.
>
> Workaround used:
>
> Updated the AXIOM to ignore the validations and treating the WS as SOAP 1.1
> and now able to consume the WS.
>
>
> Proposed feature for axiom:
>
> Would it be a good idea to implement a feature, which when turned on, AXIOM
> would ignore the validations like content type, namespace etc and use the
> defaults for SOAP 1.1 when the response is received ?
>
>
> Thanks,
> Subra
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic