To expose as a service , you have to define a proxy service as follows.

<definitions xmlns="http://ws.apache.org/ns/synapse";>

<!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) -->

   <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">

<!-- the root property of the simple URL registry helps resolve a resource URL as root + key -->

<parameter name="root">file:repository/conf/sample/resources/</parameter>

<!-- all resources loaded from the URL registry would be cached for this number of milli seconds -->

       <parameter name="cachableDuration">15000</parameter>

   </registry>

<localEntry key="xslt-key-req" src="file:repository/conf/sample/resources/transform/transform.xslt"/>
   <proxy name="StockQuoteProxy">

       <target>

           <inSequence>

               <log level="full"/>

<!-- transform the custom quote request into a standard quote requst expected by the service -->

               <xslt key="xslt-key-req"/>

               <log level="full"/>

           </inSequence>

           <endpoint>

<address uri="http://localhost:9000/soap/SimpleStockQuoteService"/>

           </endpoint>

           <outSequence>

<!-- transform the standard response back into the custom format the client expects -->

<!-- the key is looked up in the remote registry and loaded as a 'dynamic' registry resource -->

               <log level="full"/>

               <xslt key="transform/transform_back.xslt"/>

               <log level="full"/>

               <send/>

           </outSequence>

</target>
   </proxy>

</definitions>

And run the sample client as to test it out

ant stockquote -Daddurl=http://localhost:8280/soap/StockQuoteProxy 
-Dmode=customquote

Thanks
Indika


Dinuka wrote:
Hi Ambica,
You can see the request/response messages coming in and going out of the ESB by inserting a log mediator within the in sequence and the out sequence. Just insert a <log level="full"/> tag before the closing tag of <in> and another before the closing tag of <out> and you will be able to see the request/response messages logged within the console.

Regards,
Dinuka


ambica sona wrote:
Hi to all,
I understood the execution of samples which we have in the download but not getting an idea on how to start a new one. Sorry to say this but i am unable to proceed. I have worked on mule, service mix and jboss ESB but i heard from some one and got from search pages that WSO2 is the best among all so interested in working this. May b my mind set is like as other ESB s and this i am feeling little confusing. I need some clarifications still. For example, i have run sample8 and got the response. As it is using XSLT s i want to know on which req these XSLT s been applied? and in return i got the stock quote price but i want to see the response after these XSLT s have been applied. and the mani thing is how can i expose this as a service so that my clinets can send request to this service(want to know something like what will be the URL to which my clients will post request). Please answer me ASAP so that i can continue. On 9/2/08, *Saliya Ekanayake* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi Ambica,

    The axis2Server folder contains necessary software/configuration to
    start the sample back end services. The most of the samples that are
    explained in the WSO2 ESB Samples guide [1] require you to have
    back end
    services which actually contain the business logic. Look into the
    "src"
    directory of the axis2Server and you will find a set of services
    in six
    different folders. You can use Ant to build and host these services
    inside the provided Web service container, Apache Axis2. After hosting
    the services you can start Axis2 using the axis2server.sh (or the .bat
    version) inside the axis2Server folder. Note: please refer to the
    sample
    guide to see which service is required for which sample.

    After setting up the services you need to configure the ESB to
    suit your
    scenario. The client comes into play afterwards. The axis2Client
    folder
    contains the necessary client code to call the ESB. You can again use
    Ant to build and run the client. The parameters you need to specify
    depends on the particular sample that you are testing. Again, please
    refer to the samples guide for more information.

    Please note that these clients and services have nothing to do
    with the
    ESB except in providing additional resources for the samples.

    [1] http://wso2.org/project/esb/java/1.7.1/docs/ESB_Samples.html

    Regards,
    Saliya

    <http://wso2.org/project/esb/java/1.7.1/docs/ESB_Samples.html>
    ambica sona wrote:
    > Thankyou for all for your quick responses.
    > under the samples i have 2 floders one is Server and other is
    Client.
    > Both are related to each other right?
    >
    >
    > On 9/2/08, *Saliya Ekanayake* <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
    >
    >     Hi Ambica,
    >
    >     Thanks for the suggestion, but may be you have not seen the rest
    >     of the
    >     samples (I am assuming this as you have mentioned that you got
    >     only one
    >     sample). Please try downloading a clean one from
    >     http://wso2.org/downloads/esb/
    >
    >     Anyway regarding the issue at hand, the obvious solution is to
    >     implement
    >     a simple proxy service. A proxy service basically means that you
    >     expose
    >     a service interface to the outside world without actually
    having the
    >     business logic with you. You configure the proxy service
    such that you
    >     do whatever with the incoming message and send it to the
    real back end
    >     service, then do whatever with its response and then send
    back the
    >     response. WSO2 ESB gives you the support to perform XSLT
    transforms
    >     using the entity known as the XSLT mediator.
    >
    >     Regards,
    >     Saliya
    >
    >     ambica sona wrote:
    >     >
    >     > Hi to all,
    >     >
    >     > I am new to WSO2. for our project we are going to use an
    ESB. i got
    >     > information that WSO2 is the one which has so many features.
    >     > So we thought of implementing that. When i download i got
    only one
    >     > sample. but i am not cleared by looking in to that sample.
    >     > Actually my requirement is a request will come as an HTTP
    Request. I
    >     > need to apply some transformation rules on that request using
    >     some xsl
    >     > file and route to a URL which will send the response back
    to me and
    >     > then to this response i need to apply few transformations
    again and
    >     > send the response back as an HTTP response.
    >     > i am not understanding at all how to start, how to send the
    >     request or
    >     > how to get the response. how can i get an ESB application
    developed
    >     > using WSO2 as a service or a web application???
    >     > can some one help me out in this.
    >     > and my small suggession is its better to add an HTTP request-
    >     response
    >     > processing flow sample as an example in download...
    >     >
    >     >
    >     > Waiting eagerly for a reply.
    >     >
    >     > Thank you
    >     >
    >     >
> ------------------------------------------------------------------------
    >     >
    >     > _______________________________________________
    >     > Esb-java-dev mailing list
    >     > [email protected] <mailto:[email protected]>
    <mailto:[email protected] <mailto:[email protected]>>
    >     > http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
    >     >
    >
    >
    >     _______________________________________________
    >     Esb-java-dev mailing list
    >     [email protected] <mailto:[email protected]>
    <mailto:[email protected] <mailto:[email protected]>>
    >     http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
    >
    >
    >
    ------------------------------------------------------------------------
    >
    > _______________________________________________
    > Esb-java-dev mailing list
    > [email protected] <mailto:[email protected]>
    > http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
    >


    _______________________________________________
    Esb-java-dev mailing list
    [email protected] <mailto:[email protected]>
    http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-dev


------------------------------------------------------------------------

_______________________________________________
Esb-java-dev mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-dev


_______________________________________________
Esb-java-dev mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG - http://www.avg.com Version: 8.0.169 / Virus Database: 270.6.15/1648 - Release Date: 9/2/2008 5:29 PM


_______________________________________________
Esb-java-dev mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-dev

Reply via email to