ColdFusion 10 WebServices - Axis2 vs Axis1

July 25, 2012 / Milan Chandna 7 Comments

  ColdFusion | WebServices

I have seen many people getting confused between Axis-2 and Axis-1 WebServices in ColdFusion 10. ColdFusion 10 has added the support for Axis-2 WebService, earlier till ColdFusion 9 only Axis-1 WebServices were supported.

So to begin with what exactly is this Axis-2 and Axis-1.

Intro Axis:
Apache Axis (Axis-1) is an open sourceXML based Web service framework. ColdFusion internally uses Axis to publish and consume WebServices.  Apache Axis-2 is a complete re-design and re-write of the widely used Apache Axis but achieves same purpose. Axis-2 supports many new and flexible features over Axis-1 which means ColdFusion has implemented it not only to provide you latest features like Soap1.2 but also to give you more flexibility and power in your hand. You can always search for 'Axis-1 vs Axis2' if you want to study the advantages of Axis-2.


New in ColdFusion 10
  
 So let's see what ColdFusion 10 is offering with Axis-2

  1. SOAP 1.2 support (SOAP 1.1 was there with Axis-1) 
  2. WSDL2 support
  3. Wrapped styled WSDL support
  4. Easy switching from Axis-2 to Axis-1 and vice-versa.


Taking these points one by one.
  
  1. SOAP 1.2 support - SOAP is a standard protocol specification for exchanging messages and 1.2 is it's latest version. Being a ColdFusion user you should not worry about the implementation part but you should know that now you can consume much wider range of WebServices and also publish for a much wider userbase.
  2. WSDL2 support - WSDL is a standard XML format to expose your WebServices to outer World. Versoin 2 is the latest version of WSDL and now with ColdFusion 10 you can leverage it. Implementation is as expected way too simple. 
    The WebService WSDL links are like these : http://myip/mywebservice.cfc?wsdl

    The WebService WSDL2 links are like these : http://myip/mywebservice.cfc?wsdl2
    Now to consume these WebServices using WSDL2 format just update the WSDL link by appending a numeric '2' in the end and you will be done. No change required from publishing side.
  3. Wrapped styled WSDL - A user who has already used WebServices in any platform might be aware of terms like RPC style, Document-literal, Document-wrapped style WSDL. WSDL publishing formats could be in either of these widely used formats. Earlier RPC and Document-literal styles were supported but now Document-wrapped style is also supported.To use this a style attribute is provided at two level: Application level and Component level.
    1. Application level: 
      <cfset this.wssettings.style = "Wrapped | Document | RPC">
    2. Component level:
      <cfcomponent wsversion="2" style="Document | Wrapped | RPC" >
      For in-depth details about new attributes in ColdFusion 10 WebServices read this blog here.
     
  4.  Easy Switching - Axis-1 and Axis-2 has few compatibility issues because of their architecture which means if you are publishing in Axis-1, it has to be consumed by Axis-1 only and if a WebService is published in Axis-2 then it has to be consumed using Axis-2 only. ColdFusion is well aware that the users could face problem because of this behavior. So to it make very easy for users, ColdFusion 10 has taken few steps which are discussed in detail in this blog here.



    You may also like reading this -> http://www.adobe.com/devnet/coldfusion/articles/axis2-web-services.html 


7 comments so far ↓

  • 1 Robert // Feb 5, 2013 at 6:16 AM
    The worst thing about ColdFusion 10 web services so far, is that after migration from CF8, I'm no longer able to run the previously perfectly working web service other than from the CFIDE/services folder. And there's nothing that I can find about the possible cause.
  • 2 Heather // Feb 28, 2013 at 9:01 AM
    I agree with Robert, we have webservices that worked on previous version and there is no support available to find out why they don't work in CF10.
    Search for "Error creating web service. Please ensure that you have entered a correct Web Service name or URL."

    There are no answers! We removed enums from our .net services and that seemed to allow us to add them to the cfadmin.
  • 3 Milan // Feb 28, 2013 at 6:59 PM
    @Robert, @Heather - Have you guys tried running your service with wsversion=1. Though this is not a necessary step but just to check weather the webservices are working fine in CF10, you can try them with web services version 1 i.e: AXIS-1

    To use Axis-1, you can either switch wsversion from 2 to 1 in Admin WebServices page or you can also put this setting in your application.
    <cfset this.wssettings.version.publish = "1">
    <cfset this.wssettings.version.consume = "1">

    Please try this out.
  • 4 Sam // May 16, 2013 at 10:03 AM
    I'm having the same issues as rob and heather. Server migration from 8-10 (were govies and slow). Cf10 added more path info to my namespace and broke my java apps that of course the dev has since left.

    ie:
    Error, namespace mismatch require http://web_service._bla.blah.CHH found http://web_service._bla

    driving me nuts
  • 5 Dave Cordes // May 30, 2013 at 10:53 AM
    I just ran into the same exact issue as Robert, Heather and Sam and changing to Axis 1 solved the issue. Still though, this should probably be logged somewhere so Adobe can take a look at it.
  • 6 Jose // May 31, 2013 at 2:36 PM
    Hello! I've found an issue with https and Axis 2. After seaching online I found the bug reported to Adobe here. https://bugbase.adobe.com/index.cfm?event=bug&id=3344353
    Do you know if this issue was addressed in any of the updates?
    Thank you!
  • 7 Steve // Nov 28, 2014 at 1:01 PM
    We're upgrading from CF 9 to 11 and getting 100% failure trying to use Axis-1. We're saying wsversion=1 in CF Admin, cfcomponent, cfinvoke, cfobject. And we're registering the WS in CF Admin. But we get

    Cannot perform web service invocation [methodname]. ... faultCode: {http://xml.apache.org/axis/}HTTP ...
    faultString: (0)null ...
    {}:return code: 0 ...
    {http://xml.apache.org/axis/}HttpErrorCode:0 ...

    Billions of dollars per year, with a capital B, pass through this web service. We MUST get it working under CF 11. Any help would be appreciated.

Leave a Comment

Leave this field empty:

Blue Mango Theme Design By Mark Aplet

Super Powered by Mango Blog