i sent request to soap API with attachment as below
WebResponse response = null;
try
{
string sWebAddress = "http://myserver-id/axis2/services/NGOAddDocServiceImp?wsdl";
string filePath = @"C:/Users/ashokr/Desktop/download.png";
string filename = "download.png";
string soapxml = "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:prov=\"http://provider.ws.jts.omni.newgen.com\" xmlns:xsd=\"http://adddoc.bdo.ws.jts.omni.newgen.com/xsd\"><soap:Header/><soap:Body><prov:addDocument_Ext><prov:param0><xsd:cabinetName>iw_consumer</xsd:cabinetName><xsd:documentPath></xsd:documentPath><xsd:folderIndex>4338977</xsd:folderIndex><xsd:jtsAddress>10.24.96.98</xsd:jtsAddress><xsd:name>" + filename + "</xsd:name><xsd:portId>3333</xsd:portId><xsd:userDBId>607323535</xsd:userDBId><xsd:userName>IBG_BFIL_Assets_User</xsd:userName><xsd:userPassword>Test@351</xsd:userPassword><xsd:volumeId>1</xsd:volumeId></prov:param0></prov:addDocument_Ext></soap:Body></soap:Envelope>";
string boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x");
byte[] boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" +
…
Top comments (0)