About the drawbacks... I didn't see any. I did the .NET Service then find out that it wasn't return the datatype like the MS Soap toolkit. I search on the net and found someone that add those RPC stuff. I add them and it did the job i wanted them to do. I don't know if it reduce performance or stuff like that. Here's what I found... Steeve... From: "Yann Christensen" <[EMAIL PROTECTED]> Date: Mon Jun 25, 2001 7:33 pm Subject: RE: [soapbuilders] Re: Sample Code of Apache Soap 2.2 consuming .Net Beta 2? Help! Typically this does not noticeably impact performance. -----Original Message----- From: [EMAIL PROTECTED] [mailto:tkubik@w...] Sent: Wednesday, June 20, 2001 5:11 PM To: [EMAIL PROTECTED] Subject: [soapbuilders] Re: Sample Code of Apache Soap 2.2 consuming .Net Beta 2? Help! Thanks it worked! Great! Does this have any performance impact for .Net to .Net consumption of the same service? I'm doing this an an Interop proof of concept. Thanks a bunch. --- In [EMAIL PROTECTED], "Kirill Gavrylyuk" <[EMAIL PROTECTED]> wrote: > your service should be rpc/encoded. By default .Net is document/literal. > Use special attributes to get rpc/encoded like this: > > <%@ WebService Language=CS class="DataType.StringTest"%> > > namespace DataType{ > using System; > using System.Web.Services; > using System.Web.Services.Protocols; > using System.Web.Services.Description; > > [SoapRpcService()] > public class StringTest: WebService > { > [WebMethod] > [SoapRpcMethod()] > public string RetString(string x){ > return(x); > } > > } > } > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:tkubik@w...] > Sent: Wednesday, June 20, 2001 4:22 PM > To: [EMAIL PROTECTED] > Subject: [soapbuilders] Sample Code of Apache Soap 2.2 consuming .Net > Beta 2? Help! > > > Hi Everybody, > > We're having a frustrating time getting Apache Soap 2.2 to consume > a .Net Beta 2 web service. Right now, we are forced to using MS Soap > Toolkit 2.0 to wrap our .Net Beta 2 web service. Obviously we want to > get away from this and go straight at our MS.net.b2 web service. We > haven't been able to find any sample code on how to do this? Does > anyone have anything they can post here - just a hello world or > something? We keep getting deserializer issues on the Apache side. > > We've used the same code and tricks that work with MS Soap Toolkit2.0 > Gold - but no luck. Any suggestions or tips would be greatly > appreciated. I thought these Interop issues would be gone in > Beta2.net... :( Pete Roth <[EMAIL PROTECTED]> on 01/08/2001 10:33:36 AM Please respond to [EMAIL PROTECTED] To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> cc: (bcc: Steeve Gilbert/G_STGEORGES/CANAM_MANAC) Subject: RE: setting response deserializers dynamically not based on eleme nt names (Java client to MS .NET server) Steve, thanks for all your help. Your solution does look good. The problem in my case is that I am only writing the client. Someone else is writing the server side stuff. We used the RPC method when we first started (before I hot to map the deserializers) and I believe that wasn't an option for some reason. I will ask the other team again but I believe they will say no to your solution. Is there any drawbacks to adding the [SoapRpcService()] and [SoapRpcMethod()] to our server WebServices? Thanks. Peter Roth Telemetry Technologies Inc. p: 404.231.0021 ext. 1290 e: [EMAIL PROTECTED] -----Original Message----- From: Steeve Gilbert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 10:13 AM To: [EMAIL PROTECTED] Subject: Re: setting response deserializers dynamically not based on element n ames (Java client to MS .NET server) Hi Pete! I think you'll be happy with this one. Add the [SoapRpcService()] before your class and [SoapRpcMethod()] before your method and now they should add the datatype in the soap response. That's what I did and it's working great. The code looks like this... namespace DotNetService { [SoapRpcService()] [WebService(Namespace="urn:DUJS/", Description="Services SOAP offert par le .NET.")] public class DUNETService : System.Web.Services.WebService { [WebMethod(Description="Calcul le plus petit denominateur pour le nombre passé en paramètre.")] [SoapRpcMethod()] public int PPD(int number) { int return_ppd = 2; return return_ppd; } } Good luck! Tell me if it's not working. Steeve... Pete Roth <[EMAIL PROTECTED]> on 01/08/2001 10:10:42 AM Please respond to [EMAIL PROTECTED] To: "Soap-dev List (E-mail)" <[EMAIL PROTECTED]>, "Soap-user list (E-mail)" <[EMAIL PROTECTED]> cc: (bcc: Steeve Gilbert/G_STGEORGES/CANAM_MANAC) Subject: setting response deserializers dynamically not based on element n ames (Java client to MS .NET server) I have a response envelope that will look like the XML sample below. What I need to do is read in all that data. I now, with the help of users of this group, am able to build the response as an XML document and can parse it that way. The problem is that since I am using a .NET server that doesn't return the xsi:type attribute on each data element, I need to manually set up deserializers for each element returned by the server. When I use this method in my SOAP wrapper class: public void setDeserializer(org.apache.soap.util.xml.Deserializer[] des, String[] rsponseItemNamespaces, String[]responseItemNames) { for (int i=0; i<des.length;i++) { if(des[i] == null) return; _smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName(responseItemNamespaces[i], responseItemNames[i]), null, null, des[i]); } _call.setSOAPMappingRegistry(_smr); } To map the deserializers to the response elements. Now this works for one element returned, but if I try to use it for the method which returns the below XML (passing all the deserializers, element namespaces, and element names of course) It tells me that "device_getCurrentMessageResult" there is no deserialzier to deserialize a "namespacehere:device_getCurrentMessageResult". What's up with that? Also, Since I am getting the response as XML and parsing it myself, I would just like to specify to use the StringDeserializer for all the data regardless of how many elements are returned in the SOAP envelope. That way if the names or number of elements change, in the method response, I won't have to change my client code, if I code it carefully. Does anyone know how I can just use StringDeserializer for the entire response so I don't have to know the names of all the elements returned in the SOAP envelope? Remember, I am using a .NET server that doesn't add the xsi:type attribute. Any help would be greatly appreciated. Thanks. ******************* Sample XML response **************************************************************************** * <?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:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <device_getCurrentMessageResponse xmlns="http://telemetrytech.net/VnocngWebService"> <device_getCurrentMessageResult> <vnVNOC ThisTransactionTime="string"> <VnocAddress>string</VnocAddress> <UserAddress>string</UserAddress> <Disclaimer>string</Disclaimer> <Copyright>string</Copyright> </vnVNOC> <vnDevice AccountID="string" DeviceIDInternal="int" AdminLevelAccess="boolean" AccountIDInternal="int"> <GroupName>string</GroupName> <DeviceName>string</DeviceName> </vnDevice> <vnDeviceInboundMsg MessageID="string"> <MessageEncoding>string</MessageEncoding> <MessageTime>string</MessageTime> <MessageTimeUTC>string</MessageTimeUTC> <MessageData>string</MessageData> <MessageDataPreParsed>string</MessageDataPreParsed> <MessageDataLenIn>string</MessageDataLenIn> </vnDeviceInboundMsg> </device_getCurrentMessageResult> </device_getCurrentMessageResponse> </soap:Body> </soap:Envelope> **************************************************************************** * Peter Roth Telemetry Technologies Inc. p: 404.231.0021 ext. 1290 e: [EMAIL PROTECTED]