Having trouble using AS3 Webservice - web-services

AS3 Webservice
I'm using this library to connect to a database where I store and retrieve files that my program uses. When I test it locally, it works fine, but when I put it online it has trouble connecting, I ran some debugs inside the library and after "DESCRIPTION LOADED" is traced, nothing happens. Also I'm not really sure where to run traces to see what the problem is exactly, I just removed the comments on some traces that were already there.
So to recap, when I run my program offline(locally) it runs fine, it connects, sends and receives no problem. Once online, it doesn't connect it doesn't even run the traces I have in the OperationSuccessful or OperationFailure functions.
So I'm wondering if anyone has been using this library successfully and could maybe share some tips or code that will help me, thank you!
EDIT
We seemed to have solved our problem with this method without using that third party webservice library.

I am going to assume a few things here.
1) the data server is not on the same domain.
2) the server with the data is open and not blocked by the firewall.
You need a crossdomain.xml file on the server with the data allowing the domain where the swf is located.
Something like this.
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain = "*"/>
</cross-domain-policy>

Related

Sharing a local server with 'Code with me' in WebStorm

In the JetBrains` page for Code With Me, I can see a paragraph mentioning:
You can use Code With Me for real time collaboration, editing code, sharing a server, and running a debugging session.
However, I cannot see how a server can be shared. For example, if I start API server locally, I cannot find a way to share it through Code With Me.
I am just and only looking for a way of sharing that local server through Code With Me, not any third-party website or so.
I would appreciate any help
If I understand you correctly, you want to share access to your server running locally with a guest.
For this scenario, there is a Code With Me tool-window in the right bottom corner which allows you to forward a port. The tool-window appears when the Code With Me session is active.
Does it fit your needs?

how do I run file processor proxy from sample?

I'm learning wso2 and working with this sample: http://wso2.com/library/articles/2011/01/wso2-esb-example-file-processing/
I followed the instructions but when I start the server nothing happens. I don't see references to the FileProxy or sequences on the management console until I move the xml files to the deployment directory. When I do that I'll see the proxy and Sequences install but nothing else happens when I drop the txt file in the "in" directory.
I am not sure what I need to do to trigger the proxy. I'm not getting any error messages or anything. The server just kind of sits there.
What do I need to do to run the sample?
Thank you.
Try this sample https://docs.wso2.com/pages/viewpage.action?pageId=33136056 in WSO2 ESB 4.8.1 to get a basic understanding of VFS Proxy.

Web interface for a C++ program

I am developing a project for the end of my studies. This project is basically acting as a server, is cross-platform and developed in C++.
I was wondering if it was possible to make a web interface that could be used like for instance the listener design pattern to log what the program does. This would be cross platform, and is ideal since the program is supposed to run on a distant server.
My question is: is there any web technology to could let me update my web page live when the program logs something. I know this is something unusual and I'm not an expert in web technos, that's why I am asking.
Would Erlang do it ?
Thanks for your help
EDIT: To give a more concrete example, I would like to be able to follow the execution of my program live and see the logs of my program appear on the page. The idea would be to use a web page like I would use WPF on Windows or GTK on Linux for instance. Like someone said, it would be some kind on monitor for my application.
It's much easier than you might think. A web server basically gets a request as a path name, and returns a page. If you set it up correctly, it will invoke a program to create the content. This is called "CGI".
If you can do it without live updating, it's then super-easy: just refresh the page and your program can be called again.
If you want live updating, you'll need to do a little more. The easiest way is with a little lightweight javascript. The magic word here is AJAX. There are a number of tutorials on line for both of these, just google.
The main thing is to start with a very very simple example and add to it. Javascript in particular is a little peculiar; follow the tutorials, though, and you'll get it.
You can embed a web server such as http://code.google.com/p/mongoose and poll it using xhr or better use websockets.
Or use a monitoring solution such as Nagios (Nagios Core is free).

Stream c++ file on web-Browser

I have a c++ project (server-side) which sends the data to the client side with the help of event source. Now for debugging purposes I have maintained a trace file (text). On all the critical areas in the c++ code where there is a fear of code-break, I have added a line which writes the "success" text to this trace file. It works fine. I can know where the code is success and where it failed.
But I am on the server side. I want to avail this facility to the client too. However, I am unsure about how to do that? Should I stream the file on web-browser, or is there any other way I can send the data "live" to web-browser?
I checked this link, however, I am not sure if I can use this. http://www.tutorialspoint.com/cplusplus/cpp_web_programming.htm
Thanks
your question is a bit confusing, and without any sample of your code it is a bit unclear of what you want to do. however, the best suggestion i can give is to do this:
Store the text document on a server of your choice.
write a program to contact the server and download the data. (Using Winsock.h)
OR
Directly send the file to the computer. you'll have to write a program to contact the server at which point B is located.
for information on writing an application using Winsock.h, check here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms737629(v=vs.85).aspx
if you really must store the data live in a web browser, then take a look at Java or VisualBasic, as both are heavily supported in all web browsers, while C++ is not.
Let me see if I understand you correctly. You want to send success / failure of the webserver to your client program?
Well, that's part of the job of a webserver, as dictated by the http protocol. A webserver will respond to a client request with a response header, followed by the requested page (if it exists as a valid resource on the server).
For more information on http response headers have a look at this article, or this wikipedia page, which both detail the request / response conversation between browser and webserver.
Hope this helps.

Fail to CoCreateInstance an EXE COM server

I have an EXE COM server (used to elevate our application to a higher integrity level) which is downloaded to %temp% and registered by an ActiveX control. This COM server works pretty well on Vista machines. On Window 7 machines I got something wired: the COM server can be downloaded and registered successfully, but I got the error 0x80080005 (Server execution failed ) when trying to initialize the server by CoCreateInstance. If I copy the COM server to %temp% manually instead of downloading it via internet then everything works as expected. I am suspecting that the downloaded EXE files have some special attributes that prevent it been loaded but have no idea how to figure it out.
Does anyone have the same experience or have any clue for this issue? Any suggests will be highly appreciated.
Joe
Yes they do. Start a command prompt and use DIR /R. You'll see the alternate data stream in the file. The one that says: "don't trust this file, it came from an untrusted source".
You can delete them with the filename:streamname syntax. Check if that's okay with your customer first. I don't know many that are thrilled about EXEs getting downloaded and bypassing normal security rulez.