Reputation: 2246
I have a WCF web service with exposing 3 end points. But when I debug it to WCF test client it is only showing one basicHttpBinding endpoint.
1 : Why so?
2 : Here I have one operation contract "CallADSWebMethod" which returns a DataContract (VINDescription)..Just curious to know..why this works great for me in real time but still it is not testable by test client..I mean Test client says "This operation is not supported by test client"
3 : Here in the endpointBehaviors - I have only given and no ...But still it is working from jquery ajax call..So what is the significance of "enableWebScript" ??
Config Info
<system.serviceModel>
<services>
<service behaviorConfiguration="asmx" name="ADSChromeVINDecoder.Service">
<endpoint address="basic"
binding="basicHttpBinding"
name="httpEndPoint"
contract="ADSChromeVINDecoder.IService"/>
<endpoint address="json"
binding="webHttpBinding"
behaviorConfiguration="webBehavior"
name="webEndPoint"
contract="ADSChromeVINDecoder.IService"/>
<endpoint contract="IMetadataExchange"
binding="mexHttpBinding"
address="mex" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="webBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="asmx">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
Upvotes: 3
Views: 1392
Reputation: 755157
The WCF Test Client will only show the SOAP endpoints - and there's only one of those (the one with the basicHttpBinding
).
The json
endpoint uses webHttpBinding
(which is REST based - can't be tested by WCF Test Client)
The mex
endpoint is the metadata exchange endpoint - not a real service endpoint.
Therefore, the WCF Test Client correctly show only one (SOAP) endpoint - there is only one!
Update: the WCF Test Client is rather limited, and one of the limits is that it cannot deal with your own custom datatypes as parameters. You can basically only test methods with parameters of type int
, string
, datetime
and the like - the simplistic data types.
If you need more advanced web service testing, you should check out the (freely available) SoapUI tool for testing your SOAP web services - including complex parameter types and a lot more.
Upvotes: 5