c# - SOAP for wcf service -


this 1st time try wcf web service.

i created web service. testing wcf test client, works fine. when copy xml generated wcf test client postman/fiddler test web service, error 400 bad request.

<s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">   <s:header>     <action s:mustunderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/icompanysvc/getlist</action>   </s:header>   <s:body>     <getlist xmlns="http://tempuri.org/" />   </s:body> </s:envelope>` 

in postman/fiddler, use httppost on web service hosted in local iis url localhost:9999/companysvc.svc, use above content in body text/xml.

web.config:

<service name="companysvc">   <endpoint address="" binding="basichttpbinding" contract="icompanysvc">     <identity>       <dns value="localhost"/>     </identity>   </endpoint>   <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange"/>     <host>       <baseaddresses>         <add baseaddress="http://localhost:8080/companysvc"/>       </baseaddresses>     </host>   </service> 

interface:

[servicecontract] public interface icompanysvc {     [operationcontract]     list<company> getlist(); } 


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -