Solved

How do I consume an AXIS2 Web Service in C#

Posted on 2009-05-08
3
1,413 Views
Last Modified: 2013-12-17
One of our departments created an AXIS2 Web Service in JAVA so we can retrieve data for our IVR's.  Unfortunately the current systems we have do not consume web services, so I'm required to develop some middleware that consumes the web service and then the IVR communicates with my middleware to get the data it needs.   I was able to add the web service as a reference to the application, but when I build, I get this error:

Error      7      Schema item 'complexType' named 'SchemaType' from namespace 'http://xmlbeans.apache.org/xsd'.       App_WebReferences/DolEx/      

I am not sure how to proceed and time is critical on getting this web service running.  

I'm running Visual Studio 2008 SP1, using C# and I added the web reference by right-clicking in the solution explorer and clicking "Add Web Reference"
0
Comment
Question by:creatingworlds
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
kitts earned 500 total points
ID: 24342571
Use the command line tool "wsdl" to generate the proxy class. Then post the exact error here. If you can send me the wsdl file I can take a look at it. I have faced the same issue and fixed it by modifying the wsdl. sometines, the wsdl generated by the AXIS is not compatible with the .Net wsdl generator.

Here is how to use the command line utility wsdl.exe
http://msdn.microsoft.com/en-us/library/7h3ystb6.aspx

Also please try the soapclient test tool to test the AXIS webservice.
http://www.soapclient.com/soaptest.html
0
 

Author Closing Comment

by:creatingworlds
ID: 31579397
Thanks for your help.  The above information helped me understand what the problem was, unfortunately the web service we are using is 3rd party, and I have no control over any of the information on that particular server / service.  Thanks again!
0
 
LVL 2

Expert Comment

by:kitts
ID: 24451987
I am just adding some more information here. Even if you dont have control over the AXIS web service/server, you could get the wsdl file by browsing their webservice in IE. Then save it to your local IIS root. Then use your local wsdl location to generate proxy class(using wsdl.exe). In this way you could modify the wsdl until all the errors are fixed and a proxy class is generated. Then only thing you need to do is to add the newly generated proxy class file in your project and update the "this.url" property inside the proxy class file to match the other AXIS webservice. Hope this helps.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will learn how to dynamically set the form action using jQuery.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now