advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 4.3/5 | Rate this item | 4 users have rated this item.
Email this articleEmail this article
 
Free Your C# Apps from .NET Platforms
Visual MainWin offers unprecedented platform flexibility, allowing you to develop applications in C# and deploy and run them on J2EE. Learn how to take advantage of this freedom by building a C# Web service that you can run on platforms besides .NET and IIS.  

advertisement
ainsoft's Visual MainWin is a revolutionary product that allows you to develop applications in C# and deploy and run them on J2EE application servers (for a detailed review, click here). Using this flexiblity, in conjunction with the simplicity of Web services development provided by Visual Studio.NET, you can finally create applications and Web services that run on platforms other than IIS and .NET.

Getting Started
If you don't have a copy of the application, you can register for a 30-day evaluation copy from Mainsoft. To understand and follow the rest of this article, you will need a copy of Visual Studio.NET 2003 and a copy of Visual MainWin installed and running. Note that when you are installing Visual MainWin, please select the 'Bundled Tomcat 5.0' application server. If you are more comfortable working in BEA Weblogic 8.1 or IBM Websphere 5, you can also use these with MainWin—simply select them when you install. Some of the URL references in the article will be different if you are using one of these products (for example: Weblogic runs on port 7001, so references in this article to port 8080 should be changed to 7001).

First, start your application server. The new project dialog box in Visual Studio doesn't automatically start it up, and it will throw an error if the application server isn't running. Do this by going to your Start Menu and selecting 'Start Tomcat' in the Visual MainWin program group. Once Tomcat has started you can launch Visual Studio.NET and you are ready to proceed.

In Visual Studio.NET, select the 'New Project' wizard, and you will immediately notice some changes to the dialog.

Figure 1. This is the New Project Dialog.

Figure 1 shows some of these changes. Two new project type folders have been added, giving projects in C# and VB for J2EE. Also, the location for Web applications is now localhost:8080 instead of the familiar localhost. This is because Tomcat runs on this port by default. If you had selected Weblogic 8.1 when installing Visual MainWin this would read 'localhost:7001.'

Select ASP.NET Web service, as in Figure 1, but change the name to DevxMainWin and click OK. The Visual Studio wizard creates the Web service for you.

If you have used Visual Studio to create Web services before, this will look immediately familiar. It's a 'Hello World' Web service with a single Web method, called HelloWorld(). The method will be commented out, so comment it back in so that your code will resemble that in Figure 2.

Figure 2. Visual Studio.NET creates a default Web Service.

Compile and run this application to see the first major difference with Visual MainWin. Instead of the familiar test harness, you get a simple screen that says:


Visual MainWin For J2EE: Test page is not yet supported. 
Add the string ?wsdl to the current URL to get the service 
description.
So, you can build and run the Web service, but you can't really tell if it does anything.




Editor's Note: Laurence Moroney is currently the Director of Product Evangelism at Mainsoft; however, he wrote this article for DevX before joining Mainsoft.


  Next Page: Building and Consuming a Simple Web Service
Page 1: IntroductionPage 3: Accessing Data with ADO.NET
Page 2: Building and Consuming a Simple Web Service 
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES