2

I apologize in advance for asking a vague question, but I do hope somebody can point me in the right direction...

In production we use ACF 2016, and the code we use to authenticate members against our member database API works fine. It's a SOAP-based service that returns XML. The authentication code uses the Java security methods so helpfully explained by Leigh. We were on CF 9 at the time we set this system up and it's worked fine since then.

But this same code fails on Lucee 4.5.5.006, which is what I use for dev (also using ColdBox). Lucee uses Java 1.8.0_25 and says it is compatible with CF 10, so I'd think that my code would work. But it errors with:

Type: org.xml.sax.SAXException <br>
Messages: White spaces are required between publicId and systemId.

Researching that error message leads to all sorts of interesting reading, but I am not sure where to get started, since the same code does work with ACF.

I am using Lucee since that is what installed with ColdBox, but it is not a requirement. I have not tried updating either Lucee or Java, nor have I tried using the encrypt functionality added in more recent version of CF. I was hoping it would be something straightforward in Lucee settings or something, so that I would not have to completely rework the entire thing, just to get it to work on my dev box. :-(

But at any rate, if anybody has any tips, I would really appreciate being pointed in the right direction! Many thanks in advance!

daltec
  • 447
  • 1
  • 5
  • 15
  • Looking into the error it seems to be an issue with the XML that is generated. What happens on Lucee when you try to return something other than XML, e.g. JSON or plain text? – David Faber Apr 29 '18 at 12:13
  • Thanks, David! I am not sure I can "return" anything other than what the webservice gives me, which is XML. However, the error is generated when I use xmlParse(cfhttp.fileContent). So I think you are right, there may be something about the XML that Lucee does not like, but I sure can't guess what. I get what looks like valid XML in SoapUI, and as I mentioned, the same code in ACF works fine. – daltec Apr 29 '18 at 22:45
  • Might be worth it to do a dump of cfhttp.fileContent, see if you can fix what's wrong in the XML before doing xmlParse. – David Faber Apr 30 '18 at 00:35
  • Thanks David -- the W3C validator noted that it was well-formed XML but was not 100% valid. I added "" which made it 100% valid, but I still get the same error on Lucee. Thank you for your help -- I will keep researching the issue later on. Have a good evening! – daltec Apr 30 '18 at 01:55
  • 1
    Maybe this would be helpful? I wonder if lucee is looking for a DOCTYPE declaration that isn't there https://stackoverflow.com/questions/6514158/white-spaces-are-required-between-publicid-and-systemid – David Faber Apr 30 '18 at 11:07
  • If not, can you post a sanitized example of the xml? – SOS Apr 30 '18 at 15:53
  • 1
    Is the goal to migrate this software to Lucee and ColdBox? If your only using Lucee for that's the default of *CommandBox* (not ColdBox) you can tell CommandBox to start a Adobe server with `start cfengine=adobe@2016`. – Twillen May 01 '18 at 13:54
  • Hi Twillen, no I was using Lucee on dev because, as you mentioned, it's the default and I am not smart enough to switch it on my own haha! We use Coldbox and ACF on production, btw. Luckily there are smarter people like you who are able to help me. Thank you for your comment -- CommandBox downloaded ACF 2016, the server spun up and my authentication code is back to working fine. Many, many thanks, Twillen! I appreciate it! – daltec May 01 '18 at 20:39
  • Thank you David and Ageax, I appreciate the help! My guess is that yes, Lucee was not satisfied with the xml somewhere down the line. But switching the server to ACF has solved my immediate problem -- I guess my dev environment should replicate production anyways, but Lucee seems like a very nice product and I will try to run it on other sites. If Luceee is balking because the xml is *wrong* then that is a good thing to know! :-) – daltec May 01 '18 at 20:41

0 Answers0