Ozzie.eu

Love to code, although it bugs me.

Network adapter disappears on Windows 7

No comments
I had a most unusual problem after updating my laptop to Windows 7. The purpose of a laptop is really to move around so I usually take it from my workplace and use it at home, carrying it back on the next day.

I found out that, whenever I booted up the machine before plugging the network cable in, my network adapter vanished from the notification area as well as the Network and Sharing Center. A reboot, with the cable already plugged in, solved this little annoyance.

But, sometimes, the problem has it source between the computer and the chair. I was not aware of a nice feature on Power Management that allows the computer to turn off a device to save power.



So I just had to take the check off the turning off option and the situation ceased to occur. Maybe someday I'll put it back on ;)

No comments :

Post a Comment

Posting a SOAP command from the command line on Linux

1 comment
Having to work with servers, which connect to external systems via private networks, one must face the difficulty of having to test Web services without having direct access to the endpoint of them. Given that, and adding the Linux operating system, one could find himself in a jam.

There is a command I use often to perform simple connectivity tests, like getting the WSDL. It's called "wget". You just type "wget http://someurl/endpoint" and an HTTP request to that URL is sent and the response is captured ans saved to file.

Nevertheless, one might be able to connect to the remote server, but what id you want to check if the service is really working? Otherwise you'll never know if an error is caused by your end of the stick.

To post a SOAP request to a remote Web server, the recipe is simple:

  1. Build a sample SOAP request and save it on a text file, maybe called "soap.txt"

  2. To send the request to the remote server type the following command:


 



curl -H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction:" \
-d @soap.txt -X POST
http://someurl

That's it! 



curl -H "Content-Type: text/xml; charset=utf-8" \

-H "SOAPAction:" \

-d @pedidoSOAP.txt \

-X POST

 

1 comment :

Post a Comment

IE8 crashes on Windows Update

No comments
Trying to automatically update my Windows XP, I got a crash from my browser, every single time, while trying to install the automatic updates ActiveX control.

The solution is to go to: Tools / Internet Options / Advanced / Security. Take the check off the "Enable memory protection to help mitigate online attacks" option.

No comments :

Post a Comment

Netbeans, JSF and Oracle Datasource

No comments
I've been fiddling with Netbeans 6.5 and Java EE 5 in order to keep up to date with some of the trends in web development on a JEE architecture. When trying to perform a tutorial on the Netbeans DVD Starter Kit, with JSF and Data bounded controls and I found myself having a problem.

I followed the tutorial's steps (enumerated below, give or take a step):

  1. Add the database connection to the IDE

  2. Create a new project for a JSF Web Application

  3. Add a Drop-down control from the Woodstock control palette

  4. Add a property attribute for the control

  5. Drag & drop the the database table onto the control to perform the data binding

  6. Configure the Key/Value field on the drop-down


Executing the above using the JavaDB samples bundled with the IDE performed surprisingly OK, right on the first compilation and execution. However, when I performed the above steps for a neat Oracle 11g database, the Cached Row Set did not work properly and the data binding window did not display the fields available.

Searching on the Web, I found this page about Netbeans and JDBC drivers. So my first lead was the JDBC driver. I changed the driver to be used and reconfigured the connection (I was using JDBC4 and changed it to JDBC3). Tried it and still no luck.

I copied the referred jdbc url to the Service Tab on Netbeans and established the connection. But It still did not work. But something told me it should be the connection string, so I checked the web.xml file for the application and it pointed to lookups on a resource file. I edited the resource file and found the problem: the changes made on the services tab are not refactored on the application.

In conclusion, I edited the resource file, saved it and the second time around the data bind operation worked perfectly!

Nevertheless, I made an identical page using JSTL and the performance was much better. I found that JSF carries some overhead, undesired when performance is essencial.

No comments :

Post a Comment

Getting Foreign Keys on Oracle

No comments
When maintaining a live system, sometimes one must undo a committed transaction on the database. In other words, delete some records and their trails.

A difficulty that sometimes arises on complex relational models, with cascade deletion disabled, is to find out what records on other data tables are pointing to the ones I want to erase.

On Oracle, to find out which tables have a foreign key that points to the primary key of the records we want to delete, one just issue the command:

select * from ALL_CONSTRAINTS where R_CONSTRAINT_NAME = '[Your PK constraint name]'

This statement returns as a result the tables that have a foreign key constraint pointing to the targeted table's primary key.

No comments :

Post a Comment