Return-Path: Delivered-To: apmail-ws-soap-user-archive@www.apache.org Received: (qmail 53265 invoked from network); 15 Jan 2004 17:14:13 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 15 Jan 2004 17:14:13 -0000 Received: (qmail 27174 invoked by uid 500); 15 Jan 2004 17:13:59 -0000 Delivered-To: apmail-ws-soap-user-archive@ws.apache.org Received: (qmail 27158 invoked by uid 500); 15 Jan 2004 17:13:59 -0000 Mailing-List: contact soap-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: soap-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list soap-user@ws.apache.org Received: (qmail 27133 invoked from network); 15 Jan 2004 17:13:58 -0000 Received: from unknown (HELO web25103.mail.ukl.yahoo.com) (217.12.10.51) by daedalus.apache.org with SMTP; 15 Jan 2004 17:13:58 -0000 Message-ID: <20040115171401.68011.qmail@web25103.mail.ukl.yahoo.com> Received: from [62.252.0.6] by web25103.mail.ukl.yahoo.com via HTTP; Thu, 15 Jan 2004 17:14:01 GMT Date: Thu, 15 Jan 2004 17:14:01 +0000 (GMT) From: =?iso-8859-1?q?Jonathan=20Roberts?= Subject: Re: calling dot net web services from java soap To: soap-user@ws.apache.org In-Reply-To: <017801c3d9e9$9b43e030$6801a8c0@northgate> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-968222684-1074186841=:67333" Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-968222684-1074186841=:67333 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Scott, What about the other soap code from the following snippet: e.g. NS_URI_SOAP_ENC & urn:xml-SOAP-App (the name of my app) Sicne I am now taliking to dotnet and not soap, presumably they do differ? Jonathan URL url = new URL(mstrHostString + "/main.asmx"); SOAPMappingRegistry smr = new SOAPMappingRegistry(); StringDeserializer sd = new StringDeserializer(); smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"), null, null, sd); // create the transport and set parameters SOAPHTTPConnection st = new SOAPHTTPConnection(); // build the call. Call call = new Call(); call.setSOAPTransport(st); call.setSOAPMappingRegistry(smr); c.setTargetObjectURI ("urn:xml-SOAP-App"); call.setMethodName(" method on server"); call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/"); Scott Nichol wrote: You used r = c.invoke ( new URL( "localhost/soap/servlet/rpcrouter"), "" because "localhost/soap/servlet/rpcrouter" was the URL for your Apache SOAP service. The URL is simply the service endpoint; it can be any URL. To call a .NET service, you might have r = c.invoke ( new URL(http://localhost/services/MyService.asmx), "" ) Overall, the interop story is that it is *simple* to work with .NET when the services are rpc/encoded. The default with .NET services, however, is to use document/literal. There are some hacks and workarounds in Apache SOAP (some only in the nightly builds), but interop there is still less than ideal. For the best interop with .NET, you should use Apache Axis. It supports more specs, notably WSDL 1.1. Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message ----- From: "Jonathan Roberts" To: Sent: Tuesday, January 13, 2004 10:08 AM Subject: calling dot net web services from java soap > Hi guys > > Has any one found a simple easy way to do this. > > java soap calls : > > > r = c.invoke ( new URL( "localhost/soap/servlet/rpcrouter"), "" > > where as > > dot net seems to be associated with : main.asmx > > Any interesting work arounds or is this a whole side area of interopability:? > > > > Jonathan > > > > --------------------------------- > Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now --------------------------------- Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now --0-968222684-1074186841=:67333 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi Scott,
 
What about the other soap code from the following snippet:
 
e.g.
NS_URI_SOAP_ENC
&
urn:xml-SOAP-App (the name of my app)
 
Sicne I am now taliking to dotnet and not soap, presumably they do differ?
 
Jonathan
 
 
            URL url = new URL(mstrHostString + "/main.asmx");           
            SOAPMappingRegistry smr = new SOAPMappingRegistry();
            StringDeserializer sd = new StringDeserializer();
            smr.mapTypes(Constants.NS_URI_SOAP_ENC,    new QName("", "Result"), null, null, sd);          
            // create the transport and set parameters
            SOAPHTTPConnection st = new SOAPHTTPConnection();
           
            // build the call.
            Call call = new Call();
            call.setSOAPTransport(st);
            call.setSOAPMappingRegistry(smr);
           
            c.setTargetObjectURI ("urn:xml-SOAP-App");                 call.setMethodName("   method on server");
            call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
 


Scott Nichol <snicholnews@scottnichol.com> wrote:
You used

r = c.invoke ( new URL( "localhost/soap/servlet/rpcrouter"), ""

because "localhost/soap/servlet/rpcrouter" was the URL for your Apache SOAP service. The URL is simply the service endpoint; it can be any URL. To call a .NET service, you might have

r = c.invoke ( new URL(http://localhost/services/MyService.asmx), "" )

Overall, the interop story is that it is *simple* to work with .NET when the services are rpc/encoded. The default with .NET services, however, is to use document/literal. There are some hacks and workarounds in Apache SOAP (some only in the nightly builds), but interop there is still less than ideal.

For the best interop with .NET, you should use Apache Axis. It supports more specs, notably WSDL 1.1.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Jonathan Roberts"
To:
Sent: Tuesday, January 13, 2004 10:08 AM
Subject: calling dot net web services from java soap


> Hi guys
>
> Has any one found a simple easy way to do this.
>
> java soap calls :
>
>
> r = c.invoke ( new URL( "localhost/soap/servlet/rpcrouter"), ""
>
> where as
>
> dot net seems to be associated with : main.asmx
>
> Any interesting work arounds or is this a whole side area of interopability:?
>
>
>
> Jonathan
>
>
>
> ---------------------------------
> Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now


Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now --0-968222684-1074186841=:67333--