I have asp page that need to access a client resource. Can I put the client code in a Windows Service and install it on client machine and call that service in asp JavaScript page?
Thanks
Are you asking if it's possible to call a WCF service using Javascript? Obviously the answer is yes, any book on WCF will show you how.
Related
I have a nifty AngularJS application that uses a JBoss (WildFly 8) RESTful API to retrieve data. To integrate it into my corporate environment, it requires Kerberos authentication. I've see miles of documents and examples, and even some customized advice from an internal Java developer. My problem, at this time, is where in the architecture can/should the Kerberization take place?
Is it upon entry to the AngularJS app? As in do not allow unless the ticket is authorized?
Or do I challenge each API call? If this is the case, then how would I pass along the client Kerberos ticket information to the API call?
If my question sounds disjointed, or naive, it is. This is my first interaction with Kerberos.
Help appreciated, thanks.
I ran into the same problem / challenge with a PHP REST API on an Apache webserver with Kerberos auth.
Since Angular is pure client side every request is made as 'you' in Kerberos terms so you don't have to send the ticket. Your browser already sends the ticket when the request is made.
I created a login (or check logged-in) API endpoint in my PHP API which is called before every locationChange in Angular. If the login action returns false or nothing at all you are redirected to a access_denied.html page residing next to index.html (Angular).
The login action REST endpoint returns some userdata and permissions so you can do authorization.
In my case (also still searching) I also have some authorization on the API level.
Since my implementation involves a corporate webapplication I will add some code examples tomorrow ;)
with a jboss api, it means with java code not with php and httpd in front, you can do it directly in jboss an example :
https://github.com/dstraub/spnego-wildfly
we ar doing exactly this and it works a charm, there is some example with tomcat, jboss and wildfly (different)... tell me if you have any problem... with front Angular JS and API java
Is there any method of calling a SOAP Service with the URL :
http://localhost:8088/...TestService?wsdl
How can I invoke and get the values from the client using javascript?
Cheers!!
Thanks
You shouldnt call soap service directly from js because soap is not limited to http communication and there is no good support for soap in JavaScript.
It is better to use intermediate layer which is more capable in terms of soap communication. For example you can call from JavaScript your asp.net mvc application using ajax and then call soap service from asp.net mvc app using wcf. Instead of asp.net mvc you can use any other server side technology and soap communication library. JavaScript is good for ajax/json communication but not for soap.
JavaScript doesn't have a SOAP library out of the box, though you can google around and find them, The web services still need to be on the origin server.
Similar Question found
here
I am developing one mobile web application.
In this, i want to call a Web Service and fetch data from their using Java Script only.
I searched a lot and try to implement some code also but it didn't help me out.
One thing is that the Web Service was made in .NET using SOAP.
So, please help me to solve it immediately.
One easy would be to create an ASP.NET Web API Http service wrapper around your current webservice and use jQuery to access it. This will be much simpler than using JS to access a SOAP service.
More on ASP.NET Web API: http://www.asp.net/web-api
Anyone know how to connect a JavaScript client with Red5 Server?
I need to do this without flash, flash player or Java Virtual machine.
Thank you very much
You can write for example a servlet and invoke a REST call via JavaScript to the servlet. The servlet can then invoke a method and broadcast the message to all connected flash clients via RTMP.
Another possibility would be for example you integrate any other possibility to receive REST calls. Red5 is a regular Java Application server, normally deployed on Tomcat (or Jetty). So you could for example integrate Axis2 and have a full featured REST framework to handle JavaScript calls and forward those messages to the RTMP clients.
Sebastian
Can I call a SOAP web service from JavaScript? The SOAP web service in question is a member of the Exchange Web Services platform. I have found the Exchange Web Services OSX Widget but that uses Curl to do the actual SOAP call. So I am wondering if there is a limitation in the JavaScript abilities to interface with SOAP using authentication.
Javascript isn't very good at web services because of the same origin policy which means you're only allowed to request resources from the same domain as the page you call from.
You could work around this by setting up a proxy on your server to hand the request off to elsewhere. The problem with this is you'd have to build the SOAP message yourself as I very much doubt anyone has ever bothered to write a js SOAP library due to the afore mentioned limitations.
Instead, I would pick your favourite server side SOAP library and expose an interface to be called via AJAX.