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.
Christophe DENEUX made changes - Tue, 4 Aug 2015 - 18:03:56 +0200
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Major [ 3 ]
Assignee Nicolas Oddoux [ noddoux ] Christophe DENEUX [ cdeneux ]
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.
Christophe DENEUX made changes - Thu, 6 Aug 2015 - 10:31:23 +0200
Description Call for BC in provider mode to an external Web service with empty SoapAction set, is done with a default SOAPAction which is not supported by external application.

It should be better if output SOAPAction stay same than in WSDL.
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.
Christophe DENEUX made changes - Thu, 6 Aug 2015 - 10:31:43 +0200
Description 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.
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.
Christophe DENEUX made changes - Thu, 6 Aug 2015 - 10:32:21 +0200
Description 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.
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.
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.
Christophe DENEUX made changes - Thu, 6 Aug 2015 - 10:39:32 +0200
Status Open [ 10002 ] In Progress [ 10003 ]
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
Christophe DENEUX made changes - Thu, 6 Aug 2015 - 16:04:02 +0200
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 4.3.4 [ 10557 ]
Resolution Fixed [ 1 ]
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
Christophe DENEUX made changes - Thu, 6 Aug 2015 - 16:04:21 +0200
Status Resolved [ 10004 ] Open [ 10002 ]
Resolution Fixed [ 1 ]
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
Christophe DENEUX made changes - Thu, 3 Sep 2015 - 15:03:42 +0200
Status Open [ 10002 ] In Progress [ 10003 ]
Christophe DENEUX made changes - Thu, 3 Sep 2015 - 15:04:21 +0200
Fix Version/s 4.3.5 [ 10572 ]
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
Christophe DENEUX made changes - Mon, 7 Sep 2015 - 16:18:13 +0200
Status In Progress [ 10003 ] Resolved [ 10004 ]
Resolution Fixed [ 1 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
2m 39s
1
Christophe DENEUX
Tue, 4 Aug 2015 - 18:03:56 +0200
Open Open In Progress In Progress
1d 16h 35m
1
Christophe DENEUX
Thu, 6 Aug 2015 - 10:39:32 +0200
In Progress In Progress Resolved Resolved
5h 24m
1
Christophe DENEUX
Thu, 6 Aug 2015 - 16:04:02 +0200
Resolved Resolved Open Open
19s
1
Christophe DENEUX
Thu, 6 Aug 2015 - 16:04:21 +0200
Open Open In Progress In Progress
27d 22h 59m
1
Christophe DENEUX
Thu, 3 Sep 2015 - 15:03:42 +0200
In Progress In Progress Resolved Resolved
4d 1h 14m
1
Christophe DENEUX
Mon, 7 Sep 2015 - 16:18:13 +0200

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