Archive
Using Webservices with Flex
But due to the Flash sandbox, there is a hurdle you have to jump, security wise, to access a webservice from Flash,
and it first shows it’s ugly head with this exception:
[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://www.freebiesms.co.uk/sendSMS.asmx?wsdl)"%5D
at mx.rpc.wsdl::WSDLLoader/faultHandler()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcwsdlWSDLLoader.as:98]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcAbstractInvoker.as:170]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcAbstractInvoker.as:225]
at mx.rpc::Responder/fault()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcResponder.as:53]
at mx.rpc::AsyncRequest/fault()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcAsyncRequest.as:103]
at DirectHTTPMessageResponder/securityErrorHandler()[C:autobuild3.2.0frameworksprojectsrpcsrcmxmessagingchannelsDirectHTTPChannel.as:389]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/redirectEvent()
Which, after hunting on the Net, showed me that I needed a crossdomain.xml file thus:
<cross-domain-policy>
<allow-access-from domain="*"/>
<allow-http-request-headers-from domain="*" headers="SOAPAction"/>
</cross-domain-policy>
– Oh, and I also found out that Webservice method names are case-sensitive, when I got this error:
[RPC Fault faultString="Couldn’t find method ‘sendSms’ in service." faultCode="Client.NoSuchMethod" faultDetail="null"]
at mx.rpc.soap::Operation/createFaultEvent()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcsoapOperation.as:978]
at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcsoapOperation.as:763]
at mx.rpc.soap::Operation/send()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcsoapOperation.as:693]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.rpc.soap.mxml::Operation/send()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcsoapmxmlOperation.as:170]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.rpc::AbstractService/http://www.adobe.com/2006/actionscript/flash/proxy::callProperty()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcAbstractService.as:290]
at FreebieSMS/click()[C:Documents and SettingsAdminMy DocumentsVisual Studio 2008ProjectsFreebieSMSFlexFreebieSMSFlexsrcFreebieSMS.as:31]
at FreebieSMSFlex/___FreebieSMSFlex_Button1_click()[C:Documents and SettingsAdminMy DocumentsVisual Studio 2008ProjectsFreebieSMSFlexFreebieSMSFlexsrcFreebieSMSFlex.mxml:4]
Using Code-behind with Flex
Installed Ensemble Tofino (With SDK)
This was my MXML file:
<?xml version="1.0" encoding="utf-8" ?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Button x="45" y="33" label="Say Hello!" click="HelloWorld.click(event)"/>
</mx:Application>
And the .AS file was:
package
{
import flash.events.Event;
import flash.events.MouseEvent;
import mx.controls.Alert;
public class HelloWorld
{
public static function click(event:MouseEvent)
{
Alert.show("This responded to an event from code-behind");
}
}
}
Ideally, The Application Class should inherit from HelloWorld, so that the click event could be protected rather than
static; so it should be modified as follows:
<?xml version="1.0" encoding="utf-8" ?>
<my:HelloWorld xmlns:my="*"
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Button x="45" y="33" label="Say Hello!" click="click(event)"/>
</my:HelloWorld>
and the AS file thus:
package
{
import flash.events.Event;
import flash.events.MouseEvent;
import mx.controls.Alert;
import mx.core.Application;
public class HelloWorld extends Application
{
protected function click(event:MouseEvent)
{
Alert.show("This responded to an event from code-behind");
}
}
}
Facebook App development
Freebie SMS Facebook App
Download link: Download Facebook App with source code in C#
Facebook link: Free SMS Facebook App
This is a Facebook App for sending free SMS messages to UK mobile phones,
It was created with the asp.net starter kit for C# 3.5. and can be downloaded from the links above
with full source code.
The only real departure from a standard asp.net page, is that it gets the ‘from name’ from the Facebook profile, like this:
protected string GetUserName()
{
try
{
facebook.Schema.user userinfo = Master.API.users.getInfo(Master.API.uid);
return userinfo.first_name;
}
catch
{
return "Someone";
}
}
Note, that the exception can be thrown on first load, before the user has accepted access to their own profile, hense
the try/catch
Setting up SQL server Azure
my feeling is to stay away from the CTP, but here’s my ‘walkthrough’
I got this email a few days ago:
Welcome to the SQL Azure CTP! We are excited to have you join us. Below are
some steps to get you started, as well as links to helpful resources.
Getting Started
1) Visit https://sql.azure.com
2) Sign in with a valid Windows LiveID
3) Enter your invitation code
Your invitation code is:
d329171f-c1fd-4060-862e-1a7f613ea8ce
4) Create your SQL Azure Server (and
databases)
So I stepped through the process, and set up an Azure database, then I found that I needed SQL server 2008 to connect to it,
I downloaded SQLManagementStudio_x86_ENU.exe from
http://www.microsoft.com/DownLoads/details.aspx?familyid=08E52AC2-1D62-45F6-9A4A-4B76A8564A2B&displaylang=en
During Install, said that I needed to reboot… when I had, so a work around was:
# Open Regedit
# Find the key "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manager"
# Rename the "PendingFileRenameOperations" value to "PendingFileRenameOperations2"
# Re-Run the checks
Downloaded powershell:
Uninstalled SQL server management studio express
Uninstalled Visual studio 2008
It then crashed with this error:
TITLE: SQL Server Setup failure.
——————————
SQL Server Setup has encountered the following error:
Unable to generate a temporary class (result=1).
error CS0006: Metadata file ‘C:WINDOWSassemblyGAC_MSILMSClusterLib1.0.0.0__89845dcd8080cc91MSClusterLib.dll’ could not be found
Error code 0x84B10001.
——————————
BUTTONS:
OK
——————————
Rebooted…
Deleted the PendingFileOperations Registry Key
Installed!
Tried to Connect:
ADO.NET:
Server=tcp:yitwxb6n0v.ctp.database.windows.net;Database=master;User ID=fiach;Password=myPassword;Trusted_Connection=False; Server=tcp:yitwxb6n0v.ctp.database.windows.net;Database=;User ID=fiach;Password=myPassword;Trusted_Connection=False; Copy to clipboard
ODBC:
Driver={SQL Server};Server=tcp:yitwxb6n0v.ctp.database.windows.net;Database=master;Uid=fiach;Pwd=myPassword; Driver={SQL Server};Server=tcp:yitwxb6n0v.ctp.database.windows.net;Database=;Uid=fiach;Pwd=myPassword; Copy to clipboard
OLE DB:
Provider=SQLNCLI10;Server=tcp:yitwxb6n0v.ctp.database.windows.net;Database=master;Uid=fiach;Pwd=myPasswor
TITLE: Connect to Server
——————————
Cannot connect to yitwxb6n0v.ctp.database.windows.net.
——————————
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
——————————
Invalid object name ‘sys.configurations’. (Microsoft SQL Server, Error: 208)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.9006&EvtSrc=MSSQLServer&EvtID=208&LinkId=20476
——————————
BUTTONS:
OK
——————————
Fixed using this post:
1. cancel out of the first connection dialog that pops up.
2. click on the New Query button from the toolbar (upper left)
3. entered
Server name: full servername
Login: just the username (no @…)
4. Under Options, Connect to Database, (type your database here)
5. Hit connect.
And I got in… after an hour.
Now to figure out how to copy the databases!
Changing the TTL value of a DNS record in Windows
Creating a virtual directory on Apache for Windows
Alias /db "D:sqldatabackups"
<Directory "D:sqldatabackups">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from localhost
Allow from all
</Directory>
Hope this helps
Migrating a classic ASP site from Windows to Linux
I had spare VPS server that I could use for the purpose.
First step to set up Apache on the Linux server,
/etc/apache2/sites-enabled/omadataobjects.com.conf
ServerAdmin webmaster@localhost
ServerAlias www.omadataobjects.com
DocumentRoot
/var/www/omadataobjects.com
</VirtualHost>
reload
The site was in ASP, was indexed in Google, with Page Rank, so I didn’t want to change the URLs, so I wanted to use mod_rewrite,
which I installed using Putty:
root@vps ~ # a2enmod rewrite
Module rewrite installed; run /etc/init.d/apache2 force-reload to enable.
root@vps ~ # /etc/init.d/apache2 force-reload
Forcing reload of web server (apache2)… waiting .
I then created a .htaccess file in the website root
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*).asp$ /$1.php [L,NC,R=301]
</IfModule>
Which rewrites all .asp requests to .php
I then changed the extension of all .asp files to .php,
and changed
<!–#include file="header.asp"–> to <?php include("header.php"); ?>
Oh, and I had a few glitches with case-sensitivity, which Windows is less strict about.
List of Software developers, Mashup.
WORKSLINE BV SOFTWARE VOOR WERKTUIGBOUW
A M S ADVANCED MANUFACTURING SOFTWARE S R L
IMATIC SOFTWARE Y SISTEMAS INFORMÁTICA S L
SOFTWARE DEVELOPMENTS INTERNATIONAL LTD
NATRON SOFTWARE MAINTENANCE LTD
Fischer Hans Josef Software Design
PRO MEDISOFT Software Systeme für das Gesundheitswesen GmbH Hotline
DHS Media Unterhaltungs Hard und Software GmbH Co
f s Computer und Software Vertriebs GmbH
ZWEITWERK software engineering GmbH
Innovative Software Design GmbH Beratung Design Entwicklung
S I G SOFTWARE Ingenieur GmbH Automatisierungstechnik
Doors GmbH Software Consulting
COMPUTER SOFTWARE ENGINERING SRL
Erste CRG Computer u Software Vertriebs GmbH
PANORAMA SOFTWARE INTERNATIONAL LTD
OPEN MARKET INTERNET SOFTWARE BV
Carano Software Entwicklungs GmbH
Integrierte Software Technologie Roggenhof GmbH
SOC Software Outsourcing Consulting GmbH
Voigt Software und Unternehmensberatung GmbH
VSS GmbH Vertrieb von Systemen und Software
hagosoft Industrie Software GmbH
PALMA SOFTWARE AND COMPUTING SAS
Akten James Software GmbH Petersen Firmengruppe Interclearing Petersensoftware
SOCON Software Consulting GmbH
ASPIA Automatisierte Software Produktion und Informatik Architektur GmbH Groeneveld
Wannemacher Software Service GmbH Wannemacher Software Servic GmbH
Transcom Computer Hard Software
DATALINE Gesellschaft für Hard u Software Systeme mbH
Software Engineering Klaus Thiehoff
TARGET Software Vertriebs GmbH
MK tec GmbH Software und Elektronik i G
L S ADVANCED SOFTWARE DI GIUGNO E VALENTI SNC
PATIDOK Clinical Software GmbH Patidok
STACKS CONSULTING E INGENIERIA EN SOFTWARE S L
intermedix Gesellschaft für medizinische Software mbH
Sternberg Software und Computersysteme GmbH
BCIS Hard Softwaren Leipzig GmbH BCIS Hard und Software Leipzig GmbH
Plus Data Hard u Software GmbH
CSCS Computer u Software Schnäkel
TESCOM Software Systems Testing GmbH
DETEC Decision Technology Software GmbH
Attica Software Computersystems bvba
Exact Software GmbH Exact Software GmbH Software Software
Greenlab Systems GmbH Gesellschaft für med Software
CAM Service Gesellschaft für Software und Automationstechnik mbH CAM Service mbH
SACO Software and Consulting GmbH
BOSS Branchen Organisation u Software Systeme GmbH
DIALOG SOFTWARE TELECOMMUNICATIONS SRL
4D Concepts Prototyping Software und Consulting GmbH
Blue Communications Software GmbH Blue Communications Software GmbH
ORTEC NV Computer printers en software
Interactive Software Federation of Europe
BRITTANIC SOFTWARE SERVICES LTD
ReNoFlex Computer Software GmbH Vertriebsbüro
SOFTWARE VISUAL DE SANTA CLARA S L
COMSULT COMPUTER SOFTWARE CONSULTANTS
TSE Thürnau Software Entwicklung GmbH
ESYS Gesellschaft für Elektronische Systemtechnik Hard u Software mbH
SOFTWARE MACHINES AND SYSTEM DI CICCONE LUCIO C S A S
ELCOTEC Gesellschaft für Software und Systemlösungen m b H
itCampus Software und Systemhaus
S A D Software Vertriebs und Produktions GmbH
TEGIS Software GmbH Softwaretechnik
Integrated Application Software
Ulybin Gesellschaft für Business und Software GmbH
SPEA SOFTWARE AKTIENGESELLSCHAFT
Laser Soft Hard und Software Vertriebs GmbH
PC PARTNER PLUS PPP Hard u Software GmbH
MIPROTEK Gesellschaft für Hard und Software Entwicklung GmbH
Bauer Partner Consulting und Software GmbH Region Deutschland Südost
multicom Software Entwicklung Dr Ruchert Co GmbH
Related Designs Software GmbH Related Design Software GmbH
BeO Gesellschaft für standard software support mbH
Heinsohn Andreas Heinsohn Computer Zubehör Software Werkstatt
SDS Software Mußhoff und Spohr GbR
VISUAL POINT SOFTWARE DI QUARANTA TIZIANO
SSW Software Support Winter GmbH
DESARROLLO E IMPLANTACION DE SOFTWARE S L
SHS GmbH Spezial Hardware Software
Zaremba Software Engineering GmbH Z S E
Weiß Elektronik u Software GmbH
SOFTWARE OF EXCELLENCE UNITED KINGDOM LTD
TRANS NATIONS SOFTWARE DI FRANCESCO PERNIOLA
betzemeier automotive software GmbH betzmeier
Bäurer Unternehmensberatung u Software GmbH
AWIDA SOFTWARE GmbH Softwareentwicklung
Saturn Electro Handelsgesellschaft mbH Software
SysTeam Handelssysteme Software GmbH
Elite Software Aps og Verner Kristensen
Objective Software GmbH Uwe Meyer
ISIS GmbH Ingenieurbüro für Software und integrierte Systemlösungen ISIS GmbH
Unicom Computerservice und Software GmbH
Körtner Muth GmbH Software Entwicklung
CS Software Computer und Software Beratungs GmbH
Sollist Individual Software GmbH Kock
Specken Detlef Win Service Hard u Software GmbH
EPLAN Software Service GmbH Co KG
Virtual X citement Software GmbH
Phönix Computer Software Service Schulung
Ixos Software Ixos Software Internation
TOTO BIT INFORMATICA SOFTWARE E SISTEMI SPA
Heineck Heineck Ulrich Thüringer Software Service
CUSH Gruppe Dresden Computer und Software Haus GmbH
Kraus Thorsten Kraus Hard u Software Verkauf
SSR Software Entwicklung Beratung GmbH
Prosoft Software Entwicklung mbH
RiskTrak Financial Software GmbH
COMPUTER APPARATUUR PLAN 5 SOFTWARE
SILK ROAD SOFTWARE ENTERPRISE BV
SOFTWARE TEAM SRL TECNOLOGIE INFORMATICHE AVANZATE
