Friday, December 24, 2010

Managing Certificates on Windows

You can use Microsoft Management Console to manage certificates.

1.       Start->Run->mmc

2.       File->Add/Remove Span In… -> Add -> Certificates -> Add->Select ”Computer Account”->Next-> Select “Local Computer” -> Finish-> Close -> OK

3.       Here you can see a complete list of certificates that have been imported (Trusted/Untrusted/Revoked list and Personal Certificates)

You may create/import and export certificates from this console.  You can use File->Save As to save this console as a shortcut. All this can be done through the command prompt as well.

Friday, December 17, 2010

Could not find default endpoint

Could not find default endpoint element that references contract 'IMySOAPWebService' in the service model client configuration section. This might be because no configuration file was found for your application or because no end point element matching this contract could be found in the client element

This error can arise if you are calling the service in a class library and calling the class library from another project.

In this case you will need to include the WS configuration settings into the main projects app.config if its a Windows app or web.config if its a web app.

Tuesday, December 14, 2010

Mobile - Location sharing and updating

Google Latitude App lets you share your location with friends.

You can also track your friends' location on Google Maps. This was released for iPhone, iPad and iPod Touch recently and is available at the Apple Store for free. You can also toggle background updating and/or just choose to share the residing place.

I am not sure why people would like to share their location continously! Its a waste of battery and security issue :-)

Latitude is available for Android, iPhone and iPod touch, BlackBerry, Windows Mobile, and Symbian S60

Sunday, December 12, 2010

Windows 7 performance boost

  1. Delete
    1. %temp%
    2. prefetch
    3. temp
  2. Disk cleaner
  3. Disk Defrag

Thursday, December 09, 2010

2 (two) way SSL using soapUI as client and server

soapUI has been a wonderful tool for testing webservices. It can also generate MockServices  which can be used for testing the client if you have the WSDL contract. This is a very quick way to get up and running. You can also add WS-Security to it. There is a very good tutorial on soapUI to for using SSL as well. I wanted to extend this to use 2 way SSL. I have keytool command-line utility for generating keystore and certificates.

On Server
keytool -genkey -alias server -keyalg RSA -validity 3650 -keystore c:\server.keystore -storepass abcd1234 -keypass abcd1234 
keytool -export -alias server -keystore c:\server.keystore -storepass abcd1234 -file c:\server.cer 
keytool -import -alias client -keystore c:\server.keystore -storepass abcd1234 -file c:\client.cer 

Settings on the server prior to generating the mock service:-


On Client
keytool -genkey -alias client -keyalg RSA -validity 3650 -keystore c:\client.keystore -storepass abcd1234 -keypass abcd1234 
keytool -genkey -alias client -keyalg RSA -storetype PKCS12 -keystore c:\client.p12 -storepass abcd1234 -keypass abcd1234 
keytool -export -alias client -keystore c:\client.p12 -storetype PKCS12 -storepass abcd1234 -file c:\client.cer 
keytool -import -alias server -keystore c:\client.keystore -storepass abcd1234 -file c:\server.cer

Settings on the client prior to generating the request:-


Once the request is sent and the correct response is obtained after decryption :-

client after response

Raw response on client side :-

Raw response on client side

Raw response on server side:-

Raw response on server side

NOTE: Generate the request and MockService AFTER saving the SSL preferences and restarting soapUI. It might not work if you do it the other way around. Also, make sure you use https as the endpoint on the client end.

If wrong password is entered in client you will get bad_certificate response and it will not decrypt the response on the client end :-


Zeitgeist 2010: Year in Review

Wednesday, December 08, 2010

Ubuntu wubi installation and upgrade to 10.10 "Maverick Meerkat"

Ubuntu wubi installation is now at 10.04 “Lucid Lynx” and it is not recommended to upgrade to 10.10 "Maverick Meerkat". I tried doing this yesterday on my test PC and now I am not able to reboot into Ubuntu.

Click here to view these pictures larger

Fix is currently being worked upon:

