Wednesday, October 09, 2013

Developer Studio - Importing and Exporting


Developer Studio - Importing and Exporting
Importing
Developer Studio provides number of ways to import and export various project elements.  Not only importing a project as a whole, DevS has the ability to importing individual projects while you creating projects and importing artifacts separately into existing ESB projects.  Want more? Yes DevS provides an importing feature to create ESB artifacts by synapse config file. What you have to is just to point the synapse configuration file and DevS will create ESB artifacts for you.  Following sub sections describes the different ways of importing different elements into your DevStudio projects.
  1. Importing Projects with Import wizard
  2. Importing individual Projects with Project Creation Wizard
  3. Importing ESB Artifacts
  4. Importing synapse config file to create ESB artifacts

Importing Projects
Instead of creating new projects it is practical requirement that you may want to import an existing project.  Suppose you need to continue further development on an existing project where projects has a certain hierarchy (e.g. with several sub projects under a given project and so on) and you want to continue development on some selected projects without altering the original project hierarchy. DevS provides a Import option to cater this requirement. It is simple as few steps, first make sure you have latest source files copied (or checked out from your source control system) to your local file system. Then do the following:
  1. Open Developer Studio.
  2. Right-click the Project Explorer in Developer Studio and choose Import -> Import.
  3. In the Import dialog box, expand the WSO2 category, select Existing WSO2 Projects in to workspace, and click Next.
  4. In the Import Projects dialog, click Browse, select the directory where the Parent project resides on your local file system, and click OK.
  5. The Import Projects dialog now displays all the WSO2 projects in the Parent project you selected. Select the projects you want to import into your workspace and click Finish.

Importing individual Projects with Project Creation Wizard
DevStudio provides importing option in almost all project creation wizards it utilize. When you try to create a project DevS provides you two options, whether to create a new project or create a project by importing existing project file. Importing  from file system is available for following projects.

  1. Web Application Project
  2. Esb Config Project
  3. Registry Handler Project
  4. Data Service Project
  5. BPEL workflow Project
  6. Gadjet Project
  7. CEP Project
  8. Business Rules Service Project
And importing from workspace is available for following projects
  1. Carbon UI Bundle Project
  2. Mediator Project
  3. Registry Handler Project
  4. Data Service Validator Project




Importing ESB Artifacts
Developer Studio supports importing artifacts into existing project through artifact creation wizards as similar to Importing projects in project creation wizards. Importing artifacts from file system is supported for following artifacts.

  1. Proxy Service
  2. Sequence
  3. Endpoint
  4. Message Store
  5. Message Processor
  6. Scheduled Task
  7. Template
  8. REST API
  9. Local Entry



Importing synapse config file to create ESB artifacts
Suppose you do not have the source for ESB project but you have the synapse configuration (copied from ESB server) and you want to modify this configuration or modify several artifacts. Developer Studio provides a cool importing feature for this purpose. What you have to do is import synapse configuration and let Developer Studio to create artifacts for you. Follow the below step to import ESB artifacts from synapse configuration file.
  1. Open Developer Studio.
  2. Right-click the Project Explorer in Developer Studio and choose New -> Synapse.
  3. or Open DeveloperStudio dash board and click on Synapse under Enterprise Service Bus  category
  4. In the artifact creation wizard, choose Import Synapse Configuration from File System
     

  1. Browse the synapse config file and choose the ESB project in which you want to create the artifacts.
  2. Tick on Create ESB Artifacts checkbox and select the artifacts which you want to created in the ESB project and click Finish.
     





Monday, July 08, 2013

Simple Proxy Configuration to test the functionalities of ESB mediators

To test how ESB mediation works or to observe the functionalities of various mediators you may probably need to set up a ESB and let your messages to pass through by ESB. And then observe the input and output. Typical scenario would be client --> ESB --> server configuration. but if you want only to observe the functionalities of components in easy way here's the trick.

Following configuration can be used to sends the message backs to the client


   
      
         
         


How it works


Here we remove the To header from SOAP envelop.

When this property is set to 'true' on a message, the ESB will start treating it as a response message. It is generally used to route a request message back to its source as the response.

Therefore with above configuration, it will send response to client directly from inSequence. i.e it loop backs the message to the client. If you add your esb mediation/modifications within "!-- your esb modifications here --" you can simply observe the difference of message you send and received.