Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I consume an AXIS2 Web Service in C#

Posted on 2009-05-08
3
Medium Priority
?
1,635 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

963 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