There are many posts that describe how to workaround this problem:

I uninstalled wubi and will try a full installation 64-bit from Live CD. Seems like wubi is just for testing/ simulation of Ubuntu on Windows.

Tuesday, December 07, 2010

Dell Inspiron N4010

First pictures of refurbished Dell Laptop 14R used for testing :-

Click here to view these pictures larger

Notebook,Inspiron,N4010,Configure To Order

Keyboard,United States,English,C11S,N4010

Hard Drive,500,5.4,P11,SGT-W,Across Line Of Business

Information,DHS,High, Value

Cover,Liquid Crystal Display,IMR,Blue,N4010



Dvd+/-rw And Bd-rom,Hitachi Lg Data Storage,Inspiron

Card,Network,BLTH365,Consumer Notebook,Dell Americas Organization

Media,Digital Video Disk Drive,Driver,Resource DVD,N4010

Dual In-line Memory Module,4GB,1333MHZ,DDR3,2X2G

Digital Video Disk Drive,Multiple User Interface,NO-E

Liquid Crystal Display,14.0 High Definition,LGP,N4010

Software,Powerdvd,8.3,Blu-Ray Disk Playback,True Theatre High Definition,Factory Install


Software,Mcafee SAPPHIRE,30DAY,Multiple User Interface


Cord,Power,125V,1M,C5,United States

Software,Works,9 English

Software,Creative Camera,Consumer,1.4,Factory Install



Bezel,Liquid Crystal Display,With Camera,N4010


Software,Certificate Of Authenticity,W7HP32/64

Label,Notebook Inspiron,Break The Seal Sticker


Software,Roxio,BURN,1.0,Factory Install

Warranty Support, Initial Year

First impressions

  1. Cheap!
  2. i5 processor
  3. SRS surround sound
  4. Excellent keyboard and mouse
  5. Beautiful peacock blue color
  6. 1 partition HDD
  7. No bloatware/crapware from Dell
  8. Win 7, Ms Works 9, Driver CDs provided separately :-)
  9. No scratches. I was expecting scratches for refurbished models
  10. Quick shipping and good packaging

Saturday, December 04, 2010

HP Pavilion dm4t-1100 review

I had the chance to test a new HP Laptop. The configuration was :

HP Pavilion dm4t Entertainment PC
• Genuine Windows 7 Home Premium 64-bit
• Intel(R) Core(TM) i7-640M Dual Core Processor (2.8 GHz, 4MB L3 Cache) with Turbo Boost up to 3.46GHz
• Intel(R) HD Graphics [HDMI, VGA]
• FREE Upgrade to 4GB DDR3 System Memory (1 Dimm)
• Microsoft(R) Office Starter 2010
• No additional security software
• 6 Cell Lithium Ion Battery (standard) - Up to 6.25 hours of battery life
• 14.0" diagonal High-Definition HP BrightView LED Display (1366 x 768)
• FREE Upgrade to 500GB 7200RPM Hard Drive with HP ProtectSmart Hard Drive Protection
• SuperMulti 8X DVD+/-R/RW with Double Layer Support
• HP TrueVision Webcam and Fingerprint Reader
• Wireless-N Card
• Standard Keyboard
• HP Home & Home Office Store in-box envelope

Here are my findings:-


  1. Sleek
  2. Thin
  3. Good battery life
  4. Many reviews complained about resolution but I was happy with the max resolution  (1366 x 768)
  5. Excellent HP TrueVision camera 


  1. Comes with 4 partitions : Boot, C, Recovery, System
  2. Packed with lots of HP software and utilities
  3. Bloated Windows 7 system that takes a long time to clean
  4. Low quality sound and low sound level
  5. It is very difficult to use th mouse pad. Not compatible with Linux systems
When I talked to HP customer care here is what they had to say :-
We recently received the feedback you filled out and returned to us via the customer satisfaction survey. I assure you that your concerns are important to us.  Your feedback indicated you were not happy with all the extra software that was included on your computer.  This is standard on all of our computers and we do not have the capability to ask that the software not be installed.

