Hi,
I had the same problem. Its because the C# client doesn't like the way
Apache SOAP formats its responses (see below for the request and responses).
Its because .net expects the result of the method invocation to be inside
<Return></Return> tags.
But, i think all this interop issue is solved in the .NET Beta 2...try using
the beta 2 instead.
.NET Request :
-------------------------------------------------------------------------
<?xml version="1.0"?>
<soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/
xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<soap:Body>
<recieveSOAPMsg xmlns="urn:SmartTools:SOAPWebService">
<XMLString>Hello Joseph</XMLString>
</recieveSOAPMsg>
</soap:Body>
</soap:Envelope>
--------------------------------------------------------------------------
What .NET expects :
-------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/
xmlns:tns=http://soapinterop.org/
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:recieveSOAPMsgResponse>
<Return></Return>
</tns:recieveSOAPMsgResponse>
</soap:Body>
</soap:Envelope>
-------------------------------------------------------------------------
What Apache SOAP sends back :
-------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:recieveSOAPMsgResponse xmlns:ns1="urn:SmartTools:SOAPWebService"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</ns1:recieveSOAPMsgResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
-------------------------------------------------------------------------
----- Original Message -----
From: "HariNam Singh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 6:34 PM
Subject: RE: C# and Apache SOAP interoperability...
> Allen,
>
> that's good to know. I tried another of my web services, which returns a
> string. It's the same error message. Any other ideas, or sources, where to
> look for information? Somehow, I find the msdn documentation very hard.
> Even, when there are source code samples, they contain no documentation at
> all. Thus making it hard to understand their conecept behind it. I'd
rather
> understand, what I am doing, then just copying'n'pasting code and changing
> things until it works.
>
>
> HariNam
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 02, 2001 9:20 AM
> To: [EMAIL PROTECTED]
> Subject: RE: C# and Apache SOAP interoperability...
>
>
> Microsoft clients can not deal with 'void' returns, the method you are
> calling must have a return value of something other than type void. Is
this
> the problem?
>
> Allen
>
> -----Original Message-----
> From: HariNam Singh [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 02, 2001 10:52 AM
> To: '[EMAIL PROTECTED]'
> Subject: C# and Apache SOAP interoperability...
>
>
> ... or just someone not knowing C# well enough ;-)
>
> Here is the story. I downloaded Apache SOAP 2.2 and wrote Java web service
> for it. The Java client for it works fine as well. As a proof of concept,
I
> wrote a C# client to it. The client can successfully invoke Apache web
> services. Though, it just can't deal with the response that it gets back.
> The MS documentation is either horrible or well hidden ;-) Does anyone
have
> some ideas.
>
> Please, find below
> 1. C# source code
> 2. C# runtime output
> 3. HTTP response captured by tunnel utility.
>
> Thanks a lot,
> HariNam
>
> namespace Dude
> {// Allow easy reference System namespace classes
> using System;
> using System.Xml.Serialization;
> using System.Web.Services.Protocols;
> using System.Web.Services;
>
> // This "class" exists only to house entry-point
> class MainApp2 : SoapClientProtocol {
>
> public MainApp2() {
> Console.WriteLine("in constructor");
> this.Url = "http://172.25.3.55:8081/soap/servlet/rpcrouter";
> }
>
>
>
[System.Web.Services.Protocols.SoapMethodAttribute(RequestNamespace="swifta"
> )]
> public void soapRead(String queue) {
> Console.WriteLine("begin soapRead");
> try {
> this.Url = "http://172.25.3.55:8081/soap/servlet/rpcrouter";
> object[] result = this.Invoke("soapRead", new string[] {queue});
> Console.WriteLine("in soapSend" + result[0]);
> } catch(Exception ex) {
> Console.WriteLine(ex.ToString());
> Console.WriteLine("caught exception" + this.Url);
> }
> }
> }
>
> class MainApp {
>
> // Static method "Main" is application's entry point
> public static void Main() {
> // Write text to the console
> Console.WriteLine("Hello World using C#!");
> // (new MainApp2()).soapSend();
> MainApp2 app2 = new MainApp2();
> app2.soapRead("testqueue@router1");
> Console.WriteLine("after method call");
> }
> }
> }
>
> -------------------------------------------------------
>
>
> C:\Documents and Settings\hsingh\mine>Proxy3
> Hello World using C#!
> in constructor
> begin soapSend
> System.Exception: The request failed with HTTP status code 200 and the
error
> mes
> sage:
> --
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xm
> lns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org
> /1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:soapSendResponse xmlns:ns1="swifta"
> SOAP-ENV:encodingStyle="http://schemas.
> xmlsoap.org/soap/encoding/">
> </ns1:soapSendResponse>
>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> --.
> at
> System.Web.Services.Protocols.SoapClientProtocol.ReadResponse(SoapClientMe
> ssage message, HttpClientResponse response)
> at System.Web.Services.Protocols.SoapClientProtocol.Invoke(String
> methodName,
> Object[] parameters)
> at Dude.MainApp2.soapSend(String queue, String message)
> caught exceptionhttp://172.25.3.55:8081/soap/servlet/rpcrouter
> after method call
>
> -----------------------------------------------------------------
>
> HTTP/1.0
> 200 OK
> Content-Type: text/xml;
> charset=utf-8 Content-Length: 413 Set-Cookie2: JSESSIONID=0nb1rxxrv1;
> Version=1;
> Discard;Path="/soap" Set-Cookie: JSESSIONID=0nb1rxxrv1;
> Path=/soap Servlet-Engine: Tomcat Web Server/3.2.2 (JSP 1.1; Servlet 2.2;
> Java 1.3.1; Windows 2000 5.0 x86; java.vendor=Sun Microsyste
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:soapSendResponse xmlns:ns1="swifta" SOAP-
> E NV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> </ns1:soapSendResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> -----Original Message-----
> From: Chiranjeevi Paruchur [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 02, 2001 7:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Deployment error while running addressbook
>
>
>
> Thanks Tom,
>
> It just worked.
>
> Chiran
>
>
>
>
> Tom Myers
>
> <tommyers@dream To:
[EMAIL PROTECTED]
>
> scape.com> cc:
[EMAIL PROTECTED]
>
> Subject: Re: Deployment
error
> while running addressbook
> 02/07/01 16:48
>
> Please respond
>
> to soap-user
>
>
>
>
>
>
>
>
>
> At 03:38 PM 7/2/2001 +0200, Chiranjeevi Paruchur wrote:
> ... Fault String = Deployment error in SOAP service 'urn:AddressFetcher':
> class na
> >me 'samples.addressbook.Address' could not be resolved:
> samples.addressbook.Addr
> >ess
> >
> >MY CLIENT CLASSPATH
> >
> >Client
>
CLASSPATH=/opt/colada/soap-2_2/lib/soap.jar:/opt/colada/javamail/mail.jar:/o
> pt/c
>
>olada/jaf/activation.jar:/opt/colada/xerces-1_4_1/xerces.jar:/opt/tomcat/li
> b/:/o
> >pt/java1.3/tools.jar:.:/opt/colada/soap-2_2
> >
> >
> >MY SERVER CLASSPATH
> >
> >Sever
>
CLASSPATH=/opt/colada/soap-2_2/lib/soap.jar:/opt/colada/javamail/mail.jar:/o
> pt/c
>
>olada/jaf/activation.jar:/opt/colada/xerces-1_4_1/xerces.jar:/opt/tomcat/li
> b/
>
> The Address class is in soap-2_2/samples/addressbook/Address.class, and is
> needed by
> both client and server code. Your client path contains
/opt/colada/soap-2_2,
> but the
> server does not. (or maybe I'm just not seeing something, again.)
>
> Tom Myers
>
>