.NET interop problems

Stefan Haustein <[email protected]> Thu, 08 Jan 2004 12:50:02 +0100
Newsgroups gmane.comp.java.enhydra.ksoap
Message-ID <[email protected]>
Hi,

if you experience problems with .NET servers, the problem may be on the .NET 
side, see the message from eddy_k quoted below. In order to connect to .NET 
servers without configuring them correctly, please use kSOAP 2 and set the 
dotNet flag in the soap envelope:

   SoapObject rpc =
	new SoapObject("imaging", "setPlayMode");

   rpc.addProperty("play", "on");

   SoapSerializationEnvelope envelope =
     new SoapSerializationEnvelope(SoapEnvelope.VER10);

   envelope.bodyOut = rpc;
   envelope.dotNet = true; // !!!	

   HttpTransport ht = new HttpTransport("http://194.67.45.100");
   ht.call("setPlayMode", envelope);

Best,
Stefan


[email protected] wrote:
> Hello @ll,
> 
> like many others here i had problems calling methods from a .net 
> webService, because of the microsoft namespace handling. i found some 
> helpful articles it the kSOAP mailing list, but no one could give me a 
> simple solution. searching the web i found a very interessting article 
> on the serverside which helped me out of my kSOAP-.NET-dilemma.
> 
> I hope it could help other newbies to spend their time more effective.
> 
> greetZ eddy
> 
>  
> 
> here we go:
> 
> http://www.theserverside.com/resources/article.jsp?l=Systinet-web-services-part-5
> 
> ----
> 
> this is the part i mean:
> 
> 
>       Default document style with literal encoding
> 
> Some Web services frameworks, including MS .NET, generate, by default! , 
> a document style Web service, using literal encoding. Although the Web 
> service uses document/literal, the .NET framework makes the service 
> appear to be RPC style to .NET clients. This isn't necessarily so for 
> other Web service frameworks, and many users may find it difficult to 
> access the Web service using an RPC style client. So if you're writing 
> an RPC Web service, force your framework to generate the RPC style WSDL.
> 
> Example: Use the [SoapRpcService] directive in your MS .NET RPC Web 
> service implementations:
> 
> <%@ WebService Language="C#" Class="MSNetStockService" %>using System.Web.Services;using System.Web.Services.Protocols;using System.Web.Services.Description;[SoapRpcService]public class MSNetStockService {  [WebMethod]  public double getQuote(string symbol) {...
> 
> ______________________________________________________________________________
> 38xTestsieger - WEB.DE FreeMail - Deutschlands beste E-Mail
> Design-Mails - einfach schoenere E-Mails - *http://f.web.de/?mc=021129* 
> _______________________________________________ Ksoap mailing list 
> [email protected] http://www.enhydra.org/mailman/listinfo.cgi/ksoap