I do apologize for any inconvenience that this may have caused you.

Customer Relations Team

Saturday, November 27, 2010

Mousepad problem on Ubuntu 10.10 for HP Pavilion dm4-1160

I have an HP pavilion dm4 and have installed 64-bit ubuntu 10.10.

The touchpad works fine in Win7 but is totally erratic in Ubuntu. If I put more than one finger on the touchpad, the cursor jumps all over the place erratically and randomly submits clicks. The right-click function of the touchpad also doesn't work.

In the mouse settings, the option for multi-touch is grayed out, but the touchpad is obviously still registering multi-touch info. I did try disabling mouse clicks to no avail; the cursor would still jump around erratically.

I've tried installing gsynaptics, but that doesn't help. I've also tried a few scripts provided by other people for enabling multi-touch when the option is greyed out, but that doesn't help. I've also tried uninstalling and reinstalling the synaptics xorg touchpad driver with no luck.

Finally I found a great post with a script to fix this :

Saturday, November 13, 2010

Comparing processors

With many different processors in the market (AMD, Intel) and versions in them (Celeron, i3, i5, i7, Phenom, Athlon, Turion) it has been increasingly difficult to compare prices and performance. I found the following sites extremely useful :-

    PassMark Software has delved into the thousands of benchmark results that PerformanceTest users have posted to its web site and produced five Intel vs AMD CPU charts to help compare the relative speeds of the different processors. Included in this list are CPUs designed for servers and workstations (Intel Xeon and AMD Opteron processors), desktop CPUs (Intel Core2 Quad, Intel Core i7, Intel Core2 Extreme and AMD Phenom II processors), in addition to mobile CPUs.
    Provides serious and competent information about laptops and notebooks. Notebookcheck provides tests, reviews, news, technical information (like CPU and GPU comparisons) and links to reviews by other sites.

Wednesday, November 10, 2010

Remove open jdk and installed Sun Java on Ubuntu

Ubuntu installs OpenJDK as default Java since version 8.04. Many programs require Sun Java to work and just installing Sun Java did not solve the issue for me. There are many guides that help you uninstall and reinstall many packages. The simplest method is to

Remove the following from Ubuntu Software Center :-

  1. openJDK Java6 runtime
    1. icedtea 6 plugin
    2. libaccess bridge java
  2. openJDK java 6 web start
and then install:-
  1. sun-java6-jre
  2. sun-java6-jdk
  3. sun-java6-plugin 

Tuesday, November 02, 2010

soapUI Pro version!

I am a fan of soapUI and having installed soapUI free version on my new PC a few days back I realized there was a promotion for their 5th anniversary :

It was to find secret codes on their web site which meant you had to read most of their pages. I did that and got myself a soapUI Pro license. Wohoo! The license key just arrived today and I installed it right away…

I have used soapUI free and Pro versions (company license) extensively in the past I am very familiar with the interface and the features. I just love this product!


Monday, November 01, 2010

Crop functionality in Microsoft Office Outlook 2007

Having recently moved to Ms Office Outlook 2007 (phew!) I noticed that we now have the crop photos functionality. This was missing in the previous versions. No more Ms PowerPoint tricks!


Saturday, October 23, 2010

Check if computer supports 64 bit OS

The easiest way to check if you have a 64 bit processor is to download CPU-Z from

CPU-Z is made available as a zip file, unzip it and then run the exe it contains. The program will collect information about your processor and then under the CPU tab, in the instructions column, see if you have any of these AMD64, x86-x64 or EM64T. if you have any of these then your processor is 64 bit.

If your PC has a 64 bit processor then you will be able to run the 32 or 64 bit version of the operating system of your choice. Currently there aren't a huge number of free 64 bit applications for Windows. Details of those that are available can be found here.


Saturday, October 16, 2010

SSMS - Can not paste more than 43679 characters from a column in Grid Mode

