Search This Blog

Tuesday, June 24, 2008

Consume Web-Services from C++

gSOAP is a cross-platform development toolkit for C and C++ SOAP XML Web services (SOAP1.1/1.2,WSDL1.1). gSOAP supports XML serialization of native C/C++ data types. Includes SOAP/XML engine, Web server, stub/skeleton compiler, WSDL tools, and much more.

download gSOAP Toolkit latest version OR visit gSOAP page for complete info.

If you will follow the next link you will find a step by step demo to consume j2ee WS, this demo on Windows via VC++ .Use gSOAP to consume J2EE Web services created by WSAD through HTTP and HTTPS

Monday, June 23, 2008

Understanding Malicious Content Mitigation for Web Developers

Web pages contain both text and HTML markup that is generated by the server and interpreted by the client browser. Servers that generate static pages have full control over how the client will interpret the pages sent by the server. However, servers that generate dynamic pages do not have complete control over how their output is interpreted by the client. The heart of the issue is that if untrusted content can be introduced into a dynamic page, neither the server nor the client has enough information to recognize that this has happened and take protective actions.

you can find the complete article and solutions HERE

Thursday, June 19, 2008

Java stored procedure in Oracle

I found out a very nice way to write your own Java code and run it as a stored procedure in oracle database, I play with it, and I understand how strong this way to find out a simple solution to a complex problem, for example my issue was to find a way to call to a COBOL program that runs on SUN box, via C++ on windows.
So I ask the COBOL developer to create a shell script in SUN to activate his COBOL program, and I created a JAVA class that runs as a Stored procedure and activate this script , and get the result from the stdoutput .
The C++ developers only needs to call to the stored procedure, and we are there.
BTW - the Oracle and my scripts file are on the same server.

A very good example how to do it , you can find here
An Introduction to Java Stored Modules in Oracle
and here
Shell Commands From PL/SQL
Last one - > another Step by step article and Demo
Java Stored Procedure in Oracle, Database Interaction
Enjoy

Show computers network

if you like to see all yours computers network you can run the next command in a dos command window.

net view

The net command is used to update, fix, or view the network or network settings.
for more information and syntax samples go to here Microsoft DOS net command

Friday, June 13, 2008

URL Mapping in asp.net

Defines a mapping that hides the real URL and maps it to a more user-friendly URL.
this is very easy to implement in asp.net 2.0, just add to your web.config file the urlMappings tag.
i.e.
<urlmappings enabled="true">
<add url="~/Home.aspx" mappedurl="~/Default.aspx?tab=home" >
</urlmappings>

Thursday, June 12, 2008

Web developer site

very nice site for code + articles + tools for c#,mysql,PHP ,asp.net and more
Edward Tanguay's Web Developer Site

MQ message length

In one of our project we had a problem, that you people should be aware of it.
The problem is :
An error message that we get from the MQ server, while trying to send/put a large XML data.
When I said large I mean bigger than 4M bytes .
i made some investigation here and i found out that there is a limit of the maximum message length (MAXMSGL) that
you can put in the Queue.


The MAXMSGL parameter appears in three places:
In the Channel level -> specifies the maximum length of a message that can be transmitted on the channel, in bytes.
In the Queue Manger level -> Maximum message length in bytes.
In the Queues level - as above.
The default in all the above places is – 4194304 bytes that’s 4M bytes.

To solve this limit I suggest to:
set the MAXMSGL parameter in the channel level to Zero (0) ,
That’s mean that maximum message length will be taken from the Queue Manger.

Increase the MAXMSGL parameter in the Queue Manger level .
"On AIX, Compaq NonStop Kernel, Compaq OpenVMS Alpha, HP-UX, z/OS, OS/2, OS/400, Solaris,
Windows, plus WebSphere MQ clients connected to these systems, the maximum message length is 100 MB (104 857 600 bytes)."

How to increase it ?
You can do it very easily from WebSphere MQ explorer, right click on the channel OR Queue manager -> properties
In the Extended Tab look for the "maximum message length" parameter and make the change there.

From the command line ( on all platform ):
runmqsc QM_MGR_1

ALTER QMGR MAXMSGL (10485760) // i.e set it to 10M bytes

ALTER CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN) MAXMSGL(0)

ALTER QLOCAL(YANIVIN) MAXMSGL(10485760)

END

notes:
DO NOT FORGET TO CHANGE YOUR SOURCE CODE IF NEEDED.
set the MaximumMessageLength on the channel too, so the actull size will get from the Queue manager.

m_Channel.setMaximumMessageLength(0);

I hope you will find this information useful for your project.
enjoy
Yaniv Tzanany

Wednesday, June 11, 2008

TECH-ED 2008 צפה בהקלטות של ההרצאות

צפה בהקלטות מכנס מיקרוסופט האחרון
http://www.microsoft.com/israel/techedevent/list.aspx

Find open ports on linux

if you want to see your open ports on linux - the next command can help you.
Find specific port :
netstat -a grep [port no] (i.e. netstat -a grep 7071)
OR
netstat -pln

find program that listening on specific port :
netstat -anp grep [port no]

Tuesday, June 10, 2008

Weblogic connection pooling - jdbc configuration

Using oracle OCI driver is faster than the thin .
Oracle OCI works well with the CLOB / BLOB.
The query test impact performance on Oracle 9x , the "select from DUAL" – affect performance . on oracle 10 the problem fixed .

The queries from Oracle DUAL table are very common.
As of the v$SQLAREA each query uses about 5 logical reads.
In order to wrap-up the pace of retrieving data please use X$DUAL instead of using the DUAL table.

Below is a prescription on the way to implement it and fix this issue on oracle 9x:

sqlplus /nolog
connect / as sysdba
create view dual_view as select dummy from x$dual;
grant select on dual_view to public;
rename dual to dual_table;
rename dual_view to dual;

exit