Petals BC SOAP

SOAPAction filled in provider mode, even if SOAPAction not set in WSDL

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 4.3.0
  • Fix Version/s: 4.3.4, 4.3.5
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    If the SOAPAction is missing or defined to an emty value into the WSDL of an external service provider, the Petals BC SOAP generates a SOAPAction set to a value as 'urn:<operation>', instead of an empty value. And so, the request is rejected by the external web-service because the SOAPAction has not the expected value.

    It should be better if output SOAPAction stay same than in WSDL.

    Show
    If the SOAPAction is missing or defined to an emty value into the WSDL of an external service provider, the Petals BC SOAP generates a SOAPAction set to a value as 'urn:<operation>', instead of an empty value. And so, the request is rejected by the external web-service because the SOAPAction has not the expected value. It should be better if output SOAPAction stay same than in WSDL.
  • Environment:
    RHEL 6.4

Activity

Hide
Christophe DENEUX added a comment - Tue, 4 Aug 2015 - 18:03:56 +0200

We are facing to AXIS2-4264.

Show
Christophe DENEUX added a comment - Tue, 4 Aug 2015 - 18:03:56 +0200 We are facing to AXIS2-4264.
Hide
Christophe DENEUX added a comment - Tue, 4 Aug 2015 - 18:08:22 +0200

As Petals BC Soap 4.3.x is based on Axis2 1.5.2, upgrading Axis2 version to 1.6 or upper is hazardous. As mentioned here we can easily disable SOAPAction.

So, for a maintenance release, we will introduce a new parameter at SU provide level to disable SOAPAction. And we will upgrade the Axis2 version in dev main line.

Show
Christophe DENEUX added a comment - Tue, 4 Aug 2015 - 18:08:22 +0200 As Petals BC Soap 4.3.x is based on Axis2 1.5.2, upgrading Axis2 version to 1.6 or upper is hazardous. As mentioned here we can easily disable SOAPAction. So, for a maintenance release, we will introduce a new parameter at SU provide level to disable SOAPAction. And we will upgrade the Axis2 version in dev main line.
Hide
Christophe DENEUX added a comment - Thu, 6 Aug 2015 - 10:39:29 +0200

Caution, specific processing should be applied according to the SOAP version:

  • SOAP 1.1, the HTTP header 'SOAPAction' is required. So, it will be set to an empty value if defined in WSDL as: <soap11:operation soapAction=""/> or if it is missing in WSDL,
  • SOAP 1.2, the HTTP header 'SOAPAction' is optional. So, it will be absent if defined in WSDL as: <soap12:operation soapAction=""/> or if it is missing in WSDL.
Show
Christophe DENEUX added a comment - Thu, 6 Aug 2015 - 10:39:29 +0200 Caution, specific processing should be applied according to the SOAP version:
  • SOAP 1.1, the HTTP header 'SOAPAction' is required. So, it will be set to an empty value if defined in WSDL as: <soap11:operation soapAction=""/> or if it is missing in WSDL,
  • SOAP 1.2, the HTTP header 'SOAPAction' is optional. So, it will be absent if defined in WSDL as: <soap12:operation soapAction=""/> or if it is missing in WSDL.
Hide
Christophe DENEUX added a comment - Thu, 6 Aug 2015 - 16:04:01 +0200 - edited

AXIS2-4264 has been worked around in branch Petals ESB 4.3.x introducing a new parameter 'disable-soapaction' as mentioned below.

See svn#37549, svn#37550 and svn#37551

Show
Christophe DENEUX added a comment - Thu, 6 Aug 2015 - 16:04:01 +0200 - edited AXIS2-4264 has been worked around in branch Petals ESB 4.3.x introducing a new parameter 'disable-soapaction' as mentioned below. See svn#37549, svn#37550 and svn#37551
Hide
Christophe DENEUX added a comment - Thu, 6 Aug 2015 - 16:04:21 +0200

Reopened to be merged in trunk

Show
Christophe DENEUX added a comment - Thu, 6 Aug 2015 - 16:04:21 +0200 Reopened to be merged in trunk
Hide
Victor NOËL added a comment - Fri, 21 Aug 2015 - 12:50:43 +0200

There is something I don't understand:
If having no soapAction in the WSDL with Soap1.1 is forbidden, why do the integration tests have such cases? If it is missing in the WSDL, the WSDL is wrong, and that's all, no? Or is the idea to anyway "help" the user by allowing no soapAction in SOAP1.1 and transforming these to empty ones?

Show
Victor NOËL added a comment - Fri, 21 Aug 2015 - 12:50:43 +0200 There is something I don't understand: If having no soapAction in the WSDL with Soap1.1 is forbidden, why do the integration tests have such cases? If it is missing in the WSDL, the WSDL is wrong, and that's all, no? Or is the idea to anyway "help" the user by allowing no soapAction in SOAP1.1 and transforming these to empty ones?
Hide
Fabrice Scellos added a comment - Fri, 21 Aug 2015 - 14:29:32 +0200

Hi Victor,
soap action is not missing but it's value is blank.
WSDL is valid regarding SOAPUI or CXF Codegen.

WSDL's come from commercial software.

Regards.

Show
Fabrice Scellos added a comment - Fri, 21 Aug 2015 - 14:29:32 +0200 Hi Victor, soap action is not missing but it's value is blank. WSDL is valid regarding SOAPUI or CXF Codegen. WSDL's come from commercial software. Regards.
Hide
Victor NOËL added a comment - Fri, 21 Aug 2015 - 14:56:31 +0200