Ever tried copying large data from Ms SQL Server? Good luck – It only copies 43679 characters. There is no way to increase this limit. A feature request has been filed: I don't think this will be fixed anytime soon since the interface is meant to be admin interface and not a developer tool. I found a couple of workarounds with this (esp. for XML data) but my XML is really huge and it takes a lot of processing power to make that work. In short, it does not work for me.



Best option is to right click the cell as shown above and use “Save result as” to export data into say : .cvs file which opens up to reveal the entire cell data. Now copy paste your data into your favorite editor like Notepad++ and use XML Tools to indent it into XML (if it is XML)


Wednesday, October 13, 2010

Validate WSDL using Eclipse

When you create a wsdl file from scratch or use an already designed one, you must make sure it is valid. In other words it should;
  • consist of well-formed XML (All tags should be closed and nested properly)
  • conform to XML Schema
  • comply with the rules and standards defined in WSDL specification
  • valid with the rules defined by WS-I (Web services interoperability organization)
Eclipse Web tools project (WTP) provides a very useful tool which validates a wsdl against above rules/standards.
Lets see how we can validate an existing wsdl using Eclipse wtp.
1. Download and install Eclipse wtp
2. Open eclipse IDE
3. Start to create a new wsdl (File --> New --> other --> Web Services --> WSDL)
4. Give a name to the wsdl (you can provide the name of wsdl which needs to be validated) and click on next. Accept the default options and click on Finish.
5. You will see a design view of a new wsdl file. Move to source view by selecting "Source" tab.
6. You will see an skeleton source of the new wsdl. Just remove it. (remove all elements in the wsdl)
7. Copy the contents of your existing wsdl (Suppose it is Myservice.wsdl) and paste in the source tab.
8. Save it by selecting save button in eclipse tool bar.
9. Right click on the wsdl file and select Validate
If your wsdl has errors, those will be shown in problems pane.
You may notice that we create a new wsdl, remove its content and copy the existing (already created) wsdl in to source view of wsdl validator. I suggest that as a work around because I could not find a way to import an existing wsdl directly into wsdl validator.

Saturday, October 09, 2010

Building .NET projects using Hudson Continuous Integration

This is a quick start up to getting your .NET Visual Studio projects to build using Hudson Continuous Integration server.
  1. Download and install latest version of Java
  2. Download Hudson server You might get Rename it as hudson.war. Suppose c:\Hudson\hudson.war
  3. Start Hudson using the command java -jar hudson.war You will see the output like -
  4. Use the browser and hit http://localhost:8080/ This is the beauty of Hudson. Once you see the Hudson Dashboard it means you are up and running
  5. Go to Manage Hudson and if you see a new version of Hudson is available install it
  6. Go to Manage Hudson-> Configure System and install the MSBuild plugin, MSTest plugin, NUnit plugin, Violations plugin and NAnt plugin
  7. Shut down hudson and start it again. This will get the new version up and running
  8. Go to Manage Hudson->System Configuration http://localhost:8080/configure and configure path of MSBuild.exe to point to c:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe
  9. Configure the email settings and NAnt settings etc

At this point installation and configuration is complete. Now to create jobs

  1. On the Dashboard Click New job->Build a free-style software project->OK
  2. Enter the SVN url of the project [Hudson has built-in SVN support. If you use other source control systems then you might have to install plugins]
  3. To test the configuration, press Save and then Build. The source code will be downloaded from the repository and put into the Workspace
  4. Click the ‘Add build step’-> ‘Build a Visual Studio project or solution using MSBuild’ Enter the solution file path if you want to build the entire solution or the project path
  5. To test the configuration, press Save and then Build. Now the source code should be updated if there any changes and then built using MSBuild. While the build is running you can check the Console log that is updated as the build continues.
That's it folks. Try it and let me know if that works! Hudson is very configurable so you can be creative with your builds and test cases.

PS: I will add pictures shortly.

Friday, October 08, 2010

Cannot Determine MEP

ERROR - GeronimoLog.error(108) | Cannot Determine the MEP
org.apache.axis2.AxisFault: Cannot Determine the MEP
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.getMEP(
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateOperations(
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populatePortType(
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(
    at org.apache.ode.axis2.hooks.ODEAxisService.createService(
    at org.apache.ode.axis2.ODEServer.createService(
    at org.apache.ode.axis2.BindingContextImpl.activateMyRoleEndpoint(
    at org.apache.ode.bpel.engine.ODEProcess.activate(
    at org.apache.ode.bpel.engine.BpelServerImpl.register(
    at org.apache.ode.axis2.ODEServer.handleEvent(
    at org.apache.ode.axis2.ODEServer.access$100(
    at org.apache.ode.axis2.ODEServer$ProcessStoreListenerImpl.onProcessStoreEvent(
    at org.apache.ode.axis2.deploy.DeploymentPoller.check(
    at org.apache.ode.axis2.deploy.DeploymentPoller.access$300(
    at org.apache.ode.axis2.deploy.DeploymentPoller$

Usually means there is an error in the WSDL

Saturday, October 02, 2010

Associate default language with specific extensions in Notepad++

If you use Notepad++ often, you may notice that it recognizes the type of file you open and provides nice synatx style for the language of the file. For example, it knows .js is a JavaScript file and .css is a CSS file. Each file type has its own unique style settings. There are a lot of these predefined file types, but what if Notepad++ doens’t support a file type you open often? If you want to make a custom file type use the same style of another type, just use the Style Configurator to define your own extensions.

In Notepad++ navigate to Settings > Style Configurator…

Choose a language on the left side that you want your own extension to match (i.e. if I want .configfiles to style like XML then I’d choose XML). In the User ext. field near the bottom, enter in your custom user extension without the dot in front of it (e.g. bpel for *.bpel files). Now open a new file and it will map that new extension to the style you’ve chosen.


Wednesday, September 29, 2010

Disable internal PC speaker

If you're running Microsoft Windows you can disable the Internal speaker or PC speaker by following the below steps.

  1. Open Device Manager
  2. In Device Manager click View and click "Show hidden devices"
  3. This should make "Non-Plug and Play Drivers" visible in Device Manager.
  4. Expand Non-Plug and Play Drivers by clicking the plus and double-click Beep.
  5. Within the "Beep properties" window click the Driver tab.
  6. Under the driver tab if you wish to temporarily disable this device click the Stop button. If you wish to permanently disable this device under the Startup Type select Disabled.



Saturday, September 18, 2010

Consumer Reports features ratings and recommendations of thousands of products and services. In addition to the ratings and reviews in the monthly print version, the online subscription offers more frequent updates, video clips, consumer user reviews, and a shop online feature.

It is an easy way to get good unbiased expert, independent reviews of electronic products and services. I used it recently for car and laptop reviews

You should be able to access most parts of the website through your local Library access. Yet another great use of my Memorial Hall Library card :

As a library user I have access to reviews, ratings, expert buying advice, product comparisons, consumer user reviews and product video clips. It also features reliability data, product specs, recommendations. I cannot post to the forums or access the “subscriber only” forums using the library account. Its a very easy way to zoom down to the product you would like to use.

Saturday, August 28, 2010

BPEL Designer for Apache ODE on Eclipse Helios

Last couple of years there has been very less interest in the BPEL Designer plugin for Eclipse IDE and hence the last it has been tested for is Eclipse Ganymede (3.4.x). Since then two more versions of Eclipse Galileo (3.5.x) and Helios (3.6.x) have been released. Some of the dependencies and packages have evolved with time. This has made it increasingly difficult to use BPEL Designer with the latest version of Eclipse.
Bob Brodt trying to breathe some life back into this project and hopefully build a usable editor and deployment toolset. Have a look at this. I still had to make Apache ODE work with BPEL and use the BPEL Designer plugin. So instead of waiting for M5 release here are some steps I took to make it work. Sadly, I do not have a test machine and I do not know which is the magic step :-( I just did a bunch of things in the same direction.

  1. Use Eclipse IDE for Java EE Developers Version: 3.6.x Helios release
  2. Use Apache ODE 2.0 beta 2 or higher
  3. Get BPEL plugin from the update site : When I used it in Aug 2010 it was built and tested for Eclipse Ganymede (3.4.x) and was around version 0.4-0.5 stages
    1. Click Help –> Install New Software                                                                                                image       
    2. Add the following update site. Download the latest BPEL plugin, install and restart Eclipse                                                                                                    image
    3. Checked out all plugins from CVS for BPEL. Many companies block CVS ports. For me both 2401 was blocked while 443 and 80 were monitored for CVS traffic. I had to try this from home                                                        image
  4. Get all dependencies like
    • EMF Compare
    • Latest version of JSDT and WST
    • Changed file C:\Projects\org.eclipse.bpel\plugins\org.eclipse.bpel.examples.extensionPoints\META-INF\MANIFEST.MF to update dependencies :-
      • org.eclipse.wst.jsdt.core;bundle-version="1.1.0",
      • org.eclipse.wst.jsdt.ui;bundle-version="1.1.0"
    • I also removed a couple of WST dependencies to make it work since my WST was up to date.
  5. Install latest Tomcat version 6.0 or later (exe or zip) and drop the latest ODE file (>2.0 beta 2) ode.war into the webapps directory of Apache Tomcat
  6. To configure a launch configuration refer to the same manual section 2.2.2 You might have to increase the MaxPermSize in your eclipse settings. My settings in eclipse.ini were
    1. -Dosgi.requiredJavaVersion=1.5


    1. Set up the Eclipse BPEL Designer with ODE using section 2.3
    2. Create a sample project using section 3
    3. Finally you can copy the modified bpel/plugins to eclipse/plugins and overwrite the files. This will eliminate the need to deploy an eclipse application to get to the BPEL Designer.
    Here are some screenshots. I will

    Thursday, August 19, 2010

    Transfer Contacts from one Cell Phone to another

    Amit has an article that shows how we can transfer contacts from one cell phone to another

    in reference to:

    "Transfer Contacts from one Cell Phone to another"
    - How to Transfer Contacts from one Cell Phone to another Phonebook (view on Google Sidewiki)

    Stop Adobe PDF security popup

    With the latest version of Adobe Reader you get a security popup for a PDF that is set to Auto-print. We have some iText generated PDFs that auto-print but recently started receiving the following pop-up:-

    To stop this popup you can add the hostname as a secure

    Spring:form bug creates invalid “id”

    Spring 3.0.1 inadvertently broke the indexed properties which are set by the form tag when “path” is used.


    <c:forEach items="${continent.countries}" var="entry">
    <form:input path="countries[${entry.key}]" />


    Spring 3.0.1 generates

    <input type=”text” name="countries0" id=”countries0” value=”Belgium”></input>

    Instead it should generate:-

    <input type=”text” name="countries0" id=”countries[0]” value=”Belgium”></input>

    Notice the brackets [ ] in the id. This results in failure in binding the values to the form. A JIRA issue has been raised for this: The bug was fixed and released in Spring 3.0.4

    Wednesday, August 11, 2010

    Apache ODE : Headers as Abstract Message Parts

    The Apache ODE web site does not do a good job at explaining the “Headers as Abstrct Message Parts” method of handling the headers. I have explained here how you can define soap headers in the wsdl so the BPEL process expects them in the header and how you can parse these headers to get information.

    Basically if you follow the normal development pattern what you will end up with is and you will end up with the error message :

    More than one part for message HelloWorldRequestMessage

    Referring to the base engine which is Axis 2 : I modified my code to make the wsdl:input say:-

    <soap:body parts="payload" use="literal" />
    <soap:header message="tns:HelloWorldRequestMessage" part="helloElement" use="literal"/>

    The wsdl:operation was defined as:-

            <operation name="process">
    <input message="tns:HelloWorldRequestMessage" />
    <output message="tns:HelloWorldResponseMessage"/>

    And the wsdl:message was defined as:-

        <message name="HelloWorldRequestMessage">
    <part name="payload" element="tns:HelloWorldRequest"/>
    <part name="helloElement" element="tns:HelloElement"/>

    The element was defined in the normal fashion:-

                <element name="HelloElement">
    <element name="username" type="string"/>
    <element name="role" type="string"/>


    In the BPEL you retrieve the header from the input message which is mapped to HelloWorldRequestMessage

    <bpel:from variable="input" part="helloElement" />
    <bpel:to variable="output" part="payload"/>


      1: <soapenv:Envelope xmlns:soapenv="" xmlns:hel="http://helloWorld"> 
      2:    <soapenv:Header> 
      3:     <hel:HelloElement> 
      4:         <hel:username>Admin</hel:username> 
      5:         <hel:role>SuperUserAccess</hel:role> 
      6:     </hel:HelloElement> 
      7:    </soapenv:Header> 
      8:    <soapenv:Body> 
      9:       <hel:HelloWorldRequest> 
     10:          <hel:input>?</hel:input> 
     11:       </hel:HelloWorldRequest> 
     12:    </soapenv:Body> 
     13: </soapenv:Envelope>


      1: <soapenv:Envelope xmlns:soapenv="">
      2:     <soapenv:Body>
      3:          <HelloWorldResponse xmlns="http://helloWorld">
      4:                <username>Admin</username>
      5:                <role>SuperUserAccess</role>
      6:          </HelloWorldResponse>
      7:     </soapenv:Body>
      8: </soapenv:Envelope>


    Saturday, August 07, 2010

    Apache ODE: Dynamic Headers (SOAP Headers)

    SOAP headers that are not declaed in WSDL bindings can be used in ODE. If messages are present in the SOAP header they will be used but there is no validation as in other case (Headers as Abstract Message Parts)
    I have attached the 2 test processes that I developed. They don’t have any fault handling at present but in production we need to handle faults since there can be no/different headers. Search for the part of code that says :-
                                                                   <bpel:to variable="output" header="ConversationId"></bpel:to>

    In this case it is copying the input variable and adding header to the SOAP output. Similarly in the other case it is parsing the required field from the header.

    Add header:-


      1: <soapenv:Envelope xmlns:soapenv="" xmlns:hel="http://helloWorld">
      2:    <soapenv:Header/>
      3:    <soapenv:Body>
      4:       <hel:HelloWorldRequest>
      5:          <hel:input>Test</hel:input>
      6:       </hel:HelloWorldRequest>
      7:    </soapenv:Body>
      8: </soapenv:Envelope>


      1: <soapenv:Envelope xmlns:soapenv="">
      2:    <soapenv:Header>
      3:       <input xmlns="http://helloWorld">Test</input>
      4:    </soapenv:Header>
      5:    <soapenv:Body>
      6:       <HelloWorldResponse xmlns="http://helloWorld">
      7:          <tns:result xmlns:tns="http://helloWorld"/>
      8:       </HelloWorldResponse>
      9:    </soapenv:Body>
     10: </soapenv:Envelope>

    Parse Header:-


      1: <soapenv:Envelope xmlns:soapenv="" xmlns:hel="http://helloWorld">
      2:    <soapenv:Header>
      3:                 <hel:ConversationId>This header will be parsed to get this message</hel:ConversationId>
      4:    </soapenv:Header>
      5:    <soapenv:Body>
      6:       <hel:HelloWorldRequest>
      7:          <hel:input>?</hel:input>
      8:       </hel:HelloWorldRequest>
      9:    </soapenv:Body>
     10: </soapenv:Envelope>


      1: <soapenv:Envelope xmlns:soapenv="">
      2:    <soapenv:Body>
      3:       <HelloWorldResponse xmlns="http://helloWorld"> This header will be parsed to get this message </HelloWorldResponse>
      4:    </soapenv:Body>
      5: </soapenv:Envelope>