I am trying to create WCF service that can receive MTOM encoded messages. I do not have client that sends MTOM encoded messages, however I do have message example (that's why I am trying to use Postman).
Request example:
Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:83d3b2a6-5437-4366-bfb1-6f7c8b49add5"; start=""; start-info="application/soap+xml; action=\"urn:test:test1:ResponseInputMessage\""
Payload: --uuid:83d3b2a6-5437-4366-bfb1-6f7c8b49add5 Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml; action=\"urn:test:test1:ResponseInputMessage\"" Content-Transfer-Encoding: binary Content-ID:
... --uuid:83d3b2a6-5437-4366-bfb1-6f7c8b49add5--
Service contract:
[ServiceContract]
public interface IResponseService
{
[OperationContract]
AcknowledgementType ResponseInputMessage(RegistryResponseType registryResponse);
}
Web.config:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1"/>
</system.web>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpMtomBinding" messageEncoding="Mtom" />
</wsHttpBinding>
</bindings>
<services>
<service name="MySvc.ResponseService">
<endpoint address="ResponseService.svc" contract="MySvc.IResponseService" binding="wsHttpBinding" bindingConfiguration="wsHttpMtomBinding"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="wsHttpBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
WSDL (http://localhost:50809/ResponseService.svc?wsdl) displays:
<soap12:address location="http://localhost:50809/ResponseService.svc/ResponseService.svc"/>
When I send a request to http://localhost:50809/ResponseService.svc/ResponseService.svc
Postman says Could not get any response
. If I send a request to http://localhost:50809/ResponseService.svc
is returns 404
.
Please suggest what I am missing?
Thanks in advance