*
The moose likes Web Services and the fly likes Web Services in Java Vs C# Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web Services in Java Vs C#" Watch "Web Services in Java Vs C#" New topic
Author

Web Services in Java Vs C#

Khushi Panesar
Greenhorn

Joined: May 26, 2004
Posts: 10
Hi there,

I have a project, to compare the performance of web services in Java and C#. I am totally new to web-services. But I have read some articles for both and now I have a basic idea about the concept of web services. But still I am very much confused about how should I go for my project..... where to start, Should I start building a web service application in C# and then similar one in Java. And then write clients in both and compare the time taken by them ......
ALso in Java, there r many tools and I just dont know , which one I should use. Recently, I am trying some examples on (Tomcat, Axis , Java 1.4)

Anyone, please guide me in this direction, I 'll be very gratefull.

Thanks!!
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
IMHO
** For Java
Apache+Tomcat+ApacheAxis+JUnit

For C#
**.NET framework, Asp.net or VS.NET+ some load tester tools.


Would be great if you can share the final result with us.

Cheers
Balaji
Khushi Panesar
Greenhorn

Joined: May 26, 2004
Posts: 10
Hi Balaji

Thank For Ur reply. Ofcourse, I have no Pblm in sharing results. So, from your reply, it seems that it is the right way to go.
Joe Miller
Greenhorn

Joined: Jul 13, 2000
Posts: 5
We implemented Apache Axis as our web services provider with clients implemented in C# .NET. It is awesome to see how well this works.

Axis automatically generates WSDL when you hit its URL. You provide Mircrosoft Visual Studio .NET with the URL by adding a web refrerence, it recognizes the WSDL and generates the method call.

Occassionally we've run into datatype issues, I think on arrays of strings. But it has really been amazing how few issues we've had to deal with.

--
Joe
Khushi Panesar
Greenhorn

Joined: May 26, 2004
Posts: 10
I am still working on the project. I am stuck at one place, I also used th esam emethod of converting C# into java using Axis's wsdl2Java tool. I am having the following error, while passing an object of a complex class. although it works fine for primitive types. Can anyone please help, thank you in advance.

Error is
.................................................................
- Exception:
org.xml.sax.SAXException: Invalid element in WebServiceInNET_ToTestService.ProgressReport - SeqID
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:246)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:369)
at org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:153)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:238)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:386)
at org.apache.axis.client.Call.invoke(Call.java:2437)
at org.apache.axis.client.Call.invoke(Call.java:2336)
at org.apache.axis.client.Call.invoke(Call.java:1793)
at WebServiceInNET_ToTestService.ToTestServiceSoapStub.getProgressReport(ToTestServiceSoapStub.java:458)
at WebServiceInNET_ToTestService.TempTester.main(TempTester.java:62)
Sameer Amte
Ranch Hand

Joined: Oct 22, 2002
Posts: 38
You might run into problems if you use Document Literal based SOAP i.e., using message-based SOAP instead of SOAP RPC. There was an issue of interoperability between the MS-SOAP and Java Web Services implementation for message-based SOAP.
Khushi Panesar
Greenhorn

Joined: May 26, 2004
Posts: 10
Thanks for the answer,
I am also having the following message


Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

Even after copying the foll. .jar files in the CLASSPATH viz.
mail.jar, mailapi.jar, imap, pop3, smtp.

What should I do, thanks !!
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by Khushi Panesar:
Thanks for the answer,
I am also having the following message


Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

Even after copying the foll. .jar files in the CLASSPATH viz.
mail.jar, mailapi.jar, imap, pop3, smtp.

What should I do, thanks !!


Please open a new thread and post this question again, that may get you more attention for help.
R Simon
Greenhorn

Joined: Jun 07, 2005
Posts: 1
Hi Joe,

I read your statement from the 10'th of May

"Occassionally we've run into datatype issues, I think on arrays of strings. But it has really been amazing how few issues we've had to deal with."

I have also the problem of sending a String array from a Java web service (Axis) to a C# Client. I get some strange Error that the XML document will have a failure... But if I access the same Service using a Java CLient, everything works fine.

I took the WSDL generated by Axis and created the C# Stub out of the WSDL using .NET's WSDL.exe.

Transfering an own type (any bean) as List e.g. Person[] is no problem. Transfering a single String is also no problem but transfering a string array (Java String[] / C# string[]) causes that error.

Did you found the reason and solved that Problem?

Thanks in advance

Ralf



Originally posted by Joe Miller:
We implemented Apache Axis as our web services provider with clients implemented in C# .NET. It is awesome to see how well this works.

Axis automatically generates WSDL when you hit its URL. You provide Mircrosoft Visual Studio .NET with the URL by adding a web refrerence, it recognizes the WSDL and generates the method call.

Occassionally we've run into datatype issues, I think on arrays of strings. But it has really been amazing how few issues we've had to deal with.

--
Joe
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
Just my .02
In almost (although I can't think of an exception) every case I've seen, the performance bottleneck in web apps has been in getting data from the database.
S Mithal
Greenhorn

Joined: Mar 17, 2005
Posts: 19
Do you have activation.jar in ur classpath ?
Tom George
Ranch Hand

Joined: Jan 28, 2004
Posts: 41
I've been writing java clients for some fairly complicated web services. Axis is the SOAP toolkit. It was quite bad while generating the java classes from the xml, and required quite long and frustrating tweaking at the generated java code. I tried using castor for the xml-java binding, but ran into a lot of serializer-deserializer issues.

The question I would like to post here is,
What is the best java based SOAP toolkit? Any proven and accepted alternative to axis ?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
You should post that question as a new Thread if you want people to look at it.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Services in Java Vs C#
 
Similar Threads
Multiple Web Services Running On one Axis Engine
Newbie question - the suitable "architecture" for this web services application.
New to WS
Java web services
A book you can recommend for me...??