Hi, I want to send one xml string from my C# client program to a java web service running on apache server by using SOAP.Basically i am able to send the soap request in the string format and getting the response also from the web service.I have seen the soap request and soap response in the Tunnelgui( An Exe which we can view the soap requests and responses).The format which i had seen at tunnelgui is as follows.
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:decrypt-broker" xmlns:types="urn:decrypt-broker/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <tns:EmailDecrypt> <str xsi:type="xsd:string"><Name>praveen<Name></str> </tns:EmailDecrypt> </soap:Body> </soap:Envelope> i.e, url of web service : http://Test:18070/soap/servlet/messagerouter web service method : EmailDecrypt urn/namespace of web service : urn:decrypt-broker In the above soap response finally i want to eliminate the str element and send the Name as xml element i.e, <Name>praveen</Name> instead of <str xsi:type="xsd:string"><Name>praveen<Name></str> my c# client program contains the following C# client program ------------------- using HelloService2; using System; public class HelloClient { public static void Main() { HelloProxy service = new HelloProxy(); String str = "<Name>praveen</Name>"; Console.WriteLine(service.EmailDecrypt(str)); } } namespace HelloService2 { using System.Diagnostics; using System.Xml.Serialization; using System; using System.Web.Services; using System.Web.Services.Protocols; [System.Web.Services.WebServiceBindingAttribute (Name="HelloService1",Namespace="urn:decrypt-broker")] public class HelloProxy: System.Web.Services.Protocols.SoapHttpClientProtocol { public HelloProxy() { this.Url = "http://flinks-murali:18070/soap/servlet/messagerouter"; } [System.Web.Services.Protocols.SoapDocumentMethodAttribute ("urn:decrypt-broker",RequestNamespace="urn:decrypt- broker",ResponseNamespace ="urn:decrypt-broker",Use= System.Web.Services.Description.SoapBindingUse.Encoded, ParameterStyle= System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public string EmailDecrypt(String str) { object [] results = this.Invoke("EmailDecrypt",new object[]{str}); return ((string)(results[0])); } } }//program ends here Any help would be appreciated.......... Thanks, Praveen You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.