简体   繁体   中英

Sending MTOM request to a AXIS2 Web Service from Dot Net application

I need to send MTOM request (having file to checked in to Documentum location), to a AXIS2 Web Service.

The service has identified, two types of transfer mode, 64bit encoding and MTOM. Even when I use the MTOM mode and do the changes to Web.Config (WSE 3.0) to send only MTOM request, base 64 is passed over the wire.

How do I ensure that the request is MTOM? I need to share the file as a byte array. The method to check in document expects it to be a byte array.

  1. Installed WSE3.0 on my laptop.
  2. Changed the Web.Config as suggested here - http://msdn.microsoft.com/en-us/library/aa528822.aspx
  3. Changed the inheritance of the class - public partial class DasStoreContentService_V1X0 from System.Web.Services.Protocols.SoapHttpClientProtocol to Microsoft.Web.Services3.WebServicesClientProtocol.
  4. Overridden the method as follows

protected override System.Net.WebResponse GetWebResponse(System.Net.WebRequest request) { System.Net.WebResponse output = base.GetWebResponse(request); this.RequireMtom = false; return output; } 5. Before sending the MTOM request, change the type of request by : dscsService.RequireMtom = true;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM