Consuming webservice over SSL

Hi All -

I’m still trying to get my installation of Lucee to consume a web service over SSL.
Working with a non-standard installation of Lucee running inside Tomcat/Apache.
After trying about 30 different suggested solutions, we’re able to:

  • do a generic CFHTTP request over SSL without getting: Error constructing implementation

ie <cfhttp result="result" method="GET" charset="utf-8" url="'></cfhttp>
(this works)

  • view the WSDL web service end point over HTTPS in a browser.
    I can see the entire WSDL
    (this works)

I was unable to do either one before updting keystore and alias.

Now the issue is:

When trying to consume the web service over HTTPS like so:

<cfinvoke webservice="" method="FFS_WTF"  returnvariable="user_roles_arr">
<cfinvokeargument name="PID" value="#arguments.pass_pid#" />

It throws an error:
page Fatal Error: URI= Line=1:
Line 1, Column 1>: XML-20108: (Fatal Error) Start of root element expected.**

With the same code base, and an almost idenitical Apache/Tomcat/CF9 installation - this code works fine.
The XML returned from the WSDL is identical to the version that CF9 spits out.
(all this code works just fine on ACF)

One thing I did notice in the tomcat logs was an error:

lucee.runtime.exp.NativeException: java.nio.BufferOverflowException
at lucee.loader.servlet.CFMLServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(

Is it possible that the WSDL is too long to be handled by Lucee?

You should probably make sure you have

  1. the unlimited strength JCE installed, if using the Oracle JVM

  2. The bouncycastle JCE provider, prioritized in your file

Bouncy Castle shouldn’t be required for normal HTTPS communications. It’s more likely that for some reason your JVM isn’t exposing the built-in JCE implementations.

Without some idea of how your custom install is done we aren’t going to be of much specific help.

If you’re getting “ Error constructing implementation”, you probably have a JCE problem. (JVM, not Lucee)

1 Like

Thanks for the response Joe. I’ll check the things you mention.

I’m no longer getting that message. Now its a different error
(Fatal Error) Start of root element expected, but the content of the WSDL seems valid.

In Case it helps debug or as a work around for others. I used this manual soap request style to get my webservices when using lucee. I have the most control and … it works. You will want to snoop around your schema for the proper header “Value”. The one in the example is “” …

<GetUserQuotas xmlns="">

So basically you gotta replace “GetUserQuotas” with your function name.

Also, replace “AuthUserName” and the others with the proper parameter names according to your function’s required attributes.

My working example looks like this:

<cfsavecontent variable="soapBody"><cfoutput>
 <?xml version="1.0" encoding="utf-8"?>
     <soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
         <GetUserQuotas xmlns="">
 url="" method="post" result="httpResponse">
     Most SOAP action require some sort of SOAP Action header
     to be used.
     When posting the SOAP body, I use the CFHTTPParam type of
     XML. This does two things: it posts the XML as a the BODY
     and sets the mime-type to be XML.
     NOTE: Be sure to Trim() your XML since XML data cannot be
     parsed with leading whitespace.
     value="#trim( soapBody )#"


 When the HTTP response comes back, our SOAP response will be
 in the FileContent atribute. SOAP always returns valid XML,
 even if there was an error (assuming the error was NOT in the
 communication, but rather in the data).
<cfif find( "200", httpResponse.statusCode )>
 <!--- Parse the XML SOAP response. --->
 <cfdump var="#httpResponse.fileContent#"/>
 <cfset soapResponse = xmlParse( httpResponse.fileContent ) />

1 Like