We're updating the issue view to help you get more done. 

SOAP WebServices Type Mapping issue #2

Description

WSDL which requires mapping to an element syntax, i.e:
<part name="EchoHeader" element="tns:requestBean"/>

Does not properly serialize. It appears Lucee follows some sort of default serializer instead. Structs get sent as structs (nsi:map type, with item/key/value wrappers), and Beans get sent as beans.

ACF properly sends the data - based on ACF's implementation it looks like it runs WSDL2JAVA which creates all the beans, with appropriate serializers, and then it uses those to send the data. Lucee appears to map its own types. (in this case, improperly) So it's not an issue with Axis 1 per se, so much as Lucee's use of the library.

Test case, with a minimalist WSDL, and XMLValidate calls available at:
https://github.com/goochjj/Lucee/tree/LDEV0933

See index.cfm in tests/tickets/LDEV0933/ for a graphical representation:
Bean:

1 2 3 4 5 6 7 8 9 10 <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <EchoRequest xmlns="http://jaxws.goochfriend.org/endpoint/"> <requestBean> <applicationid xsi:type="xsd:string">testAppID</applicationid> </requestBean> </EchoRequest> </soapenv:Body> </soapenv:Envelope>

Map:

1 2 3 4 5 6 7 8 9 10 11 12 13 <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <EchoRequest xmlns="http://jaxws.goochfriend.org/endpoint/"> <requestBean xsi:type="ns1:Map" xmlns:ns1="http://xml.apache.org/xml-soap"> <item xmlns=""> <key xsi:type="xsd:string">applicationid</key> <value xsi:type="xsd:string">TestAppID</value> </item> </requestBean> </EchoRequest> </soapenv:Body> </soapenv:Envelope>

No PR generated - because it would entail merging a failing testcase into Lucee proper

1 2 3 4 5 6 7 8 9 10 [java] [script] test.tickets.LDEV0933 [java] [script] (0 tests passed in 1056 ms) [java] [script] Suites/Specs: 1/1 [java] [script] Pass: 0 [java] [script] Failures: 1 [java] [script] Errors: 0 [java] [script] Skipped: 0 [java] [script] runTest:Struct provided to SOAP request did not pass validation when sent to service [java] [script] [Error] :1:647: cvc-elt.4.2: Cannot resolve 'ns1:Map' to a type definition for element 'requestBean'. [java] [script] [Error] :1:662: cvc-complex-type.2.4.a: Invalid content was found starting with element 'item'. One of '{"http://jaxws.goochfriend.org/endpoint/":applicationid}' is expected.

Environment

Reproducable using the SmaterStats API when using the QueryExecute comand to get the results back

Status

Assignee

Michael Offner

Reporter

Gurpreet Randhawa

Labels

Sprint

None

Fix versions

Affects versions

4.5.2.018
5.0.0.252
5.2.5.13
5.2.6.24

Priority

Blocker