Friday, July 24, 2009

Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL

Check whether the URL is accessible from your browser.

If yes, make sure that you have a proper crossdomain.xml in the server (where the web-service is hosted) and accessible by the URL http://your_server/crossdomain.xml.
Eg:
<cross-domain-policy>
    <site-control permitted-cross-domain-policies="master-only"/>
    <allow-access-from domain="*" to-ports="*"/>
    <allow-http-request-headers-from domain="*" headers="SOAPAction"/>
</cross-domain-policy>
[For details: http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html]

If yes, check your WSDL file format.

Wednesday, June 3, 2009

How to update flex builder 3 license key?

If you are using windows, delete the file %ALLUSERS%\Application Data\Adobe\Flex\license.properties and start your flex builder. It will ask you for the key. Give your new key. You are done!

Tuesday, June 2, 2009

PHP: try catch not working/exception is not catched

If the catch block in your code is not executed and you are getting error/warning message in the browser, it is an issue with the behavior of PHP. In php some errors/warnings are not exceptions.

You could convert all errors to exceptions by using the following in your code.

set_error_handler(create_function('$p1, $p2, $p3, $p4', 'throw new ErrorException($p2, 0, $p1, $p3, $p4);'), E_ALL);

PHP: odbc_longreadlen() corruption problem

You may need to configure max_execution_time, memory_limit and odbc.defaultlrl in the php.ini file according to your requirement.

Friday, May 29, 2009

SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]The FOR XML clause is not allowed in a CURSOR statement

If your sql query is something like
$sqlQuery = “select * from test for xml raw('MyItem'), elements, root('MyRoot')”;

As a work around you can wrap it inside another select statement.
$sqlQuery = "select (" . $sqlQuery . ")";

This query will return the record set containing only one row and one column and which will be your xml. You can get the xml by using odbc_result($queryResult,1);

If the xml is too big you may need to configure max_execution_time, memory_limit and odbc.defaultlrl in the php.ini file according to your requirement.

Tuesday, May 19, 2009

How to print out a variable’s value/message from a MySQL stored procedure?

You can use a simple select inside the stored procedure.

Example:

DELIMITER //

DROP PROCEDURE IF EXISTS printTest//

CREATE PROCEDURE printTest(myVar int)

BEGIN

IF myVar <> 0 THEN
SELECT myVar;
ELSE
SELECT 'Got 0';
END IF;

END//


DELIMITER ;

Monday, May 11, 2009

MySQL – Create Table – Difference between TYPE and ENGINE

The syntax 'TYPE' is deprecated and will be removed in MySQL 5.2. Please use 'ENGINE' instead.

Eg:
CREATE TABLE my_table
(
my_key INTEGER NOT NULL,
my_data VARCHAR(20) NOT NULL
PRIMARY KEY (my_key)
) ENGINE = INNODB;

How to get MySQL warnings?

Use ‘SHOW WARNINGS’ command.

Friday, April 3, 2009

Do new mobiles still need to be charged for 8 hours?

When I googled for this question, there were a lot of questions regarding this. The initial charging was required for the NiMH and NiCd batters but I believe that it is not required for the li-ion batters that we are using in our mobiles now a days.

The battery care section in the Nokia Europe site is not asking us to do an initial charging. Also the charging care section and the FAQ are not mentioning anything regarding an initial charging. Batteryuniversity.com is also not recommending an initial charging of 8 hours or 12 hours. So I suggest you to charge it until the phone show 'Battery Full'.

Thursday, April 2, 2009

How to create a virtual directory in JBoss? / How to host a page in JBoss?

Open the server.xml file (located at $JBOSS_HOME_DIR/server/default/deploy/jbossweb-tomcat55.sar).
Add <Context path=”/YourVirtualDir” docBase=”PathOfYourPhysicalDir”/> inside the <Host> tag.
You are done.

How to install JBoss?

Download jemsinstaller (jar file) and make sure that you have JDK in your machine. You can start installation by double clicking the jemsinstaller jar file or by giving the command 'java -jar ’ in your command-line. You can download JBoss in many different formats too but this is the easiest one to install if you are a beginner and you have a GUI in your machine. You can also install this jar file using the command-line ($ java -jar jems-installer-1.2.0.jar installscript.xml). Here you can specify the configuration options in the installerscript.xml. The GUI based installation will allow you to generate the installation script automatically in the installation completed panel. For a beginner I recommend to use the GUI based installation of JBoss once and then go for the more advanced command-line installation of JBoss. Once the installation is complete you try http://localhost:8080/ if you can see the test page, you are done with it.

Monday, March 30, 2009

Review - Nokia 5130 XpressMusic

I was very much confused when I bought this phone because of the comments and that is why I decided to give a review in my Blog. I am giving this review from my hands-own experience. This review is considering the price too.

Price: Rs.5949 ($119)

Look : 7/10
Sound (Speakers) : 8/10
Sound (Headset) : 6/10
Display : 8.5/10
Camera : 7/10
Restart problems in the last 3 days : 0
Hanging in the last 3 days : 0
Performance : 7/10
Features : 7.5/10
Games : 5/10
Themes : 5.5/10
Battery life : 7.5/10

My rating : 7/10

There are phones which will give you better experience, but there is no other phones available in India with in this price range (Considering Nokia, Samsung and Sony Ericsson).

If you are looking for a basic multimedia phone with camera and other reasonable features, then this is the right phone for you.

Friday, March 20, 2009

How to configure PHP in Apache (Windows)?

Add the following into your httpd.conf
(Note: Make sure that you have given the correct path in LoadModule)

LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Wednesday, March 18, 2009

Apache on Windows XP - failure on starting

Errors

[1] Could not reliably determine the server's fully qualified domain name
[2] (OS 10048) only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down

Solution


[1] Add/Modify directive - ServerName <Your IP>:<Your Port>
[2] Add/Modify directive - Listen 127.0.0.1:80

Now start apache. If still error [2] remains, change the port number and try.

Friday, March 13, 2009

How to disable maximizing an application window in Adobe AIR?

Set <maximizable>false</maximizable> in the application's XML file.

Monday, February 16, 2009

How to install an AIR application in Linux?

1. Make sure that you have installed Adobe AIR.
2. 'Adobe AIR Application Installer' to install your *.air file. Your *.air file will be opened used this by default.
3. If not, try 'sudo "Adobe AIR Application Installer"' and locate your *.air file from the popup window.

How to install AIR in Linux?

1. Download the AdobeAIRInstaller.bin from Adobe.
2. Give execute permission for the file.
3. run ./AdobeAIRInstaller.bin in your terminal.

Wednesday, February 4, 2009

Flex 3: Unable to transcode/Unable to resolve 'file' for transcoding.

Are you trying to embed something as shown?
[Embed(source="dirname/filename.ext")]
Then add a "/" in front of the path!
[Embed(source="/dirname/filename.ext")]

Windows XP: How to ungroup similler taskbar buttons?

You can enable or disable grouping from the taskbar properties.


Monday, February 2, 2009

SQL Server ODBC Connection Error

Are you getting the following error?

Connection failed:
SQL State:'01000'
SQL error Error:2
[Microsoft][ODBC Server Driver][Shared
Memory]ConnectionOpen(Connect())
Connection Failed:
SQL State:'08001'
SQL server Error:17
[Microsoft][ODBC Server Driver][Shared Memory]SQL Server does not
exist or access is denied

Very simple solution, give the correct servername (default is local).

For e.g. MYMACHINE\SQLEXPRESS