Why won't Coldfusion Compoent WSDL file update with serviceaddress attribute in cfcomponent tag

Viewed 132

Using CF9. I have a CFC for which I need to change the WSDL file. I need to change the "http" in the section below (which appears as the very bottom of the WSDL file) to "https":

<wsdl:service name="ESS_wrapService">
    <wsdl:port name="ess.cfc" binding="impl:ess.cfcSoapBinding">
        <wsdlsoap:address location="http://.../ess.cfc"/>
    </wsdl:port>
</wsdl:service> 

So I have entered a value for the "serviceaddress" attribute in the cfcomponent tag of ESS.cfc, serviceaddress="https://.../ess.cfc". However, viewing the WSDL file in the browser, the "location" value is still showing with http, not https as expected.

In the past, this has worked for the WSDL files of other CFCs in that same "wsdl:soapaddress location="" element. The "location" value will change according to whatever has been entered as the serviceaddress attribute in the cfcomponent tag. But for this one, the value of location isn't changing in the WSDL file at all.

The only thing I can think of that would be causing this is if there's a static WSDL file being used for this cfc. But then, my understanding is that you have to use the "wsdlfile" attribute in the cfcomponent tag to use a static WSDL file, and that attribute isn't being used. Nor does ESS.cfc extend any other cfc.

Is there any other reason the location in the WSDL file wouldn't be responding the serviceaddress attribute?

2 Answers

You may be correct that the WSDL served is static. There are several ways to force ColdFusion to generate a new WSDL. Try each suggestion below in order.

  1. Change the code in your webservice by creating a new function or add new parameters. Then verify if those new changes show in the WSDL and see if the address location is updated.
  2. Delete files from {install directory}\cfusion\wwwroot\WEB-INF\cfc-skeletons\webservice.<class name>.class and webservice.<class name>BeanInfo.class
  3. Lastly delete all files that match cf<class name>*.class from {install directory}cfusion\wwwroot\WEB-INF\cfclasses

If you have access to CF Admin then you should be able to see which WSDLs have been generated by ColdFusion under:

Administrator -> Data & Services -> Web Services -> Active ColdFusion Web Services

...and then press the "refresh" button alongside the webservice in question in order to force the WSDL to update.

If you are using cfinvoke to call the webservice then you should be able to force the WSDL to update by using refreshwsdl=true in your calling code.

If neither of the above applies to you then I think we need to know more about how you are calling this webservice in order to generate the WSDL in the first place.

Related