I know how to create a REST service using POST (using [WebInvoke]). Is there any way to make a POST method in SOAP service? Is it viable/feasible? Do anyone have any reference which could give me a clear idea.
Not clear about what you mean.
General soap service all uses post method.
You could refer to https://learn.microsoft.com/en-us/dotnet/framework/wcf/how-to-define-a-wcf-service-contract to learn how to create a soap service using wcf.
Related
I've looked all day and I couldn't able to find a correct answer on how get the response of my Web Service using basicHttpBinding without the SOAP formatting.
Can anyone know how to do that ? or another way for getting the raw data ? (like a string)
You have to use webhttpBinding. Look at the following articles, it might help you:
Creating WCF Service with SOAP/REST Endpoints
How to enable REST and SOAP both on the same WCF Service
An Introduction To RESTful Services With WCF
Masters,
I am new to WCF but aware about Web API's [Authorize] attribute.
Same i want to duplicate for WCF REST basic authentication service, Expecting as the security header will pass in every subsequent request once authenticated.
We target to make Restful service using webHttpBinding. Please provide any relevant example to achieve this. Also we target to run same on Https then.
Things seems much simpler in Web API but not in WCF.
I googled and get some answers like
Something like an operation filter in WCF REST?
Can anybody give me simpler way to achieve this very straight forward as we do in Web API.
Thanks.
There's some nice article and projects for activating authentication in WCF:
http://blogs.msdn.com/b/pedram/archive/2007/10/05/wcf-authentication-custom-username-and-password-validator.aspx
http://www.codeproject.com/Articles/36289/8-steps-to-enable-windows-authentication-on-WCF-Ba
And then: http://msdn.microsoft.com/en-us/library/bb398990.aspx
Edit:
See this article: Custom Basic Authentication for RESTful services
Hope helps.
I want to send an XML Document(string) to WCF webservice in iOS.
I have done it in REST webservices.
NO idea how to do it in WCF service.
Can any one help ?
You can expose WCF services as REST endpoints if you want. How complex of a document are you sending? Do you want to use SOAP or just POST via HTTP?
Is there any way to enforce that a method call in soap based wcf is called as an HTTP get? I'm not sure if this would be handled on the client or server side. We wanted to have the wcf call process as a get vs. post for cacheability, etc.
I'm also not sure how to monitor a wcf service to determine if calls are doing gets or posts (or if it always does one or the other). Can I use fiddler for this?
I would imagine I could use a restful wcf service to wrap the call, but I wasn't sure if there was a way to do it straight in a soap based service.
Out of the box WCF functionality does not support SOAP HTTP GET. But WCF is extensible so you can try to develop custom binding (with cutom channel or behavior) supporting this feature.
Caching is supported in WCF 4 REST services. REST services allow all basic HTTP methods.
You can use Fiddler to monitor the gets and posts.
Check out this post about calling a WCF service with an HTTP GET.
Is it possible to post to a WCF service hosted in IIS? I know that that this is possible using REST but I really need the WSDL generation and SOAP headers. I need to transition an existing ASMX web services to WCF but I need to also allow my clients to continue to utilize the service via http posts (xml http request via javascript). Is REST my only option?
No, with a SOAP service, you need to use the SOAP methods and actions - you cannot use HTTP POST to "dump" some data on a SOAP service.
If you need HTTP POST, then REST is the way to go.
You can also use REST style WCF
http://msdn.microsoft.com/en-us/netframework/cc950529.aspx