Webservice and _setProperty does not exist

Hi,

On a old Coldfusion 8 app, we were able to do something like that:

<cfset ws = createObject("webservice", "https://example.com/mywebservice.wsdl")>
<cfset ws._setProperty('javax.xml.rpc.service.endpoint.address',"http://localhost:1234")>

Lucee generate the error :

The method/operation [_setProperty] does not exist, only the following methods/operations are available: [example1, example2, example3, etc…].

The _setProperty was probably an undocumented way to change a property of a webservice and I believe It’s not working on recent versions of ACF too.

Is there any equivalent on Lucee to change the endpoint?

Thank you

what do you see when you dump out the ws object?

All the methods of the webservice. See attachment.

Here the dump from Coldfusion 8

Technically speaking, can we use Lucee to call a webservice whose definition file (wsdl) is located at one url and the endpoint at another?

If my understanding is correct, Lucee calls a wsdl file which defines the endpoint with :

<wsdl:service name="PaymentTransactionV2200">
		<wsdl:port name="PaymentTransactionPort" binding="tns:PaymentTransactionSoapBinding">
			<soap:address location="https://www.ctpaiement.com/ws2014/services/PaymentTransactionV2200"/>
		</wsdl:port>
</wsdl:service>

Lucee retrieves this data and it will be the endpoint of the webservice when I call a method.

My question is therefore: Can we with Lucee modify this endpoint programmatically without directly modifying the wsdl file?

does GetComponentMetaData(ws) or GetMetaData(ws) show anything else up?

GetMetaData return this

GetComponentMetaData return can’t cast Webservice to a string

you could play around in the java, it’s an extension

once you made your changes, just run ant in the root and it will produce a new .lex you can manually upload

Is it a different extension than what is installed by default in Lucee with the name “Axis 1 Webservices”?

I’m not sure what changes I am suppose to do with this extension. I am suppose to create a new extension from this one to add a method to be able to change the endpoint of a webservice?

yep that repo is the source for that extension

that’s the idea, if you want to try it

Thanks for the suggestion, but I’m not very familiar with developing in Java. Since I have only one webservice that works this way, I will test soon if I can modify the wsdl file to get what I want.

Finally I modify the wsdl on the fly to change to endpoint for what I want before passing it to createObject(“webservice”).

1 Like