Would it work if instead of making .Net RPC-style, you make Java's doc/lit/wrapped style?


Steve Ichniowski wrote:

I got it working, will post Java code if others desire to see it.

I think the main thing was to make the .NET service an RPC-style
service.

-----Original Message-----
From: Steve Ichniowski Sent: Thursday, December 16, 2004 1:59 PM
To: [EMAIL PROTECTED]
Subject: RE: Java Client accessing a .NET Web Service


Given this very simple .NET web service in C#, can someone get a Java
client using Apache Axis to access it?  I am trying at this moment to do
so.

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Services.Description;

namespace WebService1
{
        /// <summary>
        /// This is a practice Web Service.
        /// </summary>
        
[SoapRpcService(RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
        public class SumService : System.Web.Services.WebService
        {
                public SumService()
                {
                        //CODEGEN: This call is required by the ASP.NET
Web Services Designer
                        InitializeComponent();
                }

#region Component Designer generated code

//Required by the Web Services Designer private IContainer components = null;

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}


                /// <summary>
                /// Clean up any resources being used.
                /// </summary>
                protected override void Dispose( bool disposing )
                {
                        if(disposing && components != null)
                        {
                                components.Dispose();
                        }
                        base.Dispose(disposing);                
                }
                
                #endregion
                [WebMethod]
                public int Add(int a, int b)
                {
                        return a + b;
                }

        }
}

-----Original Message-----
From: Simon Fell [mailto:[EMAIL PROTECTED] Sent: Thursday, December 16, 2004 1:52 PM
To: [EMAIL PROTECTED]
Subject: RE: Java Client accessing a .NET Web Service


I don't know where the urban ledgend that .NET can't handle arrays of
complex types that contain complex types comes from, but its not true. I
have a service that returns arrays of complex types containing arrays of
complex types and it works fine with a .NET client.

Cheers
Simon




-----Original Message-----
From: ANDREW MICONE [mailto:[EMAIL PROTECTED] Sent: Thursday, December 16, 2004 9:36 AM
To: [EMAIL PROTECTED]
Subject: Re: Java Client accessing a .NET Web Service


Microsoft publishes a book called ".NET and J2EE Interoperability," but I don't know how much good it is going to do you. Here's the things I found out on my own in my last project:

1) You have to run Axis 1.1 because .NET doesn't support certain SOAP encodings generated by Axis (strings for example). Microsoft claims that the SOAP encodings it doesn't support are optional and not part of WS-I. As far as the Axis dev's have said, they will have a solution to this problem in Axis by the release of Axis 1.2.

2) Understand that .NET cannot serialize and deserialize all the types of objects that are supported by WSDL's, including multidimensional arrays and arrays of complex types not consisting of XSD primitives.

3) If your exchange partner running .NET uses WSE, it will be of great help in enhancing interoperability.

4) Tweaks to your tomcat configuration may be necessary. You may need to set disableProxyCaching="false" on valves that involve your authenticator classes and set maxKeepAliveRequests to 1 to compensate for Microsoft's HTTP implementation of the HTTP 100 continue message that is used by both Explorer and .NET. Without these tweaks, some services can fail to interoperate when crossing firewalls that do stateful packet inspection and non-Microsoft proxy servers (e.g. squid).

4) If you are in early cycle of your project, design the WSDL first, and try to keep it very simple to maximize interoperability.

5) I found this paper from IBM's software group to be absolutely invaluable:

www.dsg.cs.tcd.ie/~dowlingj/ teaching/ds/tutorials/AxisVeryAdvanced.pdf
(Yes, I think there's a space in that URL).


Good luck,

-- Andy



[EMAIL PROTECTED] 12/15/04 08:07PM >>>


Anyone know of some up-to-date books or references on how

to access a .NET web service from a Java client that uses Apache Axis as it's SOAP engine?



O'Reilly's Java and SOAP (2002) has a small section on it, but it is very small

and the book says Axis was very new at the time and that it could change considerably.



Tomcat and Apaches Axis and SOAP are changing so fast, the O'Reilly books

just can't keep up.


______________________________________________________________________
Campbell & Company, Inc.: The information in this e-mail may contain privileged/confidential information. If you are not the intended recipient, you must not read, use, copy or disseminate the information or take any action in reliance thereupon. If you have received this e-mail in error, please notify Campbell & Company, Inc. immediately by e-mail or telephone and delete the e-mail and any attachments from any computer. The information in this e-mail does not constitute an offer to sell or the solicitation of an offer to buy any securities in any jurisdiction or for the benefit of any person. ______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________







______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________


______________________________________________________________________
Campbell & Company, Inc.: The information in this e-mail may contain
privileged/confidential information. If you are not the intended
recipient, you must not read, use, copy or disseminate the information
or take any action in reliance thereupon. If you have received this
e-mail in error, please notify Campbell & Company, Inc. immediately by
e-mail or telephone and delete the e-mail and any attachments from any
computer. The information in this e-mail does not constitute an offer
to sell or the solicitation of an offer to buy any securities in any
jurisdiction or for the benefit of any person. ______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________


______________________________________________________________________
Campbell & Company, Inc.: The information in this e-mail may contain privileged/confidential information. If you are not the intended recipient, you must not read, use, copy or disseminate the information or take any action in reliance thereupon. If you have received this e-mail in error, please notify Campbell & Company, Inc. immediately by e-mail or telephone and delete the e-mail and any attachments from any computer. The information in this e-mail does not constitute an offer to sell or the solicitation of an offer to buy any securities in any jurisdiction or for the benefit of any person. ______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________





Reply via email to