Hi,
IService.cs
When using SoapClient, the result is returned without errors
But when used cURL not working, the result : cURL Error (22): The requested URL returned error: 415 Cannot process the message because the content type 'application/x-www-form-urlencoded' was not the expected type 'text/xml; charset=utf-8'.
web.config
<system.serviceModel> <bindings> <basicHttpBinding> <binding name="basicHttpBindingConfiguration"> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" /> </security> </binding> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="myServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> <behavior> <serviceMetadata httpGetEnabled="false"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="webHttp"> <webHttp/> </behavior> </endpointBehaviors> </behaviors> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"> <baseAddressPrefixFilters> <add prefix="http://asdm.sa/"/> </baseAddressPrefixFilters> </serviceHostingEnvironment> <services> <service name="DLR.Service" behaviorConfiguration="myServiceBehavior"> <endpoint name="webHttpBinding" address="" listenUri="http://asdm.sa/Service.svc" binding="basicHttpBinding" contract="DLR.IService" bindingConfiguration="basicHttpBindingConfiguration"/> <endpoint name="mexHttpBinding" address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> </system.serviceModel>
How i sloved it
i used add wehttpbinding in system.serviceModel but same problem
can i use soap or wsdl to call web service in PHP by cURL