Hi,

This was more of a general question regarding how to cleanly fix the problem in our code and tests
I think that for your use case everything should be ok now with the released workaround.
The next version will be cleaner normally (for Petals 5), and if we can backport this clean solution to Petals 4.3 we will do it

Show
Victor NOËL added a comment - Fri, 21 Aug 2015 - 14:56:31 +0200 Hi, This was more of a general question regarding how to cleanly fix the problem in our code and tests I think that for your use case everything should be ok now with the released workaround. The next version will be cleaner normally (for Petals 5), and if we can backport this clean solution to Petals 4.3 we will do it
Hide
Victor NOËL added a comment - Fri, 21 Aug 2015 - 14:58:32 +0200

I fixed PETALSBCSOAP-153 (for trunk/Petals 5) that upgrades Axis to 1.6.3 but it seems their bug (AXIS2-4264) is not completely fixed w.r.t. to our problem here.

I committed a different workaround than the one you committed, that doesn't need to change the SUs or anything, we should investigate if it would work also with Petals 4.3.

Show
Victor NOËL added a comment - Fri, 21 Aug 2015 - 14:58:32 +0200 I fixed PETALSBCSOAP-153 (for trunk/Petals 5) that upgrades Axis to 1.6.3 but it seems their bug (AXIS2-4264) is not completely fixed w.r.t. to our problem here. I committed a different workaround than the one you committed, that doesn't need to change the SUs or anything, we should investigate if it would work also with Petals 4.3.
Hide
Victor NOËL added a comment - Fri, 21 Aug 2015 - 15:31:30 +0200 - edited

Ok, so after some tests, it seems that the following patch is valid for Petals 4.3 SOAP BC to fix the current issue (i.e. without having to modify the JBI description of the SU):

 
--- petals-bc-soap/src/main/java/org/ow2/petals/binding/soap/listener/outgoing/SOAPCaller.java	(révision 37557)
+++ petals-bc-soap/src/main/java/org/ow2/petals/binding/soap/listener/outgoing/SOAPCaller.java	(copie de travail)
@@ -514,6 +514,13 @@
                     final BindingOperation bo = b.getBindingOperation(exchange.getOperationName());
                     if (bo != null) {
                         soapAction = bo.getSoapAction();
+                        // See PETALSBCSOAP-151
+                        if (soapAction == null || soapAction.isEmpty()) {
+                            // it must contain the characters for an empty string, if not
+                            // org.apache.axis2.transport.http.CommonsHTTPTransportSender.findSOAPAction(MessageContext)
+                            // won't be happy with it!
+                            soapAction = "\"\"";
+                        }

We may release a new version (4.3.5 ?) for Petals 4.3 after discussing it between us.

Show
Victor NOËL added a comment - Fri, 21 Aug 2015 - 15:31:30 +0200 - edited Ok, so after some tests, it seems that the following patch is valid for Petals 4.3 SOAP BC to fix the current issue (i.e. without having to modify the JBI description of the SU):
 
--- petals-bc-soap/src/main/java/org/ow2/petals/binding/soap/listener/outgoing/SOAPCaller.java	(révision 37557)
+++ petals-bc-soap/src/main/java/org/ow2/petals/binding/soap/listener/outgoing/SOAPCaller.java	(copie de travail)
@@ -514,6 +514,13 @@
                     final BindingOperation bo = b.getBindingOperation(exchange.getOperationName());
                     if (bo != null) {
                         soapAction = bo.getSoapAction();
+                        // See PETALSBCSOAP-151
+                        if (soapAction == null || soapAction.isEmpty()) {
+                            // it must contain the characters for an empty string, if not
+                            // org.apache.axis2.transport.http.CommonsHTTPTransportSender.findSOAPAction(MessageContext)
+                            // won't be happy with it!
+                            soapAction = "\"\"";
+                        }
We may release a new version (4.3.5 ?) for Petals 4.3 after discussing it between us.
Hide
Fabrice Scellos added a comment - Fri, 21 Aug 2015 - 15:50:45 +0200

Ok thank you.
Don't hesitate to inform us what is the recommanded component we have to use with our 4.3 version of petals (for now, the christophe's one is OK (and he gave us a fix quickly )

Regards.
F.scellos

Show
Fabrice Scellos added a comment - Fri, 21 Aug 2015 - 15:50:45 +0200 Ok thank you. Don't hesitate to inform us what is the recommanded component we have to use with our 4.3 version of petals (for now, the christophe's one is OK (and he gave us a fix quickly ) Regards. F.scellos
Hide
Christophe DENEUX added a comment - Thu, 3 Sep 2015 - 15:03:07 +0200

Ok, Victor you can integrate your better fix in branch Petals 4.3. We will release a new version of the Petals BC SOAP

Show
Christophe DENEUX added a comment - Thu, 3 Sep 2015 - 15:03:07 +0200 Ok, Victor you can integrate your better fix in branch Petals 4.3. We will release a new version of the Petals BC SOAP
Hide
Christophe DENEUX added a comment - Mon, 7 Sep 2015 - 16:18:13 +0200

Merged in trunk

Show
Christophe DENEUX added a comment - Mon, 7 Sep 2015 - 16:18:13 +0200 Merged in trunk

People

Dates

  • Created:
    Tue, 4 Aug 2015 - 18:01:17 +0200
    Updated:
    Mon, 7 Sep 2015 - 16:18:13 +0200
    Resolved:
    Mon, 7 Sep 2015 - 16:18:12 +0200