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/10 08:42:14 UTC

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

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


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.


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

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729747#action_12729747 ] 

Daniel Kulp commented on CXF-2336:
----------------------------------


Can you attach a testcase?    I just updated our SoapBindingSelectionTest.testMultipleSoapBindings test to make sure the return of a soap11 message is a soap11 message and the return of the soap12 is a soap 12 message and the test passes.   Thus, from our test case, it looks like this is working as you want.   I'd like to see your test case to see what may be different to figure out what is going on.


> 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
>
> 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.


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

Posted by "Mihir Shelat (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: cxf_ex.zip

Hi Daniel,

Thanks for promptly looking at this issue.
 
I have attached the source code (cxf_ex.zip) of simple Hello CXF example. Here is the summary of what I have done:
1. Endpoint is configured for SOAP Binding 1.2 in beans.xml file
2. Client.java with corresponding client-beans.xml is a SOAP 1.1 client
3. 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.


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

Posted by "Mihir Shelat (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2336.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.3
                   2.1.6
         Assignee: Daniel Kulp


There are a couple issues that I've now fixed.  However, there is an easy workaround that you could use for now.

If you add a SECOND jaxws:endpoint definition to the beans.xml that binds to the same address, but uses soap 1.2, it should "just work" for you.   That should allow it to respond properly with soap 1.1 responses.

While playing with your testcase, I did discover some other issues that are now fixed.   If a soap 1.2 request comes into a soap 1.1 endpoint, it was supposed to raise a VersionMismatch exception.   That is now fixed.    I also fixed your case of a soap 1.1 message coming into a soap 1.2 endpoint.   It now properly processes and a soap 1.1 response sent back.



> 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
>            Assignee: Daniel Kulp
>             Fix For: 2.1.6, 2.2.3
>
>         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.