Issues integrating AXIS Web Services with .NET

I have been integrating with ITIM 5.0 using the unsupported Web Services that use AXIS 1.3. All of the issues I have experienced were fixed in 1.4, and seeing as the product is over 5 years old, I don’t understand why they chose to stick with an older version. There are several issues I have found besides the well published one about how AXIS represents arrays by pointing to a centralized value store. One of those issues is namespacing. AXIS tends to generate WSDL with a namespace, but the return values do not have a namespace, .NET just fails to find the value during deserialization. It took me forever to find out why, but I solved it by manually removing the namespace requirement from the proxy code. The second issue I ran into was how the WSDL represents collections of items. The collection is named SomeCollection with the items underneath being named Item. When the service returns, the items are named the same as the collection (SomeCollection contains SomeCollection(s)). I had to manually rename all of these references in the proxy to be the same as the collection. These cost me countless hours. If I find anymore I will post them here. Obviously the solution is to upgrade to 1.4, but IBM won’t support it or turn over the source code to do so.

Advertisements

About Jeremy Mullinax-Hill

I am a lead/senior developer with more than 10 years experience in both the public and internal applications for Fortune 500s and mid-sized View all posts by Jeremy Mullinax-Hill

12 responses to “Issues integrating AXIS Web Services with .NET

  • marco zagolin

    Thank you very very much for your post:
    it really saved me ‘countless hours’.

    I was trying to call from .Net 3.5 an Axis 1.4 web service with this schema:

    and the request was OK, but with answer = null (genDocResponse=null).

    I did remove the namespace requirement from the proxy code:

    [return: System.Xml.Serialization.XmlElementAttribute(“genDocResponse”, Namespace=””)]

    and now I get the answer correctly.

    Regards,
    marco

    • Gerardo Abal

      Hi Marco,

      It seems like I’m having the same problem; but I don’t know where I have to remove the namespace requirement from the proxy code.

      Can you help me? Which file do I have to change?

      Regards,
      Gerardo

      • mz1954

        into the visual studio project look in:

        \Web References\your_ref\Reference.cs

        and serach for

        System.Xml.Serialization.XmlElementAttribute

        Ciao,
        marco

      • Gerardo Abal

        Hi Marco,

        In my Reference.cs doesnt’ appears “System.Xml.Serialization.XmlElementAttribute” but I have something like that: “System.Xml.Serialization.SoapTypeAttribute” so I tried to remove de Namespace from there without success.

        Otherwise, I always get the same exception when call a method that return a Array of objects:
        “The specified type was not recognized: name = ‘ArrayOf_tns1_[Class_Name]'””

        I’m using .NET 3.5 SP1 Visual Studio 2008 and calling a WebService developed by a third party on Apache Axis version: 1.4.

        Any help?

        Thanks in advance.

      • marco zagolin

        Hi Gerardo,
        I have the same level of visual studio and .Net. but I do not have any System.Xml.Serialization.SoapTypeAttribute
        string in the solution.
        More I am not working with Axis since April 2010 and cannot help you (sorry).

        Regards, marco

      • Gerardo Abal

        Thanks anyway Marco

  • Carlos

    Try to add this web service in VS2008

    https://nfe.sefaz.mt.gov.br/nfews/CadConsultaCadastro

    Just can’t…in firefox show the response…but in IE don’t work

    • Jeremy Mullinax-Hill

      The web server is throwing an error related to HTTPS/SSL. Here is the original error:

      Error 117 (net::ERR_BAD_SSL_CLIENT_AUTH_CERT): Unknown error.

      This can mean any number of things but probably means either the web server is not properly configured for HTTPS or is behind a firewall that is not passing the request through properly. I’ve seen this before with a mis-configured SSL accelerator. An SSL accelerator is a hardware device that handles all of the security ticket translation and sends the request back to the server as HTTP instead of HTTPS. If the server is expecting HTTPS it will fail. This is just one possibility.

      I get similar results no matter what browser I use. You need to contact the support person for that service and have them look into it.

  • Alex

    Hi Jeremy

    I got here by searching a solution to my problem, its using AXIS server with (from a provider) and a .NET client, ive been searching and trying and trying and trying but it doesnt want to work.

    Can help me and try to load it?, its a confidential URL, i can send it to you by email if you let me..

    Thx!!!

  • Ankit Shivankar

    hi can anyone help me
    I am new in windows phone and using java/Axis web services.
    My response properly coming to server side and server generating response properly but i am not able to see get response at my end its always show null object

    my code and used url is given below :

    am new in windows phone and trying to login using web-services by URL
    https://www.yes-pay.net/storemanager/services/StoreManagerService

    its Java/Axis web service

    my ClientConfig look like :

    and Button code is Like :

    private void BtnLogin_Click(object sender, RoutedEventArgs e)
    {
    StoreManagerServiceClient _storeMgr = new StoreManagerServiceClient(“StoreManagerService”);
    LoginRequest _lgnReq = new LoginRequest();
    _lgnReq.userName = txtUserName.Text;
    _lgnReq.password = txtpassword.Text;
    _lgnReq.role = “M”;
    _lgnReq.applicationType = “M”;
    _lgnReq.valid = true;

    _storeMgr.loginCompleted += new EventHandler(_storeMgr_loginCompleted);
    _storeMgr.loginAsync(_lgnReq);
    }

    void _storeMgr_loginCompleted(object sender, loginCompletedEventArgs e)
    {
    //throw new NotImplementedException();
    if(e.Result == null)
    MessageBox.Show(“Null Hai”);
    else
    {
    MessageBox.Show(e.Result.lastLoginDate.ToString());
    // this line giving me error
    }

    }

  • AlejandraBR

    Thank you! It worked like a charm! You can also view the response with SOAPUI to compare the namespace retrieved

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: