You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Mihir Shelat (JIRA)" <ji...@apache.org> on 2009/07/13 08:49:14 UTC

[jira] Updated: (CXF-2336) SOAP Binding (i.e. SOAP Version) of out going message should be same as incoming message

     [ https://issues.apache.org/jira/browse/CXF-2336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mihir Shelat updated CXF-2336:
------------------------------

    Attachment: winmail.dat

Hi Daniel,



Thanks for promptly looking at this issue.



I have attached the source code of simple Hello CXF example. Here is the summary of what I have done:

?         Endpoint is configured for SOAP Binding 1.2 in beans.xml file

?         Client.java with corresponding client-beans.xml is a SOAP 1.1 client

?         Client2.java with corresponding client-beans2.xml is a SOAP 1.2 client



If I run Client.java (i.e. SOAP 1.1), here is the HTTP Request and Response I see using HTTP Analyzer:



Request:

POST /hellocxf/HelloWorld HTTP/1.1

Content-Type: text/xml; charset=UTF-8

SOAPAction: ""

Accept: */*

User-Agent: Apache CXF 2.2.2

Cache-Control: no-cache

Pragma: no-cache

Host: localhost:8080

Connection: keep-alive

Content-Length: 180



<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:sayHi xmlns:ns2="http://spring.demo/"><arg0>Joe</arg0></ns2:sayHi></soap:Body></soap:Envelope>





Response:

HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Content-Type: application/soap+xml;charset=UTF-8

Content-Length: 207

Date: Mon, 13 Jul 2009 06:37:31 GMT



<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><ns2:sayHiResponse xmlns:ns2="http://spring.demo/"><return>Hello... Joe</return></ns2:sayHiResponse></soap:Body></soap:Envelope>



If you notice, as Endpoint is configured for SOAP 1.2 binding, it returns the response having both Content-Type & Namespace of SOAP 1.2 where as the Client is expecting response in SOAP 1.1.



Let me know if this is the expected behavior OR an issue.



To resolve, for time being I implemented couple out interceptors which depending on the input message (i.e. SOAP Binding) modify the Content-type & Namespace.



Thanks,

Mihir







> SOAP Binding (i.e. SOAP Version) of out going message should be same as incoming message
> ----------------------------------------------------------------------------------------
>
>                 Key: CXF-2336
>                 URL: https://issues.apache.org/jira/browse/CXF-2336
>             Project: CXF
>          Issue Type: Improvement
>          Components: Soap Binding
>            Reporter: Mihir Shelat
>         Attachments: cxf_ex.zip, winmail.dat
>
>
> Dear Sir,
> Currently I am evaluating various Webservice Frameworks such as Axis2, CXF and Spring WS.
> In CXF the default SOAP Binding (i.e. SOAPVersion) is SOAP 1.1. So if you don't set any binding in your webservice, by default the SOAP version of outgoing message is 1.1.
> CXF allows configuring the SOAP binding of outgoing message either using Annotations OR Spring Configuration. No matter whatever is the SOAP Binding of incoming message, CXF always uses the binding specified at server side for out going message.
> Like wise AXIS2, for outgoing messages, CXF should use the same SOAP Binding as that of incoming message instead of the one configured in the server. This allows webservices to be more interoperable and SOAP Binding agnostic.
> Let me know if there is any way by which I can configure CXF to use the same SOAP Binding as that of incoming message. If it is not possible, can we incorporate this improvement in the next release?
> One of the criteria for webservice framework selection is simultaneous support of SOAP 1.1 and SOAP1.2 bindings.
> Thanks,
> Mihir

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.