Bug 779823 - (SOA-2184) Bug with SoapClient and optional parameters
Bug with SoapClient and optional parameters
Status: CLOSED WONTFIX
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.0.2
Unspecified Unspecified
high Severity high
: ---
: FUTURE
Assigned To: Kevin Conner
http://jira.jboss.org/jira/browse/SOA...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-27 09:48 EDT by david.boeren
Modified: 2012-02-07 10:17 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 10:17:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker SOA-2184 None Closed Bug with SoapClient and optional parameters 2012-02-07 10:14:21 EST

  None (edit)
Description david.boeren 2010-07-27 09:48:27 EDT
Help Desk Ticket Reference: https://access.redhat.com/issue-tracker/?module=issues&action=view&tid=1168653&gid=1354
project_key: SOA

There seems to be a bug in the private void injectParameters(Element element, Map params, String soapNs) function in the org.jboss.soa.esb.services.soapui.SoapUIClientService class.

The problem is that given a WSDL than takes many optional parameters (only a simple body supplied here):

  <soapenv:Body>
     <ser:getLogicalDate soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <getLogicalDateRequest xsi:type="dto:GetLogicalDateRequest" xmlns:dto="http://dto.telenor.dk">
           <businessCorrelationId xsi:type="xsd:string">?</businessCorrelationId>
           <businessCorrelationIdType xsi:type="xsd:string">?</businessCorrelationIdType>
           <systemId xsi:type="xsd:string">?</systemId>
        </getLogicalDateRequest>
     </ser:getLogicalDate>
  </soapenv:Body>

And an OGNL expression as follows:

getLogicalDateRequest.businessCorrelationId = "XXX"

That is not specifying the two other parameters the action will generate a request that looks like this:

  <soapenv:Body>
     <ser:getLogicalDate soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <getLogicalDateRequest xsi:type="dto:GetLogicalDateRequest" xmlns:dto="http://dto.telenor.dk">
           <businessCorrelationId xsi:type="xsd:string">XXX</businessCorrelationId>
           <businessCorrelationIdType xsi:type="xsd:string"></businessCorrelationIdType>
           <systemId xsi:type="xsd:string"></systemId>
        </getLogicalDateRequest>
     </ser:getLogicalDate>
  </soapenv:Body>

Which is incorrect as the code behind the web service will assume that businessCorrelationIdType and systemId are the empty String not null as they should be. A more correct request would be:

  <soapenv:Body>
     <ser:getLogicalDate soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <getLogicalDateRequest xsi:type="dto:GetLogicalDateRequest" xmlns:dto="http://dto.telenor.dk">
           <businessCorrelationId xsi:type="xsd:string">XXX</businessCorrelationId>
        </getLogicalDateRequest>
     </ser:getLogicalDate>
  </soapenv:Body>

This extends to complex Elements (ie. and element where nothing is set should be sent to the web service).
Comment 2 Kevin Conner 2010-07-27 09:53:06 EDT
Can you try this on ESB trunk and see if it still exists?

Please also supply a testcase.
Comment 4 Anne-Louise Tangring 2010-09-21 13:20:13 EDT
Kevin, assigning this to you, so that you can give David an answer.
Comment 5 Rick Wagner 2011-12-05 15:49:48 EST
Rick reviewing old JIRAs.  No indication it's fixed. (But couldn't find customer 'blixen'.)  Left Open.

Note You need to log in before you can comment on or make changes to this bug.