Question

We are moving from CF9 to CF11. One thing that has changed is that CF11 now publishes and consumes axis-2 web services, while CF9 worked with axis-1 web services.

So, we have a bunch of axis-1 web services that we would rather not go back and re-factor. We have seen that there are settings you can add to code to specify the version, but would like to avoid that if possible. There is a setting in the CF11 administrator on the web services screen that is a toggle between axis-2 and axis-1 (with a default to axis-2).

What does that toggle do?

We were hoping that it could be used to set the server to publish and consume axis-1 web services by default, but a quick test of that theory did not seem to work.

Without re-factoring are there other options?

Thanks

Was it helpful?

Solution

You can specify the axis version at multiple levels.

See Axis-2 and Axis-1 compatibility issues

Basically besides at the server level you specified but it sounds like you want a more granular control.

You can do this at the application level in the application.cfc:

<cfset this.wssettings.version.consume = "2">

Or even on a call by call basis such as this:

ws = createObject("webservice"
                   , "http://localhost:8500/mycfc.cfc?wsdl"
                   , {wsversion="2"}
                 )

or this

<cfinvoke webservice = "http://localhost:8500/mycfc.cfc?wsdl" 
        method="echo" 
        wsversion="2" 
        returnVariable="foo" >

I'm not sure but you may have to use refreshWSDL to ensure that the proxy classes are regenerated for Axis-2 (If so this would be a one time thing so you would do it like this when testing and then remove the refreshWSDL)

<cfinvoke webservice = "http://localhost:8500/mycfc.cfc?wsdl" 
          method="echo" 
          wsversion="2" 
          returnVariable="foo" 
          refreshWSDL="yes">
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top