Can you make a jQuery call for a WCF service using SOAP and WSHttpBinding?

Can I make a jQuery call for a WCF service using SOAP and WSHttpBinding?

If so, how? (any examples on the Internet?) If not, why not?

As you can see from this post , I cannot get it to work.

I need to be able to use WSHttpBinding so that I can support SAML and WS-Security. I understand that basicHTTPBinding does not support ws-Security.

All other SO examples also use json (which I can easily execute) or basicHttpBinding.

I have to use SOAP and ws-Security to comply with OGC 07-118r8 standards.

+7
source share
3 answers

With something like WS- * and WCF complexity, it would be easier to create a simple jQuery async callback on another page of your site that can use the built-in WS-Security.NET libraries. From there, you can disconnect the WCF endpoint call, process the result, and return it back to the jQuery function as an easy-to-read answer.

I found several articles mentioning what you are trying to do. It sounds like you essentially need to write your own jQuery WS-Security library before it works directly from JavaScript (and I assume this is probably not practical for you):

"The wsHttpBinding binding service implements the WS-Security WS- * family of web service specifications. Because the binding uses security, the request will be rejected. The service cannot be called without implementing WS-Security in the jQuery end. Therefore, to invoke service method, we must compromise with security. "

http://www.codeproject.com/Articles/311908/Calling-WCF-service-exposed-with-different-binding

"... wsHttpBinding, which is a SOAP binding that will not work with AJAX."

http://www.west-wind.com/presentations/jquery/jquerypart2.aspx

+3
source

You cannot implement WS * in JavaScript!

The best option is to create another binding on the server and show it as basic HTTP or even better than WCF REST.

+1
source

It should be possible in theory. I assume that you understand how to get your SAML token and deal with WS-Security. WSHttpBinding defaults to soap 1.2, so either look at the http binding specification to find out how to build a query using jquery: http://www.w3.org/TR/soap12-part2/#soapinhttp or set EnvelopeVersion.Soap11 to WSHttpBinding. good luck!

0
source

All Articles