Search This Blog

Wednesday, July 6, 2011

Xerces Serialize XML data and encoding

the next code works fine on Xerces 2.6 - helper function to convert bytes  to utf8 format.

void convertToUTF8(const XMLCh* buffer, CString &utf8_string)
{
XMLTranscoder* utf8Transcoder;
XMLTransService::Codes failReason;
utf8Transcoder = XMLPlatformUtils::fgTransService->makeNewTranscoderFor("UTF-8", failReason, 16*1024);
size_t len = XMLString::stringLen(buffer);
XMLByte* utf8 = new XMLByte[(len*MB_LEN_MAX)+1];
unsigned int eaten;
unsigned int utf8Len = utf8Transcoder->transcodeTo((buffer), len, utf8, len*MB_LEN_MAX, eaten, XMLTranscoder::UnRep_Throw);
utf8[utf8Len] = '\0';
utf8_string = (char*)utf8;
delete[] utf8;
delete utf8Transcoder;
}
good article 
Serialize XML data

Thursday, June 23, 2011

SAVING CHANGES IS NOT PERMITTED - SQL Server Management Studio

if you get such error on every table changes:
Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.

on the  Management Studio -> go to Tools -> Options then go to the Designer Page and uncheck "Prevent saving changes that require table re-creation".

thats all
Yaniv tzanany

Sunday, June 5, 2011

WebSphere MQ Queue Load / Unload Utility

here you can find a very good utility from IBM to use with MQ product.
Possible Uses:
• To save the messages that are on a queue, to a file, perhaps for archiving purposes and the possibility of later reload back onto a queue.
• To reload a queue with messages you previously saved to a file.
• To remove messages from a queue which are old.
• To ‘replay’ test messages from a stored location – even maintaining time spacing if required.

IBM MO03: WebSphere MQ Queue Load / Unload Utility -
United States

enjoy
Yaniv Tzanany

Tuesday, May 31, 2011

WebSphere "IBM End user tried to act as a CA"

When i tried to access a secured web services i get the next error:

org.apache.axis2.AxisFault: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: End user tried to act as a CA
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:83)
at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)


the CA in this case is Entrust company.
after some hours , i found the next article that helped me to solved it out , and this way i understood i am not alone here.
the fix is described here:
IBM End user tried to act as a CA - United States.
summery:
update the java.security file , set the
ssl.TrustManagerFactory.algorithm to use IbmPKIX insteaf of IbmX509 .

this article gave me the clue that its somthing with entrust CA as well

and restart your server.
enjoy
Yaniv Tzanany


Saturday, May 28, 2011

Facebook Likes Analyzer App for iPhone

A new and exciting way to browse Facebook has just hit the AppStore - The Facebook
Likes Analyzer App for your iPhone. Using this Appyou will be able to see All the
Pages you Like’d on Facebook, will let you Un-Like them in case you did not mean to
Like them and also will show you What you friends’ Likes are… this way you may also
Like those new Pages.

Facebook Likes Analyzer for iPhone is more comprehensive than just Facebook Pages,
it actually can act as a better way to browse Topics on a Facebook, by going directly to
the Page you Like, and browse through it with no interference of irrelevant stories that
appear on a regular Facebook wall !

With Facebook Likes Analyzer you can be sure to stay on top of the stories in facebook
that you are interested in, instead on relaying on facebook to feed you with what they
believe are the stories you’d be interested in, just take a look at the picture here, you can
go directly to CNN and update on the hot upcoming stories, then switch to Hulu to check
what is new with your favorite TV-Show or movies.

There are new features that are planned and will be released to this App, such as
comparing your Likes to your friends’ Likes and push notifications on friends changing
their Likes.

You can download Facebook Likes Analyzer using the follwing link:
http://itunes.apple.com/app/facebook-likes-analyzer/id438038912

Tuesday, May 17, 2011

ORACLE locks report script

the next script works on oracle 11g , report on all DB locks.


select s.osuser "O/S-User", s.username "Ora-User",s.sid "Session-ID",s.serial# "Serial",
s.process "Process-ID", s.status "Status",l.name "Obj_Locked",l.mode_held "Lock_Mode",
t.used_ublk "Left undo block"
from v$session s,dba_dml_locks l,v$process p,v$transaction t
 where l.session_id = s.sid and p.addr = s.paddr

Yaniv Tzanany

Tuesday, May 3, 2011

IBM Recommended values for Web server plug-in config

Recently i solved a problem when making a call to a Websphere that took about 70 seconds to response.
The client get web service invocation error after 60 seconds.
we try to find out where such parameter is set , because its obvious that someone is dropping our client connection ( its very long time but at least get the client be happy its worked), i found such parameter in the server http plug -in config file , the parameter is :

ServerIOTimeout means "how long should the plug-in wait for a response from the application". and its was set to 60 seconds , i increase it to 120 seconds.
now i need to find out why its take 70 seconds...................

the next link is the recommended values for such plug in with explanation.
IBM Recommended values for Web server plug-in config - United States

enjoy
Yaniv Tzanany