tag:blogger.com,1999:blog-32757352024-02-20T13:58:37.076-05:00VismiTmeans Amaze (विस्मित).Unknownnoreply@blogger.comBlogger219125tag:blogger.com,1999:blog-3275735.post-87544270018341034272016-02-27T12:19:00.002-05:002016-02-27T14:58:24.727-05:00People's Capacity to Dwell on their history<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #141823; line-height: 19.32px; margin-bottom: 6px;">
<span style="font-family: inherit;">No matter what its failures and what may be in future, government can be the place where people come together, where no one gets left behind, no one. It is an instrument of good.... just good.</span></div>
<div style="background-color: white; color: #141823; display: inline; line-height: 19.32px; margin-top: 6px;">
<span style="font-family: inherit;">Makes me think, rather bothers me a lot what others think of government. People have phenomenal capacity, they may not know until it is the time. Them coming together may be the greatest assembly of human capacity of ambition, what sets them apart is their judgement on what matters to their heart and that decides their destiny as a nation. There is always time where they dwell frivolous try to correct it instead of accepting it. This kind of capacity is always better used shaping future while learning from past.</span></div>
<div>
<div style="background-color: white; color: #141823; display: inline; line-height: 19.32px; margin-top: 6px;">
<span style="font-family: inherit;"><br /></span></div>
</div>
<div style="text-align: left;">
<span style="font-family: inherit; font-size: x-small;">- Citing quote from Toby Ziegler on The West Wing. </span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-62119126234742936832013-02-10T10:12:00.000-05:002013-02-10T10:12:22.480-05:00Twitter Web Application in Minutes<div dir="ltr" style="text-align: left;" trbidi="on">
I had been looking for creating and posting tweets to my twitter account for a long time. I found a good <a href="http://dotnetguts.blogspot.com/2010/05/tweet-posting-from-aspnet-using-oauth.html" target="_blank">example </a>... considering I did not want to invest too much of time in creating/researching something like this.<br />
<br />
<br />
<br />
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-62431152547326224062011-01-21T10:08:00.001-05:002011-01-21T10:08:15.530-05:00Internet Explorer Upgrade and Lotus Notes Sametime<p>Recently I did upgrade my Internet Explorer to 8 Release. The IE is great, but I never imagined how bad the effect would be on Sametime. </p> <p>Another discovery after that, Sametime is directly dependent on your default browser for rendering the chat sessions into a window. It showed a very weird behavior of not able to wrap long chat lines in the sessions. So horizontal scroll shows up for those long chat lines. The chat sessions became more and more annoying if I have to read it with scroll over a scroll (I blame it on people who like to write essays in Chat windows).</p> <p>I found a link at IBM site which need you to modify a CSS file under notes folder and it sets up everything.</p> <p><a title="http://www-10.lotus.com/ldd/stforum.nsf/DateAllFlatWeb/e0487e6064116620852575860076c1cc?OpenDocument" href="http://www-10.lotus.com/ldd/stforum.nsf/DateAllFlatWeb/e0487e6064116620852575860076c1cc?OpenDocument">http://www-10.lotus.com/ldd/stforum.nsf/DateAllFlatWeb/e0487e6064116620852575860076c1cc?OpenDocument</a></p> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-72524012324188786932010-10-23T19:50:00.001-05:002010-10-23T19:50:51.019-05:00VMware Workstation and Multi-Core processors<p>Recently when upgraded to my new dual core laptop, all my development guests started freezing for a few seconds are random intervals of few seconds. As impatient as I am when developing, it was very annoying to wait till it resumes. Tried a lot of fruitless searches on Google and led me to start rebuilds on Virtual PC. The rebuild was really pain because of enormous time it takes to install the OS and then excruciating time taken to install all software and data migration. </p> <p>Finally thanks to <a href="http://code-journey.com/2009/07/01/host-and-virtual-machine-hangs-pauses-stops-periodically-in-vmware-workstation/">Code Journey’s blog post</a>, it is quite simple solution to make. </p> <blockquote> <p>It could be because of the fact that if the computer is dual core and the virtual machine is set to use both cores, then BOTH cores must be available every time CPU is needed by the guest. This might be the problem for some, and setting VMware to use 1 CPU core for clients may help, but for me it did not.</p> <p>Add following line to your .vmx file. <br /><strong>mainmem.useNamedFile = false</strong></p> <p>The pauses should stopped now, and it does not matter if you use 1 or 2 cores on clients.</p> </blockquote> <p>Anyways, however it did, thanks Code Journey. </p> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-36359311822330086062010-10-14T07:48:00.001-05:002010-10-14T07:48:52.603-05:00Software Architect – Best job of 2010?<p>Software architect named top on the best job of 2010. Surprisingly it was missing in earlier year’s listings, does it also mean that this is newly created “Job” in 2010? I am also a Software Architect in a fortune 500 company. I love my job but I would not necessarily put that on top of the list.  </p> <p>I can say the description matches with what is listed, but their job does end at creating blue prints, sometimes it is important to write code also, unlike building architects, they don’t put brinks together, do they? Software architects do. It is usually said that architects don’t have to know the technology, but it is seldom practiced, they are also humans, they have their preferences for technologies. Technology agnostic architectures are very likely to be modified when it comes to design and develop those. </p> <blockquote> <h3><a href="http://money.cnn.com/magazines/moneymag/bestjobs/2010/index.html">BEST JOBS IN AMERICA</a></h3> <h4><a href="http://money.cnn.com/magazines/moneymag/bestjobs/2010/index.html">Money/Payscale.com's list of great careers</a></h4> <h3>1. Software Architect</h3> <p><img style="display: inline" alt="Software Architect" align="right" src="http://i2.cdn.turner.com/money/.element/img/1.0/sections/mag/moneymag/bestjobs/2010/snapshot/001_david_chaiken_david_lauridsen.jpg" width="181" height="240" /></p> <p>Chaiken, a software engineer for more than two decades, relishes the more collaborative work. </p> <p><b>Top 100 rank:</b> 1 <br /><b>Sector:</b> Information Technology </p> <p><b>What they do:</b> Like architects who design buildings, they create the blueprints for software engineers to follow -- and pitch in with programming too. Plus, architects are often called on to work with customers and product managers, and they serve as a link between a company's tech and business staffs. </p> <p><b>What's to like:</b> The job is creatively challenging, and engineers with good people skills are liberated from their screens. Salaries are generally higher than for programmers, and a typical day has more variety. </p> <p>"Some days I'll focus on product strategy, and other days I'll be coding down in the guts of the system," says David Chaiken, 46, of Yahoo in Sunnyvale, Calif., whose current projects include helping the web giant customize content for its 600 million users. Even though programming jobs are moving overseas, the face-to-face aspect of this position helps cement local demand.</p> <p><b>What's not to like:</b> You are often outside the management chain of command, making it hard to get things done. </p> <p><b>Requirements:</b> Bachelor's degree, and either a master's or considerable work experience to demonstrate your ability to design software and work collaboratively.</p> </blockquote> <p><a href="http://money.cnn.com/magazines/moneymag/bestjobs/2010/snapshots/1.html">Best Jobs in America 2010 - Top 100: Software Architect - Money Magazine on CNNMoney.com</a></p> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-18959922287139414132010-07-31T00:02:00.001-05:002010-07-31T00:06:05.552-05:00Project Codename<p>Recently a very interesting project came my way and making headway thru its architecture and design now. The project is making me think more than ever, surprisingly not about the use cases as much as name for the project.  We picked the concept several times before but was dropped due to politics, financials etc etc. Somehow I feel this is it… we are making it. </p> <blockquote> <p>Here now comes the important question, what do we name it? </p> <ol> <li>Microsoft has very exciting tradition for naming their pre-production releases with a <a href="http://en.wikipedia.org/wiki/List_of_Microsoft_codenames">codename based on places</a></li> <li>Apple names their <a href="http://en.wikipedia.org/wiki/Apple_OSX#Versions">OS as cats</a></li> <li>Firefox as <a href="http://en.wikipedia.org/wiki/History_of_Mozilla_Firefox#Release_history">Nature parks</a></li> <li>Open source projects have weirdest traditions of naming the projects, not yet figured out yet.</li> <li>O’Reilly has chosen their book covers as <a href="http://oreilly.com/animals.html">animal kingdom</a> </li> <li>Microsoft press chose the toolbox. </li> <li>webMethods uses product line major versions by alphabetically. </li> </ol> <p>Longhorn, Leopard, Indigo, Poseidon, Gran Paradiso, Yukon, SharpFreedom, Supertanga, Revolution, Lightning, Lambrate, Orcas, Q98, Fiji, Pendolino, McKinley, there is <a href="http://codeclimber.net.nz/archive/2007/02/07/Codename-your-releases.aspx">absolutely nothing in common</a>. </p> </blockquote> <p>We need to have some fun with the project, pick a mythology and name the components. It is very monotonous to use very overused acronyms that make you feel geeky. Nothing makes sense anymore, use of boring version numbers is monotonous and dry. There may be a need to use these names in pre-release discussions, can be used in namespaces where needed in codebase, naming the codebase with the mythical project name. There are several reasons to name the project with the name that attracts the team.</p> <p>Still wondering what should be the name of my project? </p> Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-3275735.post-58589275045319420082010-06-12T11:25:00.003-05:002010-06-13T20:06:32.450-05:00This time for Africa.... eh eh<object height="385" width="640"><param name="movie" value="http://www.youtube.com/v/-qmB4ZZF_uA&hl=en_US&fs=1&rel=0">
</param>
<param name="allowFullScreen" value="true">
</param>
<param name="allowscriptaccess" value="always">
</param>
<embed src="http://www.youtube.com/v/-qmB4ZZF_uA&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object><br />
<br />
<br />
<blockquote>
You're a good soldier<br />
Choosing your battles<br />
Pick yourself up<br />
And dust yourself off<br />
And back in the saddle<br />
<br />
You're on the frontline<br />
Everyone's watching<br />
You know it's serious<br />
We're getting closer<br />
This isnt over<br />
<br />
The pressure is on<br />
You feel it<br />
But you've got it all<br />
Believe it<br />
<br />
When you fall get up<br />
Oh oh...<br />
And if you fall get up<br />
Oh oh...<br />
<br />
Tsamina mina<br />
Zangalewa<br />
Cuz this is Africa<br />
<br />
Tsamina mina eh eh<br />
Waka Waka eh eh<br />
<br />
Tsamina mina zangalewa<br />
Anawa aa<br />
This time for Africa<br />
<br />Listen to your god<br />This is our motto<br />
Your time to shine<br />
Dont wait in line<br />
Y vamos por Todo<br />
<br />
People are raising<br />
Their Expectations<br />
Go on and feed them<br />
This is your moment<br />
No hesitations<br />
<br />
Today's your day<br />
I feel it<br />
You paved the way<br />
Believe it<br />
<br />
If you get down<br />
Get up Oh oh...<br />
When you get down<br />
Get up eh eh...<br />
<br />
Tsamina mina zangalewa<br />
Anawa aa<br />
This time for Africa<br />
<br />
Tsamina mina eh eh<br />
Waka Waka eh eh<br />
<br />
Tsamina mina zangalewa<br />
Anawa aa<br />
<br />
Tsamina mina eh eh<br />
Waka Waka eh eh<br />
Tsamina mina zangalewa<br />
This time for Africa</blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-88292850812892830152009-12-09T10:47:00.001-05:002009-12-09T10:47:23.395-05:00Windows desktop Search : Add-in for Lotus Notes<p>Isn't it cool? </p> <p>The Windows Desktop Search Add-in for Lotus Notes is a protocol handler that allows you to index the content of Lotus Notes e-mail, contacts, calendar items, and journal items stored on your computer. <br />Once you have installed this Add-in, Windows Desktop Search (WDS) will index the content of your locally stored Lotus Notes databases. Indexing will occur when your PC is idle, or when you tell WDS to ‘Index Now’. Once the index is updated you can immediately search your Lotus Notes content. </p> <p>Download it from here...  <a title="http://www.microsoft.com/downloads/details.aspx?FamilyId=AC768E36-BE57-4306-966C-5089B0C4D50E&displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=AC768E36-BE57-4306-966C-5089B0C4D50E&displaylang=en" target="_blank">Microsoft Download Site</a></p> <p> </p> <p>Baware though, it caused problems for me, I was continuously getting these. </p> <blockquote> <p><em>Error: 'Windows cannot find 'Notes:///8525666600461713' occurs when attempting to open bookmarks in Notes</em> <br />When users click local bookmarks on the left sidebar in Notes® 8 Standard Configuration, an error message displays indicating an operating system error and that "Windows cannot find" the file. This does not occur when using Notes 8 Basic Configuration. <br /> <br />Solution: Uninstall the plug-in and install it with latest version of Windows Search.</p> </blockquote> <p> </p> <p> </p> <p>Good Luck!!</p> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-58987481716512371902009-12-02T13:10:00.009-05:002009-12-06T18:53:25.669-05:00Weird ways to save our planet<p>I agree that there is growing need to save our planet. Global Warming is another major trouble next generation will face. But reading these weird ways to save our earth is just weirdest things I have ever heard.</p> <blockquote> <p> </p> <h3><a href="http://money.cnn.com/galleries/2009/news/0911/gallery.geoengineer/index.html">8 weird ways to save the Earth</a></h3> <h4>Geoengineering, or deliberately tinkering with the earth's climate, could help if global warming proves disastrous for mankind, but the ideas are untested and the risks unknown.</h4> via: cnn.com <p> </p> </blockquote> <p>Every idea evolution starts with some weirdness in the beginning. Nobody ever thought about reality in Wireless Electricity (WiTricity) to illuminate a room without any wiring, guess what? it is coming to market hopefully next year. So I am amazed with thinking the scientist have put together to gather alternate ways for saving our planet. </p> <p>There are several ways to reduce the green house effect, viz, "Reducing emission of green house gas", "Plant trees", "Conserve Energy and Water", and on and on... There is no alternatives to these everyday solutions, but they require a lot of awareness especially in developing and underdeveloped countries like India and China which are achieving their GDP growth at the cost of our planet. Till the awareness and their growth is achieved, it will be futile to get the everyday solutions are implemented and addressed. So these alternatives will boost the plan for saving the planet. Agreed, they are weird solutions, but they are not implemented yet, it will be a while before the real one strikes and get the venture capitalists lock on it. This is just the beginning, there will  be a lot more such ideas to come.</p> <p>I saw the MasterCard Advertisement about "Helping your dad to be a better man"... priceless. The target audience for awareness is changing now, there are more kids who are climate change aware than before. The environmentalists are finding newer ways to make people aware. </p> <p><embed src="http://www.youtube.com/v/f7slI8vQoW0&hl=en_US&fs=1&" width="320" height="265" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" /></p> <p> </p> <p>Being a father I hate this advertisement, but this is the most innovative way I have seen to make people aware. I guess they are the ones who are going to face it, I will be long gone before that, but I just don't want them to curse us for what we have done... or how we did not do anything to save this beautiful planet...</p> <div class="wlWriterSmartContent" id="scid:32a77b7a-5ea4-47be-84fc-ff7471384e10:85af50d4-41d9-4f1e-90e1-c8dd3883cf38" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"><a href="http://money.cnn.com/galleries/2009/news/0911/gallery.geoengineer/index.html"><img src="file:///" border="1px" /></a></div> Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-3275735.post-28924790855901043052009-04-17T15:02:00.004-05:002009-12-05T23:14:48.839-05:00CICS Web Services Assistant for Windows<p>As we know, web services are reached to mainframes also. The best way to enable any CICS program (except assembler) via web services is to use Rational Application Developer for System Z. I would say that is the best and also the most expensive way to create WS on mainframe. You can use <a href="http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=/com.ibm.cics.ts31.doc/dfhws/concepts/dfhws_utility.htm" target="_blank">CICS Web Services Assistant</a> to do that. Usually the license of RAD4Z is very expensive, so if you only need to create webservices artifacts, use CICS WS assistant. </p> <p>You need to first download the CICS WS A from <a href="http://www-1.ibm.com/support/docview.wss?rs=1083&context=SSGMGV&uid=swg24011253" target="_blank">here</a>, importantly check the documentation that it comes with. Apart from that you need to download <a href="http://www-03.ibm.com/servers/eserver/zseries/software/java/products/jrio/overview.html" target="_blank">Java Record I/O for OS/390</a>. You can both these from your CICS/USS installation on mainframe. Later I found out that, DFHLWS2WS batch program invokes the java classes one after the other to create Web services. Using JRIO, you can read the VSAM datasets (KSDS), system catalogs, I am still not sure why do we need this for running the Windows assistant. I would suggest reading this <a href="http://www-03.ibm.com/servers/eserver/zseries/software/java/products/jrio/vajava.html" target="_blank">overview</a> for more details.</p> <p>Using the assistant you can create both approaches </p> <ol> <li>Top down approach - WSDL to CICS program - WS2LS</li> <li>Bottom up approach - CICS program to WSDL - LS2WS</li> </ol> <p><strong>First things first</strong></p> <ol> <li>I created a utility class which will read from a properties file with the string/constant values that are needed. </li> <li>I downloaded the copybook for the CICS program that needs to be enabled via Web services. </li> <li>You may want to separate the input and output as two different copybooks. </li> <li>Read thru the sample code for more documentation. </li> </ol> <pre><font face="Trebuchet MS"><strong>Initialize<br /></strong></font></pre>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb"><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 1: <span style="color: #008000">// Decide your defaults.</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 2: <span style="color: #008000">// Here is the target program name</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 3: <span style="color: #0000ff">public</span> <span style="color: #0000ff">final</span> String PARAM_PROGRAM_NAME = Utility.getProperty("<span style="color: #8b0000">PARAM_PROGRAM_NAME</span>", "<span style="color: #8b0000">FIRSTCICS</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 4: <span style="color: #008000">// Is the target program looking for perticular container name in</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 5: <span style="color: #008000">// default channel? Default container name is "DFHWS-DATA"</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 6: <span style="color: #0000ff">public</span> <span style="color: #0000ff">final</span> String PARAM_CONTAINER_NAME = Utility.getProperty("<span style="color: #8b0000">PARAM_CONTAINER_NAME</span>", "<span style="color: #8b0000">DFHWS-DATA</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 7: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 8: * You need to provide Cobol mapping level that is used in copybooks.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 9: * This is important because some mappings are not supported by certain
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 10: * version of CICS WS.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 11: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 12: <span style="color: #0000ff">public</span> <span style="color: #0000ff">final</span> String PARAM_MAPPING_LEVEL = Utility.getProperty("<span style="color: #8b0000">PARAM_MAPPING_LEVEL</span>", "<span style="color: #8b0000">2.0</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 13: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 14: * If you have preference for namespaces for the WSDL, you can specify
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 15: * that here. Usually, the auto generated Java/C# classes has reveresed
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 16: * package/namespace hierarchy. Like when you say com.test.myCo the
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 17: * namespace in Java will look like myCo.test.com. This is the reason I
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 18: * wrote it reversed. This helps if you plan to import the generated
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 19: * WSDL into JAX-WS or Axis based tool. Specify namespaces for request
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 20: * and response.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 21: *
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 22: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 23: <span style="color: #0000ff">public</span> String PARAM_REQUEST_NAMESPACE_MF = Utility.getProperty("<span style="color: #8b0000">PARAM_REQUEST_NAMESPACE_MF</span>", "<span style="color: #8b0000">myCo.test.com</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 24: <span style="color: #0000ff">public</span> String PARAM_RESPONSE_NAMESPACE_MF = Utility.getProperty("<span style="color: #8b0000">PARAM_RESPONSE_NAMESPACE_MF</span>", "<span style="color: #8b0000">myCo.test.com</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 25: <span style="color: #008000">// You must specify the programmming language for target program.</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 26: <span style="color: #008000">// 0 = COBOL.</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 27: <span style="color: #0000ff">public</span> <span style="color: #0000ff">final</span> <span style="color: #0000ff">int</span> PARAM_LANGUAGE = Integer.parseInt(Utility.getProperty("<span style="color: #8b0000">PARAM_LANGUAGE</span>", "<span style="color: #8b0000">0</span>"));
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 28: <span style="color: #008000">// What is the target program need COMMAREA or CHANNELS/Containers.</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 29: <span style="color: #0000ff">public</span> <span style="color: #0000ff">final</span> <span style="color: #0000ff">int</span> PARAM_PROGRAM_INTERFACE = Integer.parseInt(Utility.getProperty("<span style="color: #8b0000">PARAM_PROGRAM_INTERFACE</span>", "<span style="color: #8b0000">1</span>"));
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 30: <span style="color: #008000">// Name of default channel?</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 31: <span style="color: #0000ff">public</span> <span style="color: #0000ff">final</span> String PARAM_CHANNEL_NAME = Utility.getProperty("<span style="color: #8b0000">PARAM_CHANNEL_NAME</span>", "<span style="color: #8b0000">CHANNEL</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 32: <span style="color: #008000">// Define codepage for the PDS that will be used as input or output.</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 33: <span style="color: #008000">// I used default as IBM-037</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 34: <span style="color: #0000ff">public</span> <span style="color: #0000ff">final</span> String PARAM_PDS_CODEPAGE = Utility.getProperty("<span style="color: #8b0000">PARAM_PDS_CODEPAGE</span>", "<span style="color: #8b0000">IBM-037</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 35:
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 36: <span style="color: #0000ff">public</span> String PARAM_SERVICE_INTERFACE = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 37: <span style="color: #008000">//Location of generated WSDL (LS2WS) or WSDL to be used to generate (WS2LS)</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 38: <span style="color: #0000ff">public</span> String WSDL_LOCATION = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 39:
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 40: <span style="color: #008000">//Name of the PDS file names on local machine.</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 41: <span style="color: #0000ff">public</span> String PARAM_REQUEST_CBMEMBER_MF = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 42: <span style="color: #0000ff">public</span> String PARAM_RESPONSE_CBMEMBER_MF = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 43: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 44: * This is the name of interface that wsbind file will use to create a web service.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 45: * This will also be used at http://server:port/PARAM_SERVICE_INTERFACE
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 46: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 47: <span style="color: #0000ff">public</span> String PARAM_INTERFACE_ID = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 48: <span style="color: #0000ff">public</span> String PARAM_DIRECTORY_PDS_LIB = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 49: <span style="color: #0000ff">public</span> String PARAM_DIRECTORY_ARTIFACTS_WSDL = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 50: <span style="color: #0000ff">public</span> String PARAM_DIRECTORY_ARTIFACTS_WSBIND = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 51: <span style="color: #0000ff">public</span> String PARAM_DIRECTORY_ARTIFACTS_LOG = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 52: <span style="color: #0000ff">public</span> <span style="color: #0000ff">final</span> String PARAM_EXTENTION_WSBIND = Utility.getProperty("<span style="color: #8b0000">PARAM_EXTENTION_WSBIND</span>", "<span style="color: #8b0000">.wsbind</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 53: <span style="color: #0000ff">public</span> <span style="color: #0000ff">final</span> String PARAM_EXTENTION_WSDL = Utility.getProperty("<span style="color: #8b0000">PARAM_EXTENTION_WSDL</span>", "<span style="color: #8b0000">.wsdl</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 54: <span style="color: #0000ff">public</span> <span style="color: #0000ff">final</span> String PARAM_EXTENTION_LOG = Utility.getProperty("<span style="color: #8b0000">PARAM_EXTENTION_LOG</span>", "<span style="color: #8b0000">.log</span>");</pre></pre>
<p><strong>Setup the parameters:</strong></p>
<strong>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb"><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 1: <span style="color: #0000ff">private</span> IAssistantParameters setParams(String type) {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 2: IAssistantParameters params = Factory.createAssistantParameters();
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 3: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 4: * You can create both LS2WS and WS2LS from CICS WS Assistant. Both use
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 5: * different parameters. this program is written to handle both
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 6: * scenarios.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 7: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 8: <span style="color: #0000ff">if</span> (type.equals("<span style="color: #8b0000">LS2WS</span>")) {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 9: <span style="color: #008000">//Copybook to web services approach</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 10: params.setParamLANG(PARAM_LANGUAGE);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 11: params.setParamPDSCP(PARAM_PDS_CODEPAGE);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 12: params.setParamMAPPING_LEVEL(PARAM_MAPPING_LEVEL);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 13: params.setParamPGMNAME(PARAM_PROGRAM_NAME);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 14: params.setParamREQMEM(PARAM_REQUEST_CBMEMBER_MF);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 15: params.setParamRESPMEM(PARAM_RESPONSE_CBMEMBER_MF);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 16: params.setParamPGMINT(PARAM_PROGRAM_INTERFACE);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 17: params.setParamPGMINT(PARAM_CHANNEL_NAME);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 18: params.setParamCONTID(PARAM_CONTAINER_NAME);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 19: params.setParamPDSLIB(PARAM_DIRECTORY_PDS_LIB);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 20: params.setParamURI(PARAM_INTERFACE_ID);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 21: params.setParamREQUEST_NAMESPACE(PARAM_REQUEST_NAMESPACE_MF);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 22: params.setParamRESPONSE_NAMESPACE(PARAM_RESPONSE_NAMESPACE_MF);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 23: params.setParamWSBIND(PARAM_DIRECTORY_ARTIFACTS_WSBIND + PARAM_INTERFACE_ID + PARAM_EXTENTION_WSBIND);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 24: params.setParamLOGFILE(PARAM_DIRECTORY_ARTIFACTS_LOG + PARAM_INTERFACE_ID + PARAM_EXTENTION_LOG);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 25: params.setParamWSDL(WSDL_LOCATION);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 26: } <span style="color: #0000ff">else</span> {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 27: <span style="color: #008000">//WSDL to Cobol copybook/program approach</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 28: params.setParamLANG(PARAM_LANGUAGE);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 29: params.setParamPDSCP(PARAM_PDS_CODEPAGE);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 30: params.setParamMAPPING_LEVEL(PARAM_MAPPING_LEVEL);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 31: params.setParamPGMNAME(PARAM_PROGRAM_NAME);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 32: params.setParamREQMEM(PARAM_REQUEST_CBMEMBER_MF);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 33: params.setParamRESPMEM(PARAM_RESPONSE_CBMEMBER_MF);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 34: params.setParamPGMINT(PARAM_PROGRAM_INTERFACE);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 35: params.setParamPGMINT(PARAM_CHANNEL_NAME);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 36: params.setParamCONTID(PARAM_CONTAINER_NAME);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 37: params.setParamPDSLIB(PARAM_DIRECTORY_PDS_LIB);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 38: params.setParamURI(PARAM_INTERFACE_ID);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 39: params.setParamCHAR_VARYING("<span style="color: #8b0000">NO</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 40: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 41: * No need to specify namespaces here, because they come from specified WSDL.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 42: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 43: <span style="color: #008000">// params.setParamREQUEST_NAMESPACE(PARAM_REQUEST_NAMESPACE_MF);</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 44: <span style="color: #008000">// params.setParamRESPONSE_NAMESPACE(PARAM_RESPONSE_NAMESPACE_MF);</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 45: params.setParamWSBIND(PARAM_DIRECTORY_ARTIFACTS_WSBIND + PARAM_INTERFACE_ID + PARAM_EXTENTION_WSBIND);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 46: params.setParamLOGFILE(PARAM_DIRECTORY_ARTIFACTS_LOG + PARAM_INTERFACE_ID + PARAM_EXTENTION_LOG);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 47: params.setParamWSDL(WSDL_LOCATION);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 48: }
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 49: <span style="color: #0000ff">return</span> params;
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 50: }</pre></pre>
<p>Part I: Create Copybook to Web service (LS2WS)</p>
<p>
<br /></p>
</strong>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb"><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 1: <span style="color: #0000ff">public</span> String CreateWSArtifactsLS2WS() {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 2: <span style="color: #0000ff">try</span> {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 3: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 4: * Create the paths where you want your WS artifacts will be crated.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 5: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 6: PARAM_REQUEST_NAMESPACE_MF = <span style="color: #0000ff">this</span>.PARAM_SERVICE_INTERFACE + "<span style="color: #8b0000">.</span>" + PARAM_REQUEST_NAMESPACE_MF;
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 7: PARAM_RESPONSE_NAMESPACE_MF = <span style="color: #0000ff">this</span>.PARAM_SERVICE_INTERFACE + "<span style="color: #8b0000">.</span>" + PARAM_RESPONSE_NAMESPACE_MF;
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 8: WSDL_LOCATION = PARAM_DIRECTORY_ARTIFACTS_WSDL + PARAM_INTERFACE_ID + PARAM_EXTENTION_WSDL;
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 9:
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 10: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 11: * Setup parameters
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 12: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 13: IAssistantParameters params = <span style="color: #0000ff">this</span>.setParams("<span style="color: #8b0000">LS2WS</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 14: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 15: * Create assistant
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 16: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 17: ICICSWebServicesAssistant cwsa = Factory.createCICSWebServicesAssistant();
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 18: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 19: * Make the run
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 20: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 21: IAssistantResponse ar = cwsa.DFHLS2WS(params);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 22: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 23: * Check the output.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 24: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 25: <span style="color: #0000ff">int</span> retCode = ar.getReturnCode();
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 26: String retMessages = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 27: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 28: * There are list of messages.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 29: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 30: String[] msgs = ar.getAllMessages();
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 31: <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i < msgs.length; i++) {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 32: retMessages += msgs[i] + "<span style="color: #8b0000">\n</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 33: Utility.PrintLine(msgs[i]);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 34: }
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 35: Utility.PrintLine("<span style="color: #8b0000">DFHLS2WS:AssistantResponse.getReturnCode():</span>" + retCode);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 36: <span style="color: #0000ff">if</span> (retCode == IAssistantResponse.RC_ERROR) {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 37: Utility.PrintLine("<span style="color: #8b0000">Error while creating the WSDL\n</span>" + retMessages);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 38: <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> Exception("<span style="color: #8b0000">WSDL Creation Error : </span>" + retMessages);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 39: }
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 40: } <span style="color: #0000ff">catch</span> (Exception e) {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 41: Utility.PrintError(e);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 42: }
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 43:
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 44: <span style="color: #0000ff">return</span> WSDL_LOCATION;
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 45: }
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 46: </pre></pre>
<p> </p>
<p><strong>Part II: Create Web service to Cobol(WS2LS)</strong></p>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb"><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 1: <span style="color: #0000ff">public</span> String CreateWSArtifactsWS2LS() {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 2: <span style="color: #0000ff">try</span> {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 3: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 4: * Create the paths where you want your WS artifacts will be crated.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 5: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 6: PARAM_REQUEST_NAMESPACE_MF = <span style="color: #0000ff">this</span>.PARAM_SERVICE_INTERFACE + "<span style="color: #8b0000">.</span>" + PARAM_REQUEST_NAMESPACE_MF;
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 7: PARAM_RESPONSE_NAMESPACE_MF = <span style="color: #0000ff">this</span>.PARAM_SERVICE_INTERFACE + "<span style="color: #8b0000">.</span>" + PARAM_RESPONSE_NAMESPACE_MF;
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 8: WSDL_LOCATION = PARAM_DIRECTORY_ARTIFACTS_WSDL + PARAM_INTERFACE_ID + PARAM_EXTENTION_WSDL;
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 9: <span style="color: #008000">/*
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 10: * You have to provide the names of the PDS which it will generate the the Copybooks.
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 11: */</span>
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 12: PARAM_REQUEST_CBMEMBER_MF = "<span style="color: #8b0000">WBSXI</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 13: PARAM_RESPONSE_CBMEMBER_MF = "<span style="color: #8b0000">WBSXO</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 14: IAssistantParameters params = <span style="color: #0000ff">this</span>.setParams("<span style="color: #8b0000">WS2LS</span>");
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 15: ICICSWebServicesAssistant cwsa = Factory.createCICSWebServicesAssistant();
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 16: IAssistantResponse ar = cwsa.DFHWS2LS(params);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 17: <span style="color: #0000ff">int</span> retCode = ar.getReturnCode();
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 18: String retMessages = "<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 19: String[] msgs = ar.getAllMessages();
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 20: <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i < msgs.length; i++) {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 21: retMessages += msgs[i] + "<span style="color: #8b0000">\n</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 22: Utility.PrintLine(msgs[i]);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 23: }
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 24: Utility.PrintLine("<span style="color: #8b0000">DFHLS2WS:AssistantResponse.getReturnCode():</span>" + retCode);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 25: <span style="color: #0000ff">if</span> (retCode == IAssistantResponse.RC_ERROR) {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 26: Utility.PrintLine("<span style="color: #8b0000">Error while creating the WSDL\n</span>" + retMessages);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 27: <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> Exception("<span style="color: #8b0000">WSDL Creation Error : </span>" + retMessages);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 28: }
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 29: } <span style="color: #0000ff">catch</span> (Exception e) {
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 30: Utility.PrintError(e);
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 31: }
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 32: <span style="color: #0000ff">return</span> WSDL_LOCATION;
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 33: }</pre></pre>
<p><strong>Glue it togather:</strong></p>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb"><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 1: String WSDL_LOCATION ="<span style="color: #8b0000"></span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 2: CICSCreateWSDL createWSDL = <span style="color: #0000ff">new</span> CICSCreateWSDL();
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 3:
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 4: createWSDL.PARAM_INTERFACE_ID="<span style="color: #8b0000">GetCustomerAddress</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 5: createWSDL.PARAM_REQUEST_CBMEMBER_MF = "<span style="color: #8b0000">CUSTADDR.cpy</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 6: createWSDL.PARAM_RESPONSE_CBMEMBER_MF = "<span style="color: #8b0000">CUSTADDR.cpy</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 7: createWSDL.PARAM_DIRECTORY_PDS_LIB = Utility.BASE_ARTIFACT_FOLDER + "<span style="color: #8b0000">1.Interfaces\\</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 8: createWSDL.PARAM_DIRECTORY_ARTIFACTS_WSDL = Utility.BASE_ARTIFACT_FOLDER + "<span style="color: #8b0000">2.WSDLs\\</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 9: createWSDL.PARAM_DIRECTORY_ARTIFACTS_WSBIND = Utility.BASE_ARTIFACT_FOLDER + "<span style="color: #8b0000">3.WSBINDs\\</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 10: createWSDL.PARAM_DIRECTORY_ARTIFACTS_LOG = Utility.BASE_ARTIFACT_FOLDER + "<span style="color: #8b0000">4.LOGs\\</span>";
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 11: createWSDL.PARAM_SERVICE_INTERFACE=PARAM_NAMESPACE;
</pre><pre style="font-size: 9px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #fbfbfb"> 12: WSDL_LOCATION= createWSDL.CreateWSArtifactsLS2WS();</pre></pre>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-3275735.post-61894848134252277112009-04-06T08:26:00.001-05:002009-04-08T10:51:20.461-05:00Read my book review from Amazon : Visual Basic.NET and XML<p>Few years back, somebody approached me to review a new emerging <a href="http://www.amazon.com/Visual-Basic-NET-XML-Applications/dp/047112060X">book on Visual Basic .Net and XML</a>. The book is focused only on XML related processing in VB.Net. </p> <p>Recently I had been searching for pages related to my website and I can see my <a href="http://www.amazon.com/Visual-Basic-NET-XML-Applications-Communication/dp/B000826VIK">review is sold on Amazon</a> along with the book for $5.95. </p> <p>Feels good to see...</p> <blockquote> <p><strong>Citation Details</strong> <br /><strong>Title:</strong> Visual Basic.NET and XML: Harness the Power of XML in VB.NET Applications.(Book Reviews) <br /><strong>Author:</strong> Vishal Khapre <br /><strong>Publication:</strong> <em>Technical Communication</em> (Refereed) <br /><strong>Date:</strong> February 1, 2004 <br /><strong>Publisher:</strong> Society for Technical Communication <br /><strong>Volume:</strong> 51 <strong>Issue:</strong> 1 <strong>Page:</strong> 123(2)</p></blockquote> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-3083919615453922572009-01-21T22:45:00.000-05:002009-01-21T22:52:50.138-05:00Add Command prompt to explorer context menu<p>Its been always a long process to reach to desired folder using "cd" command on Command Prompt. It was easier to have a context menu for any folder in Windows Explorer as "Start command here". I had been using it for such a long time, so don't know who told me how to do this, but recently a friend asked me so thought it is easier to post a blog and point him to the post.</p> <ol> <li>Open Windows explorer <br /> <br /><a href="http://www.khapre.org/blog/uploaded_images/AddCommandprompttoexplorercontextmenu_9D6B/image.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="297" alt="image" src="http://www.khapre.org/blog/uploaded_images/AddCommandprompttoexplorercontextmenu_9D6B/image_thumb.png" width="532" border="0" /></a>  <br /> <br /></li> <li>Go to Tools menu -> Folder Options -> File Types. You can probably reach this place via control panel also. <br /> <br /><a href="http://www.khapre.org/blog/uploaded_images/AddCommandprompttoexplorercontextmenu_9D6B/image_3.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="509" alt="image" src="http://www.khapre.org/blog/uploaded_images/AddCommandprompttoexplorercontextmenu_9D6B/image_thumb_3.png" width="488" border="0" /></a> <br /></li> <li>Select "Folder" remember not to select "File Folder" and click on "Advanced". I already have created "command" as my context menu so you will see that here too. <br /> <br /><a href="http://www.khapre.org/blog/uploaded_images/AddCommandprompttoexplorercontextmenu_9D6B/image_4.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="377" alt="image" src="http://www.khapre.org/blog/uploaded_images/AddCommandprompttoexplorercontextmenu_9D6B/image_thumb_4.png" width="319" border="0" /></a> <br /></li> <li>Click New and put Action as "Start command here" and Application used as absolute path to cmd.exe usually it is in your system32 directory. <br /> <br /><a href="http://www.khapre.org/blog/uploaded_images/AddCommandprompttoexplorercontextmenu_9D6B/image_5.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="293" alt="image" src="http://www.khapre.org/blog/uploaded_images/AddCommandprompttoexplorercontextmenu_9D6B/image_thumb_5.png" width="389" border="0" /></a> <br /></li> <li>Click "Ok" and then "Close" to get back to Windows Explorer. </li> <li>Right click on any folder in Windows Explorer to see the context menu added. </li> </ol> <p>Good luck!!</p> Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-3275735.post-16927527268126399552008-08-20T22:00:00.003-05:002008-12-06T13:19:08.488-05:00JAX-WS and Custom SOAP Header<p>Recently, during my transition to JAX-WS, a work in hand made me use Custom Soap headers in design in a JAX-WS implementation. Pertaining same, my recent conversations with friend, we need a quick sample how to use custom headers with JAX-WS. </p> <p>JAX-WS by Sun’s specifications support custom soap headers. It is as easier as .Net or webMethods. It supports the WSDL with SOAP header information also.</p> <p><a href="https://jax-ws.dev.java.net/jax-ws-ea3/docs/annotations.html">https://jax-ws.dev.java.net/jax-ws-ea3/docs/annotations.html</a></p> <blockquote> <p>As per W3C, “The Representation header block is designed to allow applications to carry a representation of a Web resource in a SOAP message”.  </p> <p>Ref:<a title="http://www.w3.org/TR/soap12-rep/" href="http://www.w3.org/TR/soap12-rep/">http://www.w3.org/TR/soap12-rep/</a></p> </blockquote> <p>It is not limited or only used by system processing, applications can use it for several reasons which include the access restriction, avoiding payload browse, and also overhead (accessing headers is faster than body). So it is perfectly allowed to use SOAP custom headers, philosophy being soap:body should contain only the payload, all routing headers should be used as soap:headers.</p> <p>Here is how you do it.</p> <p>Change your soapbinding annotation to DOCUMENT, by default it is DOCUMENT but I made it explicit because it was giving some error.</p> <blockquote> <pre class="code"><span style="color: #646464">@WebService</span>(name = <span style="color: #2a00ff">"GoodbyeWorldWS"</span>, <br /> targetNamespace=<span style="color: #2a00ff">"http://webservice_producer/goodbyeworld"</span>)
<span style="color: #646464">@SOAPBinding</span>(style = <span style="color: #646464">SOAPBinding</span>.Style.<span style="color: #0000c0">DOCUMENT</span>)</pre>
</blockquote>
<a href="http://11011.net/software/vspaste"></a>
<p>Add new @WebParam with header=true. You can also set the Mode to INOUT so that header value is returned to consumer too. You can access the headers via the WebParam name specified in the name attribute.</p>
<blockquote>
<pre class="code"><span style="color: #646464">@WebMethod
</span><span style="color: #7f0055">public </span>String sayGoodbye(
<span style="color: #646464">@WebParam</span>(name=<span style="color: #2a00ff">"message"</span>) String message,
<span style="color: #3f7f5f">/*Add header element */
</span><span style="color: #646464">@WebParam</span>(name=<span style="color: #2a00ff">"header"</span>,mode=Mode.<span style="color: #0000c0">IN</span>, header=<span style="color: #7f0055">true</span>) String headerElement) <br /> {<br /> System.<span style="color: #0000c0">out</span>.println(<span style="color: #2a00ff">"SOAP HEADER VALUE" </span>+ headerElement);
<span style="color: #7f0055">return </span><span style="color: #2a00ff">".Goodbye."</span>;
}</pre>
</blockquote>
<a href="http://11011.net/software/vspaste"></a>
<p>Here is how the WSDL looks like, it has the soap:header added.</p>
<blockquote>
<p><span class="m"><font color="#0000ff"><</font></span><span class="t"><font color="#990000">input</font></span><span class="m"><font color="#0000ff">></font></span>  <br />    <span class="m"><font color="#0000ff"><</font></span><span class="t"><font color="#990000">soap:body</font></span> <span class="t"><font color="#990000">parts</font></span><span class="m"><font color="#0000ff">="</font></span><b>sayGoodbye</b><span class="m"><font color="#0000ff">"</font></span><span class="t"><font color="#990000"> use</font></span><span class="m"><font color="#0000ff">="</font></span><b>literal</b><font color="#0000ff"><span class="m">"</span><span class="m"> /></span></font>  <br /> <span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span><span class="m"><font color="#0000ff"><</font></span><span class="t"><font color="#990000">soap:header</font></span> <span class="t"><font color="#990000">message</font></span><span class="m"><font color="#0000ff">="</font></span><b>tns:GoodbyeWorldWS_sayGoodbye</b><span class="m"><font color="#0000ff">"</font></span><span class="t"><font color="#990000"> part</font></span><span class="m"><font color="#0000ff">="</font></span><b>header</b><span class="m"><font color="#0000ff">"</font></span><span class="t"><font color="#990000"> use</font></span><span class="m"><font color="#0000ff">="</font></span><b>literal</b><font color="#0000ff"><span class="m">"</span><span class="m"> /></span></font>
<br /><span class="m"><font color="#0000ff"></</font></span><span class="t"><font color="#990000">input</font></span><span class="m"><font color="#0000ff">></font></span></p>
</blockquote>
<p>Here is the C# code to invoke it. </p>
<blockquote>
<pre class="code">GoodbyeWorldWSService.<span style="color: #2b91af">GoodbyeWorldWSService </span>ws =
<span style="color: blue">new </span>ConsoleApplication2.GoodbyeWorldWSService.<span style="color: #2b91af">GoodbyeWorldWSService</span>();
GoodbyeWorldWSService.<span style="color: #2b91af">sayGoodbye </span>input =
<span style="color: blue">new </span>ConsoleApplication2.GoodbyeWorldWSService.<span style="color: #2b91af">sayGoodbye</span>();
input.message = <span style="color: #a31515">"JAX WS support Body"</span>;
ws.header = <span style="color: blue">new </span>ConsoleApplication2.GoodbyeWorldWSService.@string();
ws.header.Text = <span style="color: blue">new </span><span style="color: #2b91af">String</span>[] { <span style="color: #a31515">"JAX WS Supports Headers" </span>};
GoodbyeWorldWSService.<span style="color: #2b91af">sayGoodbyeResponse </span>output = ws.sayGoodbye(input);
<span style="color: #2b91af">Console</span>.WriteLine(output.@return);</pre>
</blockquote>
<a href="http://11011.net/software/vspaste"></a>
<p>Here is how the SOAP message  looks like in server log</p>
<blockquote>
<p>22:07:21,187 INFO [STDOUT]
<br />[
<br /><soap:Envelope xmlns:soap=<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>
<br />   xmlns:xsi=<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>
<br />   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<br /><soap:Header>
<br />  <header xmlns="http://webservice_producer/goodbyeworld">
<br />      JAX WS Supports Headers
<br />  </header>
<br /></soap:Header>
<br /><soap:Body>
<br />  <sayGoodbye xmlns="http://webservice_producer/goodbyeworld">
<br />     <message xmlns="">JAX WS support Body</message>
<br />   </sayGoodbye>
<br /></soap:Body>
<br /></soap:Envelope>
<br />]. </p></blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-15389906638177619412008-07-04T23:46:00.002-05:002009-07-21T05:45:24.086-05:00Windows Live Writer<p><img style="margin: 0px 25px 0px 0px" src="http://farm2.static.flickr.com/1179/1367008590_c5f6782388.jpg?v=1189613830" align="left" />My laptop changed, so wanted to get back to the setup I had before, been through enough trouble to get Windows Live Writer to be installed on my machine. You wish it is a MS baby, single installable, double click and boom!! Everything is installed completely. </p> <p> </p> <p>Otherwise Windows Live Installer uses Windows Installer, Automatic Updates and all underlying component. Not sure why? </p> <p>It uses so many components and piece in background to make it work. Basically, the installable can install any or a lot more components on your machine than required. Found <a href="http://garmahis.com/software/windows-live-writer-2008-installation-problems-and-solution/" target="_blank">garmahis.com</a> (Thanks to <a href="http://garmahis.com">Michael Garmahis</a>) where I could get a standalone installable. There is another one if you like ... <a href="http://download.microsoft.com/download/f/9/a/f9a19f2d-cec4-4a25-9b0b-eb9655ea7561/Writer.msi" target="_blank">here</a>. </p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-33066653183509860612007-07-06T23:16:00.000-05:002007-07-06T23:43:02.777-05:00Disable drag and Text selection in Firefox<p>Firefox is known to support most of the W3C Dom standards and IE is usually to support most non standard or I would say "IE Standard". Anyways, I still like IE because my website is viewed by mostly IE users, almost over 85%. </p>
<p>I had seen some people copying text from website, so I wanted to implement no drag and copy text from my website. Here is what I added to the body tag of each HTML rendered page on my site. (I know there are other ways to copy. :( )</p>
<blockquote>
<p><span style="color: rgb(255,0,0)">onmousedown</span><span style="color: rgb(0,0,255)">="javascript:clickTrap();"</span> <span style="color: rgb(255,0,0)">ondragstart</span><span style="color: rgb(0,0,255)">="return false"</span> <span style="color: rgb(255,0,0)">ondblclick</span><span style="color: rgb(0,0,255)">="return false"</span> <span style="color: rgb(255,0,0)">onselectstart</span><span style="color: rgb(0,0,255)">="return false"</span> </p></blockquote>
<p>This stopped drag and text selection for every IE visitor on my site. Easy and simple technique allowed me to achieve what I wanted. Still there were about 15% "Standard Browser" based non standard users. They could drag and select text from my site. Searching paid off after a long time. Mozilla based browsers need to you to create a javascript event handler routine to stop the drop or use this non-standard, browser specific tags. Here is what I did. You can leave them in your CSS file because IE just ignores them and Firefox will block the drag. </p>
<blockquote><pre class="code"><span style="color: rgb(0,0,255)"><</span><span style="color: rgb(128,0,0)">style</span><span style="color: rgb(0,0,255)">>
</span> <span style="color: rgb(128,0,0)">.protectedText</span>
{
<span style="color: rgb(255,0,0)">-moz-user-focus</span>: <span style="color: rgb(0,0,255)">ignore</span>;
<span style="color: rgb(255,0,0)">-moz-user-input</span>: <span style="color: rgb(0,0,255)">disabled</span>;
<span style="color: rgb(255,0,0)">-moz-user-select</span>: <span style="color: rgb(0,0,255)">none</span>;
}
<span style="color: rgb(0,0,255)"></</span><span style="color: rgb(128,0,0)">style</span><span style="color: rgb(0,0,255)">>
<</span><span style="color: rgb(128,0,0)">input</span> <span style="color: rgb(255,0,0)">class</span><span style="color: rgb(0,0,255)">="protectedText"</span> <span style="color: rgb(255,0,0)">type</span><span style="color: rgb(0,0,255)">="text"</span> <span style="color: rgb(255,0,0)">value</span><span style="color: rgb(0,0,255)">="Change this"></span>
<span style="color: rgb(0,0,255)"><</span><span style="color: rgb(128,0,0)">span</span> <span style="color: rgb(255,0,0)">class</span><span style="color: rgb(0,0,255)">="protectedText"></span>sdaf<span style="color: rgb(0,0,255)"></</span><span style="color: rgb(128,0,0)">span</span><span style="color: rgb(0,0,255)">></span></pre></blockquote>
<p>Find other such tags, that mught be useful for you.<br><a href="http://www.xulplanet.com/references/elemref/ref_StyleProperties.html">http://www.xulplanet.com/references/elemref/ref_StyleProperties.html</a> </p><a href="http://11011.net/software/vspaste"><a href="http://11011.net/software/vspaste"></a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-59802415144963430832007-05-07T07:53:00.001-05:002007-05-07T08:39:49.934-05:00Windows zip folder association<p>Windows has built in zip files added as folders in Windows Explorer. This feature is default support by a Windows standard install. This makes it completely difficult when there are more than on file in the folder or even if there is only one large file with a lot of files and folders inside it. </p> <p> </p> <p>Here is the solution, run following on Windows /DOS command prompt.</p> <blockquote> <p> </p> <p>"regsvr31 /u zipfldr"<br>(offcourse with out quotes)</p></blockquote> <p>If you want to register it back then </p> <blockquote> <p>"regsvr31 zipfldr"<br>(offcourse with out quotes)</p></blockquote> <p>Chow!!</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-1157465639066208672006-09-05T09:11:00.000-05:002006-09-05T09:13:59.066-05:00A National Security violationCheck out this Google Maps Api based <a href="http://www.isoma.net/games/goggles.html" target="_new">Flight Simulator</a>. You can fly over Washington DC. You can fly over Capitol, White House. Be careful, if you cannot maintain your altitude, it can crash into anything you want.<br>
This is a National Threat flight simulator :)... just kidding.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-1156427534394459522006-08-24T08:39:00.000-05:002007-05-07T08:40:06.118-05:00Python on the .NET FrameworkOne of the least talked language on web is IronPython when it became available in Microsoft <acronym title="Common Language Runtime">CLR</acronym>.<br/>Dynamic runtime languages were previously thought to run very poorly on the .NET Framework, but IronPython dismisses that idea. Microsoft is backing IronPython because it exemplifies just how well the .NET Framework can handle dynamic runtime languages. Supposedly, IronPython runs as fast as the C-based implementation of Python-2.4, if not faster. The company claims that IronPython can run 1.8x faster than Python-2.4 right now. Besides being speedy, it also allows developers to access all of the standard C Python libraries, not to mention and create their own subclasses deriving from the .NET framework.<br/><blockquote><a href="http://msdn.microsoft.com/msdntv/transcripts/20051110PythonJHTranscript.aspx">IronPython</a> is the codename for a new implementation of the Python programming language on the .NET Framework. It is fast - up to 1.8x faster than Python-2.4 on the standard pystone benchmark. It supports an interactive interpreter with fully dynamic compilation as well as static compilation to produce pre-compiled executables. It's well integrated with the rest of the Framework and makes all of the .NET libraries easily available to Python programmers. In this episode Jim Hugunin introduces IronPython with demos showing interactive exploration and GUI building from a command prompt as well as simple embedding as a scripting language in an existing Windows Presentation Foundation application. Via Overview at <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f9296971-f926-4be5-9870-f6ee3b1977a3&DisplayLang=en">Microsft's Download website</a></blockquote>
Still, when I read this old news, I was surprised to see Microsoft's backing on Python where they will not be investing that much of money to see a dynamic language work. Anyways, as part of research found a very interesting comparision of Ruby, Java and C++ with Python by <a href="http://www.dmh2000.com/blog/2006/02/c-java-python-ruby.html">dmh2000</a>. This <a href="http://dmh2000.com/cjpr/">comparision</a> is just awesome.
<blockquote><strong>conclusion</strong><br/>Java is more productive than C/C++. Use C/C++ only when speed or bare metal access is called for. Python/Ruby is more productive than Java and more pleasant to code in. There is a big question on static vs. dynamic typing. I contend that static typing has to be better for the purposes of program correctness, but the required cruft reduces productivity. If actual practice in large systems shows that in fact runtime typing errors don't occur often and are worth the productivity tradeoff, then I will bow to dynamic typing. I can't come up with a definitive answer to Python vs. Ruby. They seem very equivalent. Would choose based on practicality in a given situation. My general feeling was that Python annoyed me in ways that Ruby didn't, but I think those annoyances would disappear if I was using Python all the time.</blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-1156386563803501002006-08-23T21:29:00.001-05:002006-08-23T21:37:55.336-05:00log_reuse_wait_desc column in sys.databasesHaving these words in your SQL Server error in SQL Server 2005 seems a little unbearable.
<blockquote>The transaction log for database '%.*ls' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases</blockquote>
<a href="http://www.khapre.org/blog/uploaded_images/SQLServerShrink-774991.JPG" target="_black"><img style="float:right; margin:0 0 10px 10px;" src="http://www.khapre.org/blog/uploaded_images/SQLServerShrink-774991.JPG" border="0" alt="SQL Server 2005 Database Properties Window" /></a>
There are various reason to get the error. Transaction log expansion may occur because of the following <a href="http://www.support.microsoft.com/?id=317375" target="_blank">reasons or scenarios</a>: The linked MS Technet article does not help but confuses you. <br>
• Uncommitted Transactions<br>
• Extremely Large Transactions<br>
• Operations: DBCC DBREINDEX and CREATE INDEX<br>
• While Restoring from Transaction Log Backups<br>
• Client Applications Do Not Process All Results<br>
• Queries Time Out Before a Transaction Log Completes the Expansion and You Receive False 'Log Full' Error Messages<br>
• Unreplicated Transactions<br>
Check this <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=282370&SiteID=1" title="The transaction log for database 'mydatabase' is full. To find out why space in the log cannot be reused, see the log_reuse_wait - MSDN Forums" target="_blank">FORUM POST</a> out, excellent suggestion, set transaction recovery mode to "Simple". Try that once through database properties panel, it does not work for first time. few times it definitley works. Try changing the "Auto Shrink" and "Auto Close" properties to "True"Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-3275735.post-1156348319958866292006-08-22T10:51:00.000-05:002015-01-29T10:50:37.735-05:00Create a Thumbnail Image of web page<div dir="ltr" style="text-align: left;" trbidi="on">
How do I create cached image of a webpage. I just wanted to create a thumbnail of a webpage based on URL. There is no way, you would find the right stuff to do so. I found <a href="http://dotnetjunkies.com/WebLog/alan.dean/">Alan Dean</a>'s page on <a href="http://dotnetjunkies.com/WebLog/alan.dean/archive/2005/04/25/70496.aspx">Generate an image of a web page</a>. He has explained the technique very well. Described his search for such code. He wrote on his own. There are a very few people got it <a href="http://www.developerfusion.co.uk/show/4712/">working</a>. So here is the code, took me a lot of time to get it working. Read through the sample I added here very carefully before you copy the code as is. I tried my best to write all comments to make it easy readable.
<br />
Tried it in all possible ways to make it successful the way I wanted. This code works awesome but I wanted to use System.drawing very well to make it work. There is no way I could find to do this without using Win32 Api. Apart from that, I need to add the axWebBrowser control and it needs to be visible on form in order to find the image of the web page. Then how do I do it on the fly on my website. There must be a way to create a thumbnail from webpage with out adding ActiveX controls....<br />
Good Luck!! Let me know if this works for you.<br />
<div style="line-height: 12px;">
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;"><span style="color: green;">
'*************************************************************************<br />
</span><span style="color: green;">'This is main form Class where you will add the
basic functions.<br />
'*************************************************************************</span><br />
<br />
Imports</span><span style="font-family: 'Courier New'; font-size: 8pt;">
SHDocVw <span style="color: green;">' Import the shdocvw.dll from Widnows\System32 folder.</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
Imports</span><span style="font-family: 'Courier New'; font-size: 8pt;">
mshtml
<span style="color: green;">' Import the mshtml.dll from Widnows\System32 folder.<br />
</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
Imports</span><span style="font-family: 'Courier New'; font-size: 8pt;">
System.Runtime.InteropServices
<span style="color: green;">' Need this as we added above two as Interop</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
<br />
Imports</span><span style="font-family: 'Courier New'; font-size: 8pt;">
System.Windows.Forms</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
<br />
Public</span><span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Class</span> Form1</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<br />
<span style="color: blue;">Private</span>
<span style="color: blue;">Sub</span> Form1_Load(<span style="color: blue;">ByVal</span>
sender <span style="color: blue;">As</span> System.Object, <span style="color: blue;">
ByVal</span> e <span style="color: blue;">As</span> System.EventArgs) <span style="color: blue;">
Handles</span> <span style="color: blue;">MyBase</span>.Load</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<br />
<span style="color: green;">'Add the axWebBrowser control
from SHDocVw library to your form name it as axWebBrowser<br />
'Add the Event Handler as DocumentComplete, because
we need to capture screen image when document is completely loaded.<br />
</span><span style="color: blue;"><span style="color: black;">
</span>
AddHandler</span> axWebBrowser.DocumentComplete, <span style="color: blue;">AddressOf</span>
<span style="color: blue;">Me</span>.OnDocumentComplete<br />
</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> </span>
<span style="font-family: 'Courier New'; font-size: 8pt;"><span style="color: blue;">End</span>
<span style="color: blue;">Sub<br />
</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
</span>
<span style="font-family: 'Courier New'; font-size: 8pt;"><span style="color: blue;">Private</span>
<span style="color: blue;">Sub</span> OnDocumentComplete(<span style="color: blue;">ByVal</span>
sender <span style="color: blue;">As</span> <span style="color: blue;">Object</span>,
<span style="color: blue;">ByVal</span> e <span style="color: blue;">As</span> AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"><span style="color: green;">
</span><br />
<span style="color: blue;">
Dim</span> document <span style="color: blue;">As</span> IHTMLDocument2 = <span style="color: blue;">
CType</span>(<span style="color: blue;">Me</span>.axWebBrowser.Document,
IHTMLDocument2)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">
If</span> <span style="color: blue;">Not</span> (document <span style="color: blue;">Is</span>
<span style="color: blue;">Nothing</span>) <span style="color: blue;">Then</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">Dim</span> element <span style="color: blue;">As</span> IHTMLElement
= <span style="color: blue;">CType</span>(document.body, IHTMLElement)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">If</span> <span style="color: blue;">Not</span> (element
<span style="color: blue;">Is</span> <span style="color: blue;">Nothing</span>) <span style="color: blue;">Then</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Dim</span> render <span style="color: blue;">As</span>
IHTMLElementRender = <span style="color: blue;">CType</span>(element, IHTMLElementRender)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">If</span> <span style="color: blue;">Not</span> (render
<span style="color: blue;">Is</span> <span style="color: blue;">Nothing</span>) <span style="color: blue;">Then</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: green;">' Using
</span></span>
</div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Dim</span> graphics <span style="color: blue;">
As</span> Graphics = <span style="color: blue;">Me</span>.pictureBox.CreateGraphics</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Try</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Dim</span> hdcDestination
<span style="color: blue;">As</span> IntPtr = graphics.GetHdc</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
render.DrawToDC(hdcDestination)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Dim</span> hdcMemory
<span style="color: blue;">As</span> IntPtr = gdi32.CreateCompatibleDC(hdcDestination)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Dim</span> bitmap <span style="color: blue;">As</span> IntPtr = gdi32.CreateCompatibleBitmap(hdcDestination,
<span style="color: blue;">Me</span>.axWebBrowser.ClientRectangle.Width, <span style="color: blue;">
Me</span>.axWebBrowser.ClientRectangle.Height)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">If</span> <span style="color: blue;">
Not</span> (bitmap = IntPtr.Zero) <span style="color: blue;">Then</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Dim</span>
hOld <span style="color: blue;">As</span> IntPtr = <span style="color: blue;">CType</span>(gdi32.SelectObject(hdcMemory,
bitmap), IntPtr)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
gdi32.BitBlt(hdcMemory, 0, 0, <span style="color: blue;">Me</span>.axWebBrowser.ClientRectangle.Width, <span style="color: blue;">
Me</span>.axWebBrowser.ClientRectangle.Height, hdcDestination, 0, 0, <span style="color: blue;">
CType</span>(gdi32.TernaryRasterOperations.SRCCOPY, <span style="color: blue;">Integer</span>))</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
gdi32.SelectObject(hdcMemory, hOld)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
gdi32.DeleteDC(hdcMemory)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
graphics.ReleaseHdc(hdcDestination)<br />
<br />
<span style="color: green;">
'Add a PictureBox control to your form,
named pictureBox. This way you can<br />
'see the image immediately after it is generated. You can save to
FS using Bitmap.Save method.</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Me</span>.pictureBox.Image
= Image.FromHbitmap(bitmap)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<br />
<span style="color: blue;">End</span> <span style="color: blue;">
If</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<br />
<span style="color: blue;">Finally<br />
<br />
<span style="color: green;">
'You must dispose Graphics Object for better use.</span></span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">CType</span>(graphics,
IDisposable).Dispose()</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">End</span> <span style="color: blue;">
Try</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">End</span> <span style="color: blue;">If</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">End</span> <span style="color: blue;">If</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">
End</span> <span style="color: blue;">If</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">End</span>
<span style="color: blue;">Sub</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">Private</span>
<span style="color: blue;">Sub</span> Button1_Click(<span style="color: blue;">ByVal</span>
sender <span style="color: blue;">As</span> System.Object, <span style="color: blue;">
ByVal</span> e <span style="color: blue;">As</span> System.EventArgs) <span style="color: blue;">
Handles</span> Button1.Click</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"><span style="color: green;">
'</span> <span style="color: green;">Add a button to you
form named Button1.<br />
'<span style="color: black;"> </span><span style="color: green;">
This way we can control when we want to start Browsing.<br />
'<span style="color: black;"> </span><span style="color: green;">
Select the URI to be browsed here.</span></span></span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">
Me</span>.axWebBrowser.Navigate(<span style="color: blue;">New</span> Uri(<span style="color: maroon;">"http://www.google.com"</span>))</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
</span>
</div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">End</span>
<span style="color: blue;">Sub</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
End</span><span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Class<br />
</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"><span style="color: blue;"><span style="color: green;">'*************************************************************************</span><br />
<span style="color: green;">'This class for dummy for calling GDI Functions from Win32
Api.
<br />
'So that you can encapsulate whole GDI work outside.<br />
'*************************************************************************</span></span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
Public</span><span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Class</span> gdi32<br />
<br />
<span style="color: green;"> '</span> <span style="color: green;">I copied
all the signatures in this class from http://www.pinvoke.net </span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">
</span>
</div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">Public</span>
<span style="color: blue;">Declare</span> <span style="color: blue;">Function</span>
DeleteDC <span style="color: blue;">Lib</span> <span style="color: maroon;">"gdi32.dll"</span>
(<span style="color: blue;">ByVal</span> hdc <span style="color: blue;">As</span>
IntPtr) <span style="color: blue;">As</span> <span style="color: blue;">Boolean</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">Public</span>
<span style="color: blue;">Declare</span> <span style="color: blue;">Function</span>
SelectObject <span style="color: blue;">Lib</span> <span style="color: maroon;">"gdi32.dll"</span>
(<span style="color: blue;">ByVal</span> hdc <span style="color: blue;">As</span>
IntPtr, <span style="color: blue;">ByVal</span> hgdiobj <span style="color: blue;">As</span>
IntPtr) <span style="color: blue;">As</span> IntPtr</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">Public</span>
<span style="color: blue;">Declare</span> <span style="color: blue;">Function</span>
CreateCompatibleDC <span style="color: blue;">Lib</span> <span style="color: maroon;">
"gdi32"</span> (<span style="color: blue;">ByVal</span> hDC <span style="color: blue;">
As</span> IntPtr) <span style="color: blue;">As</span> IntPtr</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">Public</span>
<span style="color: blue;">Declare</span> <span style="color: blue;">Function</span>
CreateCompatibleBitmap <span style="color: blue;">Lib</span> <span style="color: maroon;">
"gdi32"</span> (<span style="color: blue;">ByVal</span> hDC <span style="color: blue;">
As</span> IntPtr, <span style="color: blue;">ByVal</span> nWidth <span style="color: blue;">
As</span> <span style="color: blue;">Integer</span>, <span style="color: blue;">ByVal</span>
nHeight <span style="color: blue;">As</span> <span style="color: blue;">Integer</span>)
<span style="color: blue;">As</span> IntPtr</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">Public</span>
<span style="color: blue;">Declare</span> <span style="color: blue;">Function</span>
BitBlt <span style="color: blue;">Lib</span> <span style="color: maroon;">"gdi32"</span>
(<span style="color: blue;">ByVal</span> hDestDC <span style="color: blue;">As</span>
IntPtr, <span style="color: blue;">ByVal</span> x <span style="color: blue;">As</span>
<span style="color: blue;">Integer</span>, <span style="color: blue;">ByVal</span>
y <span style="color: blue;">As</span> <span style="color: blue;">Integer</span>,
<span style="color: blue;">ByVal</span> nWidth <span style="color: blue;">As</span>
<span style="color: blue;">Integer</span>, <span style="color: blue;">ByVal</span>
nHeight <span style="color: blue;">As</span> <span style="color: blue;">Integer</span>,
<span style="color: blue;">ByVal</span> hSrcDC <span style="color: blue;">As</span>
IntPtr, <span style="color: blue;">ByVal</span> xSrc <span style="color: blue;">As</span>
<span style="color: blue;">Integer</span>, <span style="color: blue;">ByVal</span>
ySrc <span style="color: blue;">As</span> <span style="color: blue;">Integer</span>,
<span style="color: blue;">ByVal</span> dwRop <span style="color: blue;">As</span>
<span style="color: blue;">Integer</span>) <span style="color: blue;">As</span> <span style="color: blue;">Integer</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">Enum</span>
TernaryRasterOperations <span style="color: blue;">As</span> <span style="color: blue;">
Integer</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
</span>
</div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> SRCCOPY = 13369376 <span style="color: green;">'dest
= source</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> SRCPAINT = 15597702 <span style="color: green;">'dest = source
OR dest</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> SRCAND = 8913094 <span style="color: green;">
'dest = source AND dest</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> SRCINVERT = 6684742 <span style="color: green;">'dest = source
XOR dest</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> SRCERASE = 4457256 <span style="color: green;">'dest
= source AND (NOT dest )</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> NOTSRCCOPY = 3342344 <span style="color: green;">'dest = (NOT
source)</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> NOTSRCERASE = 1114278 <span style="color: green;">'dest = (NOT src)
AND (NOT dest)
</span></span>
</div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> MERGECOPY = 12583114 <span style="color: green;">'dest = (source
AND pattern)</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> MERGEPAINT = 12255782 <span style="color: green;">'dest = (NOT source)
OR dest</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> PATCOPY = 15728673 <span style="color: green;">'dest
= pattern</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> PATPAINT = 16452105 <span style="color: green;">'dest = DPSnoo</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> PATINVERT = 5898313 <span style="color: green;">'dest = pattern
XOR dest</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> DSTINVERT = 5570569 <span style="color: green;">'dest = (NOT
dest)</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> BLACKNESS = 66 <span style="color: green;">
'dest = BLACK</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> WHITENESS = 16711778 <span style="color: green;">'dest = WHITE</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">End</span>
<span style="color: blue;">Enum</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
End</span><span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Class</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"><span style="color: blue;">
<br />
<span style="color: green;">'Check out Alan Dean's explaination, because I don;t get
it. He is smarter than me, so I just believed that it works.<br />
</span></span></span>
<span style="font-family: 'Courier New'; font-size: 8pt;"><Guid(<span style="color: maroon;">"3050f669-98b5-11cf-bb82-00aa00bdce0b"</span>), System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown),
System.Runtime.InteropServices.ComVisible(<span style="color: blue;">True</span>),
System.Runtime.InteropServices.ComImport()> _</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
Interface</span><span style="font-family: 'Courier New'; font-size: 8pt;">
IHTMLElementRender</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">Sub</span>
DrawToDC(<System.Runtime.InteropServices.In()> <span style="color: blue;">ByVal</span>
hDC <span style="color: blue;">As</span> IntPtr)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> <span style="color: blue;">Sub</span>
SetDocumentPrinter(<System.Runtime.InteropServices.In(), System.Runtime.InteropServices.MarshalAs(UnmanagedType.BStr)>
<span style="color: blue;">ByVal</span> bstrPrinterName <span style="color: blue;">As</span>
<span style="color: blue;">String</span>, <System.Runtime.InteropServices.In()>
<span style="color: blue;">ByVal</span> hDC <span style="color: blue;">As</span> IntPtr)</span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
End</span><span style="font-family: 'Courier New'; font-size: 8pt;">
<span style="color: blue;">Interface</span></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
</span>
</div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="color: blue; font-family: 'Courier New'; font-size: 8pt;">
</span>
</div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
</div>
</div>
</div>
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-3275735.post-1154829725413502102006-08-05T20:55:00.000-05:002015-02-02T20:48:28.785-05:00Shri Satyanarayan Pooja Katha and Photograph<div dir="ltr" style="text-align: left;" trbidi="on">
Every year, in the month of Shravan as per India calendar, me and my wife decided to arrange Satyanarayan Pooja. Last year was the most pleasure, this year we are doing with same spirit and devotion on August 12, 2006. <br />
I had been searching for Katha in Marathi, expectation was atleast told and made as I heard since my childhood. <br />
<br />
Everywhere I could see Maharashtrians posting requests to send one or where do you get it. It is really difficult in US to have that fantacy unless there is somebody who is scanning and emailing that. This year decided to spread the pleasure by providing a copy to all. Check this page for <span style="font-size: medium;"><a href="http://www.transliteral.org/portal/url/mr/vidhi/pooja/satya/index.aspx" target="_blank">Satyanarayan Pooja</a></span>. Completely in Marathi. <br />
There is also a photograph for your use. <br />
Let me know what you think, post a comment here if you need anything else. Allow me sometime before I can make it available, but your comments are more valuable. </div>
Unknownnoreply@blogger.com15tag:blogger.com,1999:blog-3275735.post-1154008300185517112006-07-27T08:47:00.000-05:002007-05-07T08:40:06.118-05:00Competition - MSN - Google - We sing Kajara re<embed FlashVars="vurl=http%3a%2f%2fgrouper.com%2frss%2fflv.ashx%3fid%3d983287%26rf%3d448725&vfver=8&ap=1&extid=4" allowScriptAccess="never" height="325" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" scale="noScale" src="http://grouper.com/mtg/mtgPlayer.swf?v=1.1" type="application/x-shockwave-flash" width="400" wmode="transparent"> </embed>
<br>About 8 months back I uploaded whole <a href="http://www.khapre.org/content/diwali2005.aspx">Diwali Party</a> on Google video. Thought it was awesome. Then here it is <a href="http://video.msn.com">MSN Video</a> a product of competition. I am so happy to see this.
This competition has given us <a href="http://www.live.com">Windows Live</a>, a next generation of web accessories from MS. Though these Live tools are a long way from beating Google's Froogle, Spreadsheet, Notebook, Reader. Both of these competitors are more or less in BETA mode, but their products are very usable. I personally use them. Yahoo!! is also not away from competition, try Yahoo's <a href="http://farechase.yahoo.com">Farechase</a>.
I really dont care who wins, I know, whoever wins will be the best product. There is so much of population, so nobody will be out of business, unless they are bought by other. <br>Try out the new <a href="http://www.google.com/notebook">Notebook</a> from Google. I requested Google to provide RSS feed for the Public notebooks. Then I can read other feeds and make notes on MSN Live pages or Google Reader. This competition has also given us the 2 GB Email space. Gmail started this trend and now anyone who is less than 2 GB is out of business. Gmail provides an edge over as it is ever growing space. MSN Live Beta has also started a trial for Hotmail with 2 GB. You have to sign up for that. <br>
The best thing out of competition is handshake betweeen Yahoo Messager and MSN Messenger. The Windows Live Messager Beta can talk to Yahoo Messenger with Voice and vice versa. Read this <a href="http://www.microsoft.com/presspass/press/2006/jul06/07-12IMInteropPR.mspx">MS Note</a> and <a href="http://messenger.yahoo.com/partners_msn.php">Yahoo Note</a>. In Hindi, "Dushman ka dushman, dost hota hai!!", means "Enemy's enemy becomes your friend". Bottom line, this competition is giving us great tools online, some slick web programming from giants. We all sing "Kajara re!!".Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-1150814773013331012006-06-20T09:37:00.000-05:002006-06-20T09:46:13.040-05:00Brazil .... la la la<h5><a href="http://news.google.com/news?q=Fifa&num=20&hl=en&lr=&rls=GGLJ,GGLJ:2006-20,GGLJ:en&sa=X&oi=news&ct=title">AMAZING NUMEROLOGY TO PREDICT THE FIFA WORLD CUP WINNER</a></h5>
Brazil won the world cup in 1994. Before that, he had won this title for the last time in 1970. <br>
<blockquote>If you add up: 1970 + 1994 = 3964 </blockquote>
<a href="http://2002.fifaworldcup.yahoo.com/02/en/t/t/arg.html">Argentina</a> won the world cup for the last time in 1986. Before that only in 1978.
<blockquote>And 1978 + 1986 = 3964 </blockquote>
Germany, though, won the world cup in 1990. Before that, <a href="http://2002.fifaworldcup.yahoo.com/02/en/t/t/ger.html">Germany</a> won in 1974.
<blockquote>Look: 1990 + 1974 = 3964</blockquote>
This could lead us to guess the winner of the World Cup in 2002, since it should be the winner of the 1962 World Cup.
<blockquote>In fact 3964 - 2002 = 1962). </blockquote>
And <a href="http://2002.fifaworldcup.yahoo.com/02/en/t/t/bra.html">Brazil</a> won the world cup in 1962! (And, in fact, Brazil won the 2002 WC)
<br>
This numerology seems to work... and now, who would be the winner of the 2006 world cup?
<blockquote>Let's see, 3964 - 2006 = 1958</blockquote>
And who won in 1958?.... Oh, <a href="http://www.lyricskeeper.com/vengaboys-lyrics/213851-to_brazil-lyrics.htm">Brazil</a> did!!!<br>
The logic is not perfect, coz what about other world cups? But I still wanna believe and sing ...
<blockquote>
brazil
brazil na na na na na na na
nanananananannananaaaa'
nanananannanananananaaaaaa
brazil
brazil
laallalalalalaa
lalalaaaaaaaaa
lalalalaaaaa
brazil
</blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3275735.post-1150327451395783152006-06-14T18:15:00.000-05:002006-06-15T10:31:07.776-05:00RSS or Atom Reader for your siteEverybody wants to have RSS or atom feeds displayed on their site. This is with the fact that not everybody can write code to extract the feeds. Sometimes your blog is just HTML based or there can be some other difficulties.
<br>
You need an easy way to include the feed links on your website.
Try using following javascript include in your HTML page.
<blockquote>
<script language="javascript" type="text/javascript" src="http://www.khapre.org/content/rssLinkGenerator.aspx?showDate=false&showNewWindow=true&type=rss&url=http%3a%2f%2fnews.google.com%2fnews%3fhl%3den%26q%3dIndia%26ie%3dUTF-8%26output%3drss%26ned%3d%3aePkh8BM9EwLbwanF6pmXkplowAm3KQ9iEyvQTgMWuF2pQgwoVhoJhPHNedwQz7lXTWvruzZp_b0AB3kQng"></script>
</blockquote>
It displays like this....
<blockquote>
<script language="javascript" type="text/javascript" src="http://www.khapre.org/content/rssLinkGenerator.aspx?showDate=false&showNewWindow=true&type=rss&url=http%3a%2f%2fnews.google.com%2fnews%3fhl%3den%26q%3dIndia%26ie%3dUTF-8%26output%3drss%26ned%3d%3aePkh8BM9EwLbwanF6pmXkplowAm3KQ9iEyvQTgMWuF2pQgwoVhoJhPHNedwQz7lXTWvruzZp_b0AB3kQng"></script>
</blockquote>
<h5>How to use it?</h5>
Try this <a href="http://www.khapre.org/content/rssIncludeGenerator.aspx">Include Generation page</a>. Feel free to generate on your own also.</br>
Here is the Syntax<br>
<script language="javascript" type="text/javascript" src="http://www.khapre.org/content/rssLinkGenerator.aspx?showDate=< DISPLAY_DATE_OPTION >&showNewWindow=< NEW_WINDOW_OPTION >&type=< FEED_TYPE >&url=< YOUR_FEED_URL >"></script><br>
<blockquote>
< DISPLAY_DATE_OPTION > = true|false (Default:false) : Switch for publish date of the Item.<br>
< NEW_WINDOW_OPTION > = true|false (Default:false) : Switch for opening links in new window (_blank).<br>
< FEED_TYPE > = rss|atom : Swith to tell program that what is the feed format.<br>
< YOUR_FEED_URL > = Feed URL that you need to include. Make sure that it is working. Usually if the url has any special characters it needs Encoded URL format. Simlar to it is displayed in the example above.<br>
</blockquote>
rssLinkGenerator.aspx on {khapre.org} will create the HTML Table with all the URLS you need. The page writes table CSS classs as kRSSTable, kRSSTr and kRSSTd classes for table and respective HTML tags. So these can gel into your site theme very easily.
<br>
Leave a comment here, if you face any problems.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-3275735.post-1137763441454376612006-01-20T08:22:00.000-05:002015-01-29T10:45:54.281-05:00Diwali 2005<div dir="ltr" style="text-align: left;" trbidi="on">
We celebrated last Diwali in USA, here are some videos from the party.
We also played parts in cultural activities, they are at
<br />
<blockquote>
SecondCut Clip - 09:10 Mins - Me and Rohini at Fashion show<br />
SecondCut Clip - 20:10 Mins - Rohini and her friends at Fusion Dance<br />
SecondCut Clip - 34:30 Mins - Me in the Skit of vacation</blockquote>
<br /></div>
Unknownnoreply@blogger.com0