Answers below!
1) is it possible to ad a little logging into this routing ?
<case regex="01.*">
<log>
<property name="routedTo" value="Routing getStockNumber to WARE01"/>
</log>
<send>
<endpoint address="http://warehouse1/service/getStockNumber"/>
</send>
</case>
Sure... that works perfectly.
2) i am comming from the web development side and do not know "that"
many of webservices
is this now a classical redirect on base of http or is it a statefull
intercepted call that goes really with 100% of payload through the
synapse server then into the warehous and back to synaps and back to
the callee?
By default this will come back to Synapse and then to the callee.
3) is it possible that the ws, synapse provides in this scenario can
be found under an alias like
http://synapseserver/service/SOMEWHEREELSE1/SOMEWHEREELSE2/withOtherFunctionName
if yes is synapse producing the WSDL for this case?
This is implemented by our new "PROXY" services. See
http://www.wso2.net/tutorials/synapse/java/2006/06/26/wsdl-mediation-proxy-services-on-synapse
This is not yet in the release - we are looking to do a new release
with this in very soon.
4) is it possible to "remember" some state e.g. a counter which is
incremented e.g. how often a route to warehouse 1 hase been
used/called
We don't do this yet - but it will make a great sample - I will add
this to our list of samples. But in the meantime you can write a user
mediator very simply that does this.
5) where can i find a little mor documentation that i dont have to
bother you all the time ? ;-)
http://wiki.apache.org/incubator/Synapse/SynapseConfigurationLanguage
and browse here: http://wiki.apache.org/incubator/Synapse
But this is work in progress - we know we need lots more documentation!!!
regards chris
You are very welcome!
On 7/3/06, Paul Fremantle <[EMAIL PROTECTED]> wrote:
> Sorry I hit send by mistake! Here is the full response
>
> Christian
>
> Synapse can do this "out of the box" today.
>
> What you can do is configure synapse like this:
>
> <switch source="/soap:Envelope/soap:Body/my:getStockNumber/outletID">
> <case regex="01.*">
> <send>
> <endpoint address="http://warehouse1/service/getStockNumber"/>
> </send>
> </case>
> <case regex="02.*">
> <send>
> <endpoint address="http://warehouse2/service/getStockNumber"/>
> </send>
> </case>
>
> </switch>
>
> As you can see, the switch statement uses an XPath into the SOAP body
> to find the outlet ID. Then we use a regular expression match against
> it to search for the specific prefix. You can do any custom processing
> you want for each warehouse id, but in this case I am showing how you
> could "send" the message to the right endpoint.
>
> I believe this does what you want. The actual syntax is slightly more
> complex as you need to add the right namespaces declarations into the
> switch statement. You can also define the endpoints in the global
> definition section that will make this example a little neater.
>
> Paul
>
>
> > On 7/2/06, Christian Brennsteiner <[EMAIL PROTECTED]> wrote:
> > > hi paul,
> > >
> > > i think the scenarion could look like this:
> > >
> > > the WS implements the following unfction
> > >
> > > int getStockNumber(articleId, outletId)
> > >
> > > this webservice is deployed on some warehouse application servers
> > > which all implement the same ws interface e..g warehouse 1-10
> > >
> > > according to a mapping table which is very simple due to structure
> > > outletId first outlet that is connected to first warehous would be
> > > 010001 or 2nd outlet of third warehous would be 030002 the mediator
> > > could decide easilly which webservice on which application server
> > > should be called.
> > >
> > > now my question is:
> > >
> > > 1) is this just redirection/routing for a call or is it real mediation?
> > > 2) how could this be implemented easilly with synapse?
> > >
> > > regards chris
> > >
> > > On 7/1/06, Paul Fremantle <[EMAIL PROTECTED]> wrote:
> > > > Hi Christian
> > > >
> > > > Absolutely. How exactly do you decide where to route the message? Can
> > > > you give an example?
> > > >
> > > > Paul
> > > >
> > > > On 7/1/06, Christian Brennsteiner <[EMAIL PROTECTED]> wrote:
> > > > > hi *,
> > > > >
> > > > > we have got the following problem / requirement:
> > > > >
> > > > > we should create a ws for asking stock quotes.
> > > > > internally there are 7 ws implemented which have all the same WSDL
> > > > > signature but are based on locally seperated servers.
> > > > >
> > > > > can synapse route a ws that is centrally called onto the synapse
> > > > > server and mediate between the 7 service provider and act as one
> > > > > service provider? the decision where to put the request should be made
> > > > > out of the request parameters itself!
> > > > >
> > > > > if yes .... where can i find more info how to do this?
> > > > >
> > > > >
> > > > > regards chris
> > > > >
> > > > > --
> > > > > -----------------
> > > > > Christian Brennsteiner
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Paul Fremantle
> > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > > >
> > > > http://bloglines.com/blog/paulfremantle
> > > > [EMAIL PROTECTED]
> > > >
> > > > "Oxygenating the Web Service Platform", www.wso2.com
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > -----------------
> > > Christian Brennsteiner
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Paul Fremantle
> > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> >
> > http://bloglines.com/blog/paulfremantle
> > [EMAIL PROTECTED]
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> [EMAIL PROTECTED]
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
-----------------
Christian Brennsteiner
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]
"Oxygenating the Web Service Platform", www.wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]