Hi Guys I am having a problem migrating our old S...
# lucee
c
Hi Guys I am having a problem migrating our old SOAP web services system from ACF11 to Lucee 5.3.9.166 la-api\webservices\services\ValidationService.cfc
ValidateBookingsResponse.ValidateBookingsResponseItems = [];
This is trying to reference: _la-api\webservices\soap\types\moderation\Type_ValidateBookingsResponse.cfc_
property webservices.soap.types.moderation.Type_ValidateBookingsResponseItem[] ValidateBookingsResponseItems;
It is causing an error to be thrown in the response message sent back by SOAP UI:
Copy code
<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>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>lucee.runtime.exp.NativeException: ; nested exception is: 
   lucee.runtime.exp.NativeException: no method setValidationerrors(class [Ljava.lang.Object;) found in class webservices.soap.types.moderation.Type_ValidateBookingsResponseItem</faultstring>
<detail>
<ns1:hostname xmlns:ns1="<http://xml.apache.org/axis/>">DV-CGG-LUC-W-02</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
That is preventing the correct response from being returned from the SOAP webservices, it maybe that Lucee is unable to interpret what something like this, means:
property webservices.soap.types.moderation.Type_ValidateBookingsResponseItem[] ValidateBookingsResponseItems;
It seems to be having trouble understanding what an array of components is. I know exactly what is wrong now, but it is a question of finding a solution. Essentially, if you remove this this line: la-api\webservices\services\ValidationService.cfc
ValidateBookingsResponse.ValidateBookingsResponseItems = [];
A correct response is returned, without any validation information, which of course, is not acceptable. The good news is that: 1. the objects are correctly populated with incoming XML and can accept multiple items [array] 2. object structure follows the correct WSDL schema 3. there are no errors thrown in the actual codebase I am not exactly sure where the response error is coming from?
Copy code
<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>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>lucee.runtime.exp.NativeException: ; nested exception is: 
   lucee.runtime.exp.NativeException: no method setValidationerrors(class [Ljava.lang.Object;) found in class webservices.soap.types.moderation.Type_ValidateBookingsResponseItem</faultstring>
<detail>
<ns1:hostname xmlns:ns1="<http://xml.apache.org/axis/>">DV-CGG-LUC-W-02</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
And here is the type: _la-api\webservices\soap\types\moderation\Type_ValidateBookingsResponse.cfc_
Copy code
component {
    property string BatchId;
    property boolean Success;
    property string ErrorDescription;
    property webservices.soap.types.moderation.Type_ValidateBookingsResponseItem[] ValidateBookingsResponseItems;
}
_la-api\webservices\soap\types\moderation\Type_ValidateBookingsResponseItem.cfc_
Copy code
component {
    property webservices.soap.types.moderation.Type_ValidationError[] ValidationErrors;
    property string salesorder;
    property string salesorderitem;
    property boolean valid;
}
j
I can't find my old Lucee ticket but I remember being unable to call a soap service when I migrated from ACF to Lucee way back. The LAS sentiment was that not many people were clamoring for soap service support anymore (and that was years ago now) so it wouldn't get attention. I had to write a Java wrapper around the web service. Hopefully that brick wall doesn't apply to you.