Consuming Apache Axis Service In .NET Core

At one of the companies where I worked, I faced an interesting problem when consuming Apache Axis 1.4 service in .NET.

Apache Axis (Apache Extensible Interaction System) is an open-source web service framework. It is a Java and C++ implementation of SOAP service and lets you create and deploy apps.

The opposite side had provided authorization credentials and payload examples.

I added XML files generated by SOAP UI and began to test them. When testing, the UI required authorization credentials. I used BASIC authorization for that purpose. The interesting thing was that of all the auth methods I used, none of them worked. In the end, after some investigation, I realized that SOAP UI doesn’t provide any auth method to work with such types of services. SOAP has Apache Axis as a configuration part, but this also didn’t help to fix the issue. The solution was to send authorization headers. There was some information in documentation, like “you need additional effort to do it” and that is all.

Unfortunately, Googling also didn’t help much. But, after some investigation, I could send header data but got a fail response.

The next step was creating a soap header like this:

After correcting some details, the final header was:

After getting a success response from SOAP UI, it was time to create a project. Truth be told, this type of issue shouldn’t block your development. There is always a better way like mocking and continuing development.

After creating the .NET class library, I added it through web service reference. However, it also resisted generating the correct files. It should again block you, because when generating meta information using wsld, .NET “notifies” us about some old services. You can close and continue.

I created a service fabric to call and encapsulate the needed information:

The basic method used by the factory was “AddWssSecurityHeader," which helped to send credentials to the AXIS server.


  1. You need to send headers using the above mechanism when you work with SOAP Apache Axis.
  2. You can implement any form of header sending ( like AddWssSecurityHeader ) to send credentials to the AXIS server.

Similar Articles