You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Renjith <R....@commence.com> on 2007/07/12 18:55:55 UTC

RE: "Regarding Namespace Problem with an application"

Hi Ruwan,

 

Thank you for the reply.

I am very new to Synapse and also Axis2.

 

I was on a vacation; I started trying my luck using Synapse as per your
suggestion. I am just adding some more questions to our previous
conversation.

 

Could you please make me understand about the whole solution you proposed?

 

As per your suggestion for proxy service & transformation given below:

 

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

    <proxy name="$NAME_OF_THE_PROXY">

 

        <target>

            <inSequence>

                <xslt key="$XSLT_FILE_REGISTRY_KEY"/>

            </inSequence>

            <endpoint>

                <address uri="$ACTUAL_SERVICE_EPR"/>

            </endpoint>

            <outSequence>

                <send/>

            </outSequence>

        </target>

        <publishWSDL uri="file:repository/$WSDL_FILE_NAME"/>

    </proxy>

</definitions>

 

I tried to set up a proxy service as a first step. These are steps I
followed.

 

1) I started my service using JBOSS-Tomcat Server and it is working on the
port "8080". The wsdl is visible using
"http://localhost:8008/axis2/services/SAMPLEAPISvc?wsdl"

 

2) Then I made changes to synapse_sample_100.xml file as below:

 

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

    <proxy name="SAMPLEAPISvc">

        <target>

            <endpoint>

                <address
uri="http://localhost:8008/axis2/services/SAMPLEAPISvc"/>

            </endpoint>

                  <outSequence>

                        <send/>

                  </outSequence>

        </target>

        <publishWSDL
uri="file:repository/conf/sample/resources/proxy/SAMPLEAPISvc.wsdl"/>

    </proxy>

</definitions>

 

3) Then I tried starting Synapse using the command synapse.bat -sample 100

 

4) This is giving me an error in Synapse console as below:

 

C:\synapse-1.0\bin>synapse.bat -sample 100

 Using Bouncy castle JAR for Java 1.4

Starting Synapse/Java ...

Using SYNAPSE_HOME:    C:\SYNAPS~1.0\bin\..

Using JAVA_HOME:       C:\j2sdk1.4.2_13

Using SYNAPSE_XML:
-Dsynapse.xml="C:\SYNAPS~1.0\bin\..\repository\conf\sample\synapse_sample_10
0.xml"

[SynapseServer] Using the Axis2 Repository C:\SYNAPS~1.0\bin\..\repository

[main] INFO  SynapseModule - Initializing the Synapse configuration ...

[main] INFO  XMLConfigurationBuilder - Generating the Synapse configuration
model by parsing the XML configuration

[main] INFO  SynapseConfigurationBuilder - Loaded Synapse configuration from
: C:\SYNAPS~1.0\bin\..\repository\conf\sample\synapse_sample_100.xml

[main] INFO  SynapseModule - Deploying the Synapse service..

[main] INFO  SynapseModule - Initializing Sandesha 2...

[main] INFO  SynapseModule - Deploying Proxy services...

java.lang.NoSuchMethodError: java.net.URLConnection.setReadTimeout(I)V

        at org.apache.synapse.config.Util.getOMElementFromURL(Util.java:150)

        at
org.apache.synapse.core.axis2.ProxyService.buildAxisService(ProxyService.jav
a:199)

        at
org.apache.synapse.core.axis2.SynapseModule.init(SynapseModule.java:109)

        at
org.apache.axis2.context.ConfigurationContextFactory.initModules(Configurati
onContextFactory.java:209)

        at
org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationConte
xtFactory.java:189)

        at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationCont
ext(ConfigurationContextFactory.java:72)

        at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationCont
extFromFileSystem(ConfigurationContextFactory.java:174)

        at org.apache.synapse.SynapseServer.main(SynapseServer.java:60)

[SynapseServer] Startup failed...

 

 

Could you please guide me in solving this basic issue? I'm sure that I did
something terribly wrong.

 

 

Note: One Important question I should ask about proxy service is that, in my
case I cannot make change in code or the way it generated. Only thing I can
change is the uri to access the Service. Right now the URI that is accessing
by client is set to 

http://localhost: <http://localhost:8008/axis2/services/SAMPLEAPISvc>
8008/axis2/services/SAMPLEAPISvc , where 8008 is the port that is using by
Synpase. Is this the right way to make Synapse a mediator for service that
is been running in port 8080? Because in my case I cannot use
-Daddurl=<addressingEPR> -Dtrpurl=<synapse> for the client because the
client is a windows program and I have no way to control it. 

 

 

Thank you for reading this lengthy mail.

 

-Renjith

 

 

-----Original Message-----
From: Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Sent: Saturday, June 23, 2007 9:09 AM
To: synapse-user@ws.apache.org
Subject: Re: "Regarding Namespace Problem with an application"

 

Hi Renjith,

 

If your client is having a NS other than the NS of the actual service, then

you have to do a XSLT transformation as Paul described;

 

Here is the configuration for that;

 

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

    <proxy name="$NAME_OF_THE_PROXY">

 

        <target>

            <inSequence>

                <xslt key="$XSLT_FILE_REGISTRY_KEY"/>

            </inSequence>

            <endpoint>

                <address uri="$ACTUAL_SERVICE_EPR"/>

            </endpoint>

            <outSequence>

                <send/>

            </outSequence>

        </target>

        <publishWSDL uri="file:repository/$WSDL_FILE_NAME"/>

    </proxy>

</definitions>

 

 

In the XSLT you have to transform the NS from one to another. If you

need any more guidance in writing the XSLT please let me know.

 

Thanks,

Ruwan.

 

 

 

On 6/21/07, Renjith <R....@commence.com> wrote:

> 

> Hi Paul,

> 

> Thanks for the reply.

> 

>         Let me explain how I developed the WebServices. I started

> developing

> the code from the WSDL the ERP client provides. And it is as shown in

> attached ERPAPISvc.wsdl (Namespace is "http://developer.intuit.com"). And

> when I deployed the service it worked fine with the client (Let say

> Client1).

> 

>         But we have 2 or more client program that can use the same

> service.

> But that client exists in our System in different Namespace. As described

> in

> MySvc.wsdl (Namespace is "http://sync.dtc.com/").

> 

>         So when I tried to change the existing Namespace

> "http://developer.intuit.com" to "http://sync.dtc.com/" the Client1 stop

> working and throws unexpected subelement strUserName. And all other client

> program starts running.

> 

>       So what I am trying to do is make all client works with code

> developed

> from same wsdl and having the namespace "http://sync.dtc.com/".

> 

>   Could you please guide me, and correct me if I am wrong in my thoughts.

> 

> Thanks in Advance,

> Renjith

> 

> 

> 

> -----Original Message-----

> From: Paul Fremantle [mailto:pzfreo@gmail.com]

> Sent: Thursday, June 21, 2007 4:50 AM

> To: synapse-user@ws.apache.org

> Subject: Re: "Regarding Namespace Problem with an application"

> 

> > OK.. if I am understanding your problem

> > correctly, this could be simplified to the requirement that you want to

> > expose your existing service under different WSDLs (using different

> > namespaces) to different clients? If so, this is trivial in Synapse. You

> > just create one or more proxy services with a publish WSDL specified to

> that

> > which the client expects, and then forward the messages to the actual

> > endpoint.

> 

> It seems like you might also need to write a mediator to change the

> namespace inside the SOAP messages in one case? In other words,

> presumably the namespace in the SOAP message matches in one case and

> doesn't in the other case.

> 

> You can do this lots of ways, but the easy way would either be in XSLT

> or in JavaScript/E4X. If you can post an example of both types of SOAP

> message then I can show a transform that fixes up one.

> 

> Unless I've completely misunderstood the problem in which case forgive me.

> 

> Paul

> 

> --

> Paul Fremantle

> Co-Founder and VP of Technical Sales, WSO2

> OASIS WS-RX TC Co-chair

> 

> blog: http://pzf.fremantle.org

> paul@wso2.com

> 

> "Oxygenating the Web Service Platform", www.wso2.com

> 

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org

> For additional commands, e-mail: synapse-user-help@ws.apache.org

> 

> 

> 

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org

> For additional commands, e-mail: synapse-user-help@ws.apache.org

> 

 

 

 

-- 

Ruwan Linton

http://www.wso2.org - "Oxygenating the Web Services Platform"


Re: Synapse and JBI

Posted by Rajith Attapattu <ra...@gmail.com>.
On 7/23/07, Ruwan Linton <ru...@gmail.com> wrote:
>
> Hi Michael,
>
> First of all, thanks a lot for the information. We highly appreciate your
> feedback.
>
> Comments in-line,
>
> On 7/24/07, Michael Buchholz <m....@subnatural.de> wrote:
> >
> > Paul
> >
> > I search for a sub-topic of my master thesis about Web-Service Mediation
> > Systems. After reading the JBI spec I had the idea that a WMS (Synapse)
> > could be used as a CBR in JBI-Enviroments:
> >
> > The Normalized Message Router (NMR) does not provide content based
> > routing (CBR). Each component (Service Enging / Binding Component)
> > referres another component by service endpoint, name or interface. That
> > means each component has its own routing logic included. Also the
> > component that sends the normalized message to the NMR must make sure
> > that the normalized message payload is understood by the referenced
> > component. (if i got the specs right)
>
>
>
> You are absolutely correct.
>
>
> Synapse could provide a more convenient method to route messages by
> > providing CBR to a JBI enviroment.
> >
> > For this each component registered on the NMR could forward its
> > normalized message (NM) to the Synapse-Service Engine. Synapse can now
> > select the next component on the NMR for the incoming message type and
> > transform it to the message type of the selected component so that it
> > will understand it. All this is done by simply adding all the rules in
> > synpase rule-engine.
>
>
>
> Correct....
>
>
> In summary Synpase could provide:
> >   - validation & classification (incoming XML message from the NMR)
> >   - enrichment (for example calling other external services and
> > inserting this data into the xml message)
> >   - content based routing (choose next endpoint on the NMR)
> >   - transformation (transform outgoing message so that the selected
> > nmr-endpoint can understand it)
> >
> > .. that is a VERTO pattern: validate - enrich - route - transform -
> > operate.
> >
> > And all this information can be stored in the synapse registry. JBI
> > routing in a centralized way. The components don´t need any more routing
> > logic except sending their messages to the synapse endpoint.
> >
> > Well.. that´s it ;). What do you think?
>
>
>
> Yes, you are correct, but in that case synapse is an JBI SE, I don't think
> providing a SE to a JBI container makes us JBI compliant.
>
> But, we can very easily do this by providing a special send method for the
> NMR.
>

[RA] I don't think adding any JBI specific send method in the existing
interface will add much value to synapse.
Synapse already has a good abstraction layer (MessageContext,
SynapseEnvironment interfaces ..etc) , so 3rd party components can leverage
this flexibility.

If there is a demand and the community agrees we could provide a generic JBI
Service Engine in the synapse extentions module that does implement these
interfaces (at the least SynapseEnvironment). The NM can be wrapped or
converted to a synapse message context.

In a nutshell this SE will use Synapse to do transformations and/or CBR.

We were not interested in the JBI compliantness because we were not much
> sure what the value addition is. Some how it is very good to here this and
> will do this for our coming release.
>
> Thanks,
> Ruwan
>
>
> Michael
> >
> > Paul Fremantle schrieb:
> > > So far we haven't done any work on JBI integration. You are the first
> > > person to ask for it! :-)
> > >
> > > Could you give us some more information on your requirements and the
> > > benefits you think there might be of integrating with a JBI container?
> > >
> > > Paul
> > >
> > > On 7/22/07, Michael Buchholz <m....@subnatural.de> wrote:
> > >> Hi,
> > >>
> > >> I wonder how Synapse can be plugged into a JBI enviroment as service
> > >> engine for content based routing.
> > >>
> > >> After googling for a while I found this:
> > >>
> > >> @http://wiki.apache.org/incubator/SynapseProposal
> > >> "Synapse plans to support the Java Business Integration (JBI)
> > standard,
> > >> but we plan do so as an add-on rather than as core APIs."
> > >>
> > >> Is this still a planed feature? Do you have any more information on
> > what
> > >>   the steps are to achieve it?
> > >>
> > >> Thanks.
> > >> Michael
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > >>
> > >>
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
>
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: "Regarding Namespace Problem with an application"

Posted by Ruwan Linton <ru...@gmail.com>.
Yes I think this will be a good sample (I mean exposing an existing service
as a proxy with a different NS)

I will add this as a sample. (What would be the category? may be under proxy
services?)

Thanks,
Ruwan.

On 7/20/07, Paul Fremantle <pz...@gmail.com> wrote:
>
> Ruwan
>
> Is it worth adding this as a sample?
>
> Paul
>
> On 7/20/07, Ruwan Linton <ru...@gmail.com> wrote:
> > Hi Renjith,
> >
> >
> > On 7/20/07, Renjith <R....@commence.com> wrote:
> > >
> > > Hi Ruwan, Jonnathan,
> > >
> > >
> > >
> > > Thank you for the great help.
> > >
> > > At last I have implemented my solution. Thanks for the wonderful help.
> >
> >
> >
> > Nice to here that, you got it working. You are more than welcome.
> >
> >
> > Just for curiosity I have one last question.
> > >
> > > What is the difference between proposed XSLT and the XSLT given below:
> > > Both
> > > worked for me :-) .
> >
> >
> >
> > Both seems to be equivalent from the logic, so you can use what ever you
> > like. In the XSLT I have provided it will call a different template to
> get
> > the elements copied, so that you can handle more than one NS if required
> > using another template. Your XSLT also seems to be fine.
> >
> > You can always ask any more things regarding Synapse.....
> >
> > Thanks,
> > Ruwan.
> >
> >
> > --
> > Ruwan Linton
> > http://www.wso2.org - "Oxygenating the Web Services Platform"
> >
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-user-help@ws.apache.org
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: Synapse and JBI

Posted by Paul Fremantle <pz...@gmail.com>.
> I guess the idea was to (atleast theoritically) have synapse running on top
> of any environment and mediate any message via the above abstractions.

Yes that was the design!!! Glad it works :-)

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Re: Synapse and JBI

Posted by Rajith Attapattu <ra...@gmail.com>.
Michael,

If you tap into synapse engine bypassing the transports it will be much
faster as you eliminate the IO calls etc.
Synapse has very good extention points in SynapseEnvironment and Synapse MC.
So better to use that.
I guess the idea was to (atleast theoritically) have synapse running on top
of any environment and mediate any message via the above abstractions.

Regards,

Rajith

On 7/24/07, Michael Buchholz <m....@subnatural.de> wrote:
>
> Rajith
>
> great idea. I didn´t think about the possibility to use the
> SynapseEnvironment interface instead of converting the NM to a SOAP
> message and then forward it to Synapse.
>
> Thanks for the code!
>
> Michael
>
> Rajith Attapattu schrieb:
> > Paul & Michael,
> >
> > Thats exactly how I used synapse in Qpid.
> > To do CBR and Transformation of messages. It was done in a few simple
> > steps,
> > largely due to the way synapse is designed.
> > Synapse does have a rich set of features that can be utilized outside of
> > it's primary domain. (primary domain as in WS mediation).
> >
> > Here are a few ideas (I have to warn, that I only had a cursory glance
> at
> > the JBI spec)
> > These are based on my experiance with the Qpid integration.
> >
> > You synapse Service component in the JBI container can convert from the
> > javax.jbi.messaging.NormalizedMessage to the synapse MessageContext.
> > You could then feed the message context to the synapse engine. It will
> do
> > transformation and/or CBR
> > Then you could take the message context and convert it back to a
> > javax.jbi.messaging.NormalizedMessage.
> > Now it can be handed back to the JBI container. The new NM message
> context
> > will now have new routing information and/or a transformed payload.
> >
> > I broke it down to two steps to, so that I can easily type
> > NM = Normalized message
> > SC = Synapse Message Context
> >
> > JBIContainer ------NM-------> Synapse Component ----SC-------> Synapse
> > Engine
> >
> > Synapse Engine ----SC------->  Synapse Component -----NM----->
> > JBIContainer.
> >
> >
> >
> > Your component can implement the SynapseEnvironment interface and in the
> > send method you can convert the message context in to a NM and hand over
> to
> > the JBI container.
> > Here is the code I used for Qpid and demonstrates the idea.
> >
> > public void send(EndpointDefinition endpoint, MessageContext smc)
> > {
> >     if(endpoint != null)
> >     {
> >         smc.setTo(new EndpointReference(endpoint.getAddress()));
> >         AMQMessage newMessage =
> > MessageContextCreatorForQpid.getAMQMessage(smc);
> >         try
> >         {
> >             qpidExchange.getExchangeRegistry().routeContent(newMessage);
> >         }
> >         catch(Exception e)
> >         {
> >             throw new SynapseException("Faulty endpoint",e);
> >         }
> >     }
> >
> > }
> >
> >
> > You can find the complete code at,.
> >
> https://svn.apache.org/repos/asf/incubator/qpid/branches/client_restructure/java/broker/src/main/java/org/apache/qpid/server/exchange/synapse/
> >
> >
> > Regards,
> >
> > Rajith
> >
> > On 7/23/07, Michael Buchholz <m....@subnatural.de> wrote:
> >>
> >> Paul
> >>
> >> I search for a sub-topic of my master thesis about Web-Service
> Mediation
> >> Systems. After reading the JBI spec I had the idea that a WMS (Synapse)
> >> could be used as a CBR in JBI-Enviroments:
> >>
> >> The Normalized Message Router (NMR) does not provide content based
> >> routing (CBR). Each component (Service Enging / Binding Component)
> >> referres another component by service endpoint, name or interface. That
> >> means each component has its own routing logic included. Also the
> >> component that sends the normalized message to the NMR must make sure
> >> that the normalized message payload is understood by the referenced
> >> component. (if i got the specs right)
> >>
> >> Synapse could provide a more convenient method to route messages by
> >> providing CBR to a JBI enviroment.
> >>
> >> For this each component registered on the NMR could forward its
> >> normalized message (NM) to the Synapse-Service Engine. Synapse can now
> >> select the next component on the NMR for the incoming message type and
> >> transform it to the message type of the selected component so that it
> >> will understand it. All this is done by simply adding all the rules in
> >> synpase rule-engine.
> >>
> >> In summary Synpase could provide:
> >>   - validation & classification (incoming XML message from the NMR)
> >>   - enrichment (for example calling other external services and
> >> inserting this data into the xml message)
> >>   - content based routing (choose next endpoint on the NMR)
> >>   - transformation (transform outgoing message so that the selected
> >> nmr-endpoint can understand it)
> >>
> >> .. that is a VERTO pattern: validate - enrich - route - transform -
> >> operate.
> >>
> >> And all this information can be stored in the synapse registry. JBI
> >> routing in a centralized way. The components don´t need any more
> routing
> >> logic except sending their messages to the synapse endpoint.
> >>
> >> Well.. that´s it ;). What do you think?
> >>
> >> Michael
> >>
> >> Paul Fremantle schrieb:
> >> > So far we haven't done any work on JBI integration. You are the first
> >> > person to ask for it! :-)
> >> >
> >> > Could you give us some more information on your requirements and the
> >> > benefits you think there might be of integrating with a JBI
> container?
> >> >
> >> > Paul
> >> >
> >> > On 7/22/07, Michael Buchholz <m....@subnatural.de> wrote:
> >> >> Hi,
> >> >>
> >> >> I wonder how Synapse can be plugged into a JBI enviroment as service
> >> >> engine for content based routing.
> >> >>
> >> >> After googling for a while I found this:
> >> >>
> >> >> @http://wiki.apache.org/incubator/SynapseProposal
> >> >> "Synapse plans to support the Java Business Integration (JBI)
> >> standard,
> >> >> but we plan do so as an add-on rather than as core APIs."
> >> >>
> >> >> Is this still a planed feature? Do you have any more information on
> >> what
> >> >>   the steps are to achieve it?
> >> >>
> >> >> Thanks.
> >> >> Michael
> >> >>
> >> >>
> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> >> >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>

Re: Synapse and JBI

Posted by Michael Buchholz <m....@subnatural.de>.
Ruwan

thanks for approving my thoughts about a WMS Service Engine :)

Ruwan Linton schrieb:
> 
> Yes, you are correct, but in that case synapse is an JBI SE, I don't think
> providing a SE to a JBI container makes us JBI compliant.
> 
> But, we can very easily do this by providing a special send method for the
> NMR. We were not interested in the JBI compliantness because we were not
> much sure what the value addition is. Some how it is very good to here this
> and will do this for our coming release.
> 

In my opinion it is better to implement a general Service Engine for 
Synapse instead of changing or adding routing methods of the NMR. A 
JBI-standard compliant Service Enginge can be used by every JBI 
implementation... an "enhanced NMR" not.

But we could make a proposal for the JBI Team to include a Content Based 
Routing/Transformation method in the next JBI Specs release(?) which 
input normalized messages are forwarded to a specific NMR-endpoint which 
implements the needed cbr&transformation functionality.

Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Re: Synapse and JBI

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Michael,

First of all, thanks a lot for the information. We highly appreciate your
feedback.

Comments in-line,

On 7/24/07, Michael Buchholz <m....@subnatural.de> wrote:
>
> Paul
>
> I search for a sub-topic of my master thesis about Web-Service Mediation
> Systems. After reading the JBI spec I had the idea that a WMS (Synapse)
> could be used as a CBR in JBI-Enviroments:
>
> The Normalized Message Router (NMR) does not provide content based
> routing (CBR). Each component (Service Enging / Binding Component)
> referres another component by service endpoint, name or interface. That
> means each component has its own routing logic included. Also the
> component that sends the normalized message to the NMR must make sure
> that the normalized message payload is understood by the referenced
> component. (if i got the specs right)



You are absolutely correct.


Synapse could provide a more convenient method to route messages by
> providing CBR to a JBI enviroment.
>
> For this each component registered on the NMR could forward its
> normalized message (NM) to the Synapse-Service Engine. Synapse can now
> select the next component on the NMR for the incoming message type and
> transform it to the message type of the selected component so that it
> will understand it. All this is done by simply adding all the rules in
> synpase rule-engine.



Correct....


In summary Synpase could provide:
>   - validation & classification (incoming XML message from the NMR)
>   - enrichment (for example calling other external services and
> inserting this data into the xml message)
>   - content based routing (choose next endpoint on the NMR)
>   - transformation (transform outgoing message so that the selected
> nmr-endpoint can understand it)
>
> .. that is a VERTO pattern: validate - enrich - route - transform -
> operate.
>
> And all this information can be stored in the synapse registry. JBI
> routing in a centralized way. The components don´t need any more routing
> logic except sending their messages to the synapse endpoint.
>
> Well.. that´s it ;). What do you think?



Yes, you are correct, but in that case synapse is an JBI SE, I don't think
providing a SE to a JBI container makes us JBI compliant.

But, we can very easily do this by providing a special send method for the
NMR. We were not interested in the JBI compliantness because we were not
much sure what the value addition is. Some how it is very good to here this
and will do this for our coming release.

Thanks,
Ruwan


Michael
>
> Paul Fremantle schrieb:
> > So far we haven't done any work on JBI integration. You are the first
> > person to ask for it! :-)
> >
> > Could you give us some more information on your requirements and the
> > benefits you think there might be of integrating with a JBI container?
> >
> > Paul
> >
> > On 7/22/07, Michael Buchholz <m....@subnatural.de> wrote:
> >> Hi,
> >>
> >> I wonder how Synapse can be plugged into a JBI enviroment as service
> >> engine for content based routing.
> >>
> >> After googling for a while I found this:
> >>
> >> @http://wiki.apache.org/incubator/SynapseProposal
> >> "Synapse plans to support the Java Business Integration (JBI) standard,
> >> but we plan do so as an add-on rather than as core APIs."
> >>
> >> Is this still a planed feature? Do you have any more information on
> what
> >>   the steps are to achieve it?
> >>
> >> Thanks.
> >> Michael
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >>
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: "Regarding Namespace Problem with an application"

Posted by Paul Fremantle <pz...@gmail.com>.
Ruwan

Is it worth adding this as a sample?

Paul

On 7/20/07, Ruwan Linton <ru...@gmail.com> wrote:
> Hi Renjith,
>
>
> On 7/20/07, Renjith <R....@commence.com> wrote:
> >
> > Hi Ruwan, Jonnathan,
> >
> >
> >
> > Thank you for the great help.
> >
> > At last I have implemented my solution. Thanks for the wonderful help.
>
>
>
> Nice to here that, you got it working. You are more than welcome.
>
>
> Just for curiosity I have one last question.
> >
> > What is the difference between proposed XSLT and the XSLT given below:
> > Both
> > worked for me :-) .
>
>
>
> Both seems to be equivalent from the logic, so you can use what ever you
> like. In the XSLT I have provided it will call a different template to get
> the elements copied, so that you can handle more than one NS if required
> using another template. Your XSLT also seems to be fine.
>
> You can always ask any more things regarding Synapse.....
>
> Thanks,
> Ruwan.
>
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


Re: Synapse and JBI

Posted by Rajith Attapattu <ra...@gmail.com>.
On 7/24/07, Paul Fremantle <pz...@gmail.com> wrote:
>
> Rajith
>
> This looks really cool.... at the moment I guess this would have to be
> integrated into QPid only.


[RA] Yes  basically Synapse is  used as  a Sepcialized  Exchange in the
AMQP  broker that does message transformations and content based routing.
I will write a blog post soon about the use cases. The effort spent on
integration was so little, I was initially suprised how quickly I was able
to get this working.
It's a good testament to the adaptability and flexibility of synapse.

If we could get it to work with both QPid
> and other transports too then it would fit better as part of Synapse.


[RA] Paul in this case  Qpid (AMQP) was not used as a transport.
Rather it was the environment on which synapse ran. Simillar to synapse on
top of Axis2.

Any ideas how we could expand it out a bit?


[RA] I will do an AMQP transport when the code base stabilizes a bit after
the 0-10 release.

Paul
>
> On 7/24/07, Rajith Attapattu <ra...@gmail.com> wrote:
> > Yes the impl is customized for Qpid --> Qpid routing.
> > But it can be pointed out as an example for using synapse in other
> > environments.
> >
> > The generic JBI SE (disscussed above by Michale) can be put in the
> synapse
> > code base.
> > so we have a good example in the code base itself.
> >
> > Regards,
> >
> > Rajith
> >
> >
> > On 7/24/07, Paul Fremantle <pzfreo@gmail.com > wrote:
> > >
> > > Cool Rajith! How can we get this code a bit more available for Synapse
> > > users? Are you restricted to only QPID->QPID routing with this?
> > >
> > > Paul
> > >
> > > On 7/24/07, Rajith Attapattu <ra...@gmail.com> wrote:
> > > > Paul & Michael,
> > > >
> > > > Thats exactly how I used synapse in Qpid.
> > > > To do CBR and Transformation of messages. It was done in a few
> simple
> > steps,
> > > > largely due to the way synapse is designed.
> > > > Synapse does have a rich set of features that can be utilized
> outside of
> > > > it's primary domain. (primary domain as in WS mediation).
> > > >
> > > > Here are a few ideas (I have to warn, that I only had a cursory
> glance
> > at
> > > > the JBI spec)
> > > > These are based on my experiance with the Qpid integration.
> > > >
> > > > You synapse Service component in the JBI container can convert from
> the
> > > > javax.jbi.messaging.NormalizedMessage to the synapse
> > > > MessageContext.
> > > > You could then feed the message context to the synapse engine. It
> will
> > do
> > > > transformation and/or CBR
> > > > Then you could take the message context and convert it back to a
> > > > javax.jbi.messaging.NormalizedMessage.
> > > > Now it can be handed back to the JBI container. The new NM message
> > context
> > > > will now have new routing information and/or a transformed payload.
> > > >
> > > > I broke it down to two steps to, so that I can easily type
> > > > NM = Normalized message
> > > > SC = Synapse Message Context
> > > >
> > > > JBIContainer ------NM-------> Synapse Component ----SC------->
> Synapse
> > > > Engine
> > > >
> > > > Synapse Engine ----SC------->  Synapse Component -----NM----->
> > JBIContainer.
> > > >
> > > >
> > > >
> > > > Your component can implement the SynapseEnvironment interface and in
> the
> > > > send method you can convert the message context in to a NM and hand
> over
> > to
> > > > the JBI container.
> > > > Here is the code I used for Qpid and demonstrates the idea.
> > > >
> > > > public void send(EndpointDefinition endpoint, MessageContext smc)
> > > > {
> > > >  if(endpoint != null)
> > > >  {
> > > >  smc.setTo(new EndpointReference(endpoint.getAddress()));
> > > >  AMQMessage newMessage =
> > > > MessageContextCreatorForQpid.getAMQMessage
> > > > (smc);
> > > >  try
> > > >  {
> > > >
> > qpidExchange.getExchangeRegistry().routeContent(newMessage);
> > > >  }
> > > >  catch(Exception e)
> > > >  {
> > > >  throw new SynapseException("Faulty endpoint",e);
> > > >  }
> > > >  }
> > > >
> > > > }
> > > >
> > > > You can find the complete code at,.
> > > >
> >
> https://svn.apache.org/repos/asf/incubator/qpid/branches/client_restructure/java/broker/src/main/java/org/apache/qpid/server/exchange/synapse/
> > > >
> > > > Regards,
> > > >
> > > > Rajith
> > > >
> > > >
> > > > On 7/23/07, Michael Buchholz < m.buchholz@subnatural.de> wrote:
> > > > > Paul
> > > > >
> > > > > I search for a sub-topic of my master thesis about Web-Service
> > Mediation
> > > > > Systems. After reading the JBI spec I had the idea that a WMS
> > (Synapse)
> > > > > could be used as a CBR in JBI-Enviroments:
> > > > >
> > > > > The Normalized Message Router (NMR) does not provide content based
> > > > > routing (CBR). Each component (Service Enging / Binding Component)
> > > > > referres another component by service endpoint, name or interface.
> > That
> > > > > means each component has its own routing logic included. Also the
> > > > > component that sends the normalized message to the NMR must make
> sure
> > > > > that the normalized message payload is understood by the
> referenced
> > > > > component. (if i got the specs right)
> > > > >
> > > > > Synapse could provide a more convenient method to route messages
> by
> > > > > providing CBR to a JBI enviroment.
> > > > >
> > > > > For this each component registered on the NMR could forward its
> > > > > normalized message (NM) to the Synapse-Service Engine. Synapse can
> now
> > > > > select the next component on the NMR for the incoming message type
> and
> > > > > transform it to the message type of the selected component so that
> it
> > > > > will understand it. All this is done by simply adding all the
> rules in
> > > > > synpase rule-engine.
> > > > >
> > > > > In summary Synpase could provide:
> > > > >   - validation & classification (incoming XML message from the
> NMR)
> > > > >   - enrichment (for example calling other external services and
> > > > > inserting this data into the xml message)
> > > > >   - content based routing (choose next endpoint on the NMR)
> > > > >   - transformation (transform outgoing message so that the
> selected
> > > > > nmr-endpoint can understand it)
> > > > >
> > > > > .. that is a VERTO pattern: validate - enrich - route - transform
> -
> > > > operate.
> > > > >
> > > > > And all this information can be stored in the synapse registry.
> JBI
> > > > > routing in a centralized way. The components don´t need any more
> > routing
> > > > > logic except sending their messages to the synapse endpoint.
> > > > >
> > > > > Well.. that´s it ;). What do you think?
> > > > >
> > > > > Michael
> > > > >
> > > > > Paul Fremantle schrieb:
> > > > > > So far we haven't done any work on JBI integration. You are the
> > first
> > > > > > person to ask for it! :-)
> > > > > >
> > > > > > Could you give us some more information on your requirements and
> the
> > > > > > benefits you think there might be of integrating with a JBI
> > container?
> > > > > >
> > > > > > Paul
> > > > > >
> > > > > > On 7/22/07, Michael Buchholz < m.buchholz@subnatural.de> wrote:
> > > > > >> Hi,
> > > > > >>
> > > > > >> I wonder how Synapse can be plugged into a JBI enviroment as
> > service
> > > > > >> engine for content based routing.
> > > > > >>
> > > > > >> After googling for a while I found this:
> > > > > >>
> > > > > >> @http://wiki.apache.org/incubator/SynapseProposal
> > > > > >> "Synapse plans to support the Java Business Integration (JBI)
> > standard,
> > > > > >> but we plan do so as an add-on rather than as core APIs."
> > > > > >>
> > > > > >> Is this still a planed feature? Do you have any more
> information on
> > > > what
> > > > > >>   the steps are to achieve it?
> > > > > >>
> > > > > >> Thanks.
> > > > > >> Michael
> > > > > >>
> > > > > >>
> > > >
> > ---------------------------------------------------------------------
> > > > > >> To unsubscribe, e-mail:
> > > > synapse-dev-unsubscribe@ws.apache.org
> > > > > >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > synapse-dev-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Paul Fremantle
> > > Co-Founder and VP of Technical Sales, WSO2
> > > OASIS WS-RX TC Co-chair
> > >
> > > blog: http://pzf.fremantle.org
> > > paul@wso2.com
> > >
> > > "Oxygenating the Web Service Platform", www.wso2.com
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > synapse-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>

Re: Synapse and JBI

Posted by Paul Fremantle <pz...@gmail.com>.
Rajith

This looks really cool.... at the moment I guess this would have to be
integrated into QPid only. If we could get it to work with both QPid
and other transports too then it would fit better as part of Synapse.
Any ideas how we could expand it out a bit?

Paul

On 7/24/07, Rajith Attapattu <ra...@gmail.com> wrote:
> Yes the impl is customized for Qpid --> Qpid routing.
> But it can be pointed out as an example for using synapse in other
> environments.
>
> The generic JBI SE (disscussed above by Michale) can be put in the synapse
> code base.
> so we have a good example in the code base itself.
>
> Regards,
>
> Rajith
>
>
> On 7/24/07, Paul Fremantle <pzfreo@gmail.com > wrote:
> >
> > Cool Rajith! How can we get this code a bit more available for Synapse
> > users? Are you restricted to only QPID->QPID routing with this?
> >
> > Paul
> >
> > On 7/24/07, Rajith Attapattu <ra...@gmail.com> wrote:
> > > Paul & Michael,
> > >
> > > Thats exactly how I used synapse in Qpid.
> > > To do CBR and Transformation of messages. It was done in a few simple
> steps,
> > > largely due to the way synapse is designed.
> > > Synapse does have a rich set of features that can be utilized outside of
> > > it's primary domain. (primary domain as in WS mediation).
> > >
> > > Here are a few ideas (I have to warn, that I only had a cursory glance
> at
> > > the JBI spec)
> > > These are based on my experiance with the Qpid integration.
> > >
> > > You synapse Service component in the JBI container can convert from the
> > > javax.jbi.messaging.NormalizedMessage to the synapse
> > > MessageContext.
> > > You could then feed the message context to the synapse engine. It will
> do
> > > transformation and/or CBR
> > > Then you could take the message context and convert it back to a
> > > javax.jbi.messaging.NormalizedMessage.
> > > Now it can be handed back to the JBI container. The new NM message
> context
> > > will now have new routing information and/or a transformed payload.
> > >
> > > I broke it down to two steps to, so that I can easily type
> > > NM = Normalized message
> > > SC = Synapse Message Context
> > >
> > > JBIContainer ------NM-------> Synapse Component ----SC-------> Synapse
> > > Engine
> > >
> > > Synapse Engine ----SC------->  Synapse Component -----NM----->
> JBIContainer.
> > >
> > >
> > >
> > > Your component can implement the SynapseEnvironment interface and in the
> > > send method you can convert the message context in to a NM and hand over
> to
> > > the JBI container.
> > > Here is the code I used for Qpid and demonstrates the idea.
> > >
> > > public void send(EndpointDefinition endpoint, MessageContext smc)
> > > {
> > >  if(endpoint != null)
> > >  {
> > >  smc.setTo(new EndpointReference(endpoint.getAddress()));
> > >  AMQMessage newMessage =
> > > MessageContextCreatorForQpid.getAMQMessage
> > > (smc);
> > >  try
> > >  {
> > >
> qpidExchange.getExchangeRegistry().routeContent(newMessage);
> > >  }
> > >  catch(Exception e)
> > >  {
> > >  throw new SynapseException("Faulty endpoint",e);
> > >  }
> > >  }
> > >
> > > }
> > >
> > > You can find the complete code at,.
> > >
> https://svn.apache.org/repos/asf/incubator/qpid/branches/client_restructure/java/broker/src/main/java/org/apache/qpid/server/exchange/synapse/
> > >
> > > Regards,
> > >
> > > Rajith
> > >
> > >
> > > On 7/23/07, Michael Buchholz < m.buchholz@subnatural.de> wrote:
> > > > Paul
> > > >
> > > > I search for a sub-topic of my master thesis about Web-Service
> Mediation
> > > > Systems. After reading the JBI spec I had the idea that a WMS
> (Synapse)
> > > > could be used as a CBR in JBI-Enviroments:
> > > >
> > > > The Normalized Message Router (NMR) does not provide content based
> > > > routing (CBR). Each component (Service Enging / Binding Component)
> > > > referres another component by service endpoint, name or interface.
> That
> > > > means each component has its own routing logic included. Also the
> > > > component that sends the normalized message to the NMR must make sure
> > > > that the normalized message payload is understood by the referenced
> > > > component. (if i got the specs right)
> > > >
> > > > Synapse could provide a more convenient method to route messages by
> > > > providing CBR to a JBI enviroment.
> > > >
> > > > For this each component registered on the NMR could forward its
> > > > normalized message (NM) to the Synapse-Service Engine. Synapse can now
> > > > select the next component on the NMR for the incoming message type and
> > > > transform it to the message type of the selected component so that it
> > > > will understand it. All this is done by simply adding all the rules in
> > > > synpase rule-engine.
> > > >
> > > > In summary Synpase could provide:
> > > >   - validation & classification (incoming XML message from the NMR)
> > > >   - enrichment (for example calling other external services and
> > > > inserting this data into the xml message)
> > > >   - content based routing (choose next endpoint on the NMR)
> > > >   - transformation (transform outgoing message so that the selected
> > > > nmr-endpoint can understand it)
> > > >
> > > > .. that is a VERTO pattern: validate - enrich - route - transform -
> > > operate.
> > > >
> > > > And all this information can be stored in the synapse registry. JBI
> > > > routing in a centralized way. The components don´t need any more
> routing
> > > > logic except sending their messages to the synapse endpoint.
> > > >
> > > > Well.. that´s it ;). What do you think?
> > > >
> > > > Michael
> > > >
> > > > Paul Fremantle schrieb:
> > > > > So far we haven't done any work on JBI integration. You are the
> first
> > > > > person to ask for it! :-)
> > > > >
> > > > > Could you give us some more information on your requirements and the
> > > > > benefits you think there might be of integrating with a JBI
> container?
> > > > >
> > > > > Paul
> > > > >
> > > > > On 7/22/07, Michael Buchholz < m.buchholz@subnatural.de> wrote:
> > > > >> Hi,
> > > > >>
> > > > >> I wonder how Synapse can be plugged into a JBI enviroment as
> service
> > > > >> engine for content based routing.
> > > > >>
> > > > >> After googling for a while I found this:
> > > > >>
> > > > >> @http://wiki.apache.org/incubator/SynapseProposal
> > > > >> "Synapse plans to support the Java Business Integration (JBI)
> standard,
> > > > >> but we plan do so as an add-on rather than as core APIs."
> > > > >>
> > > > >> Is this still a planed feature? Do you have any more information on
> > > what
> > > > >>   the steps are to achieve it?
> > > > >>
> > > > >> Thanks.
> > > > >> Michael
> > > > >>
> > > > >>
> > >
> ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail:
> > > synapse-dev-unsubscribe@ws.apache.org
> > > > >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > synapse-dev-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > Paul Fremantle
> > Co-Founder and VP of Technical Sales, WSO2
> > OASIS WS-RX TC Co-chair
> >
> > blog: http://pzf.fremantle.org
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Re: Synapse and JBI

Posted by Rajith Attapattu <ra...@gmail.com>.
Yes the impl is customized for Qpid --> Qpid routing.
But it can be pointed out as an example for using synapse in other
environments.

The generic JBI SE (disscussed above by Michale) can be put in the synapse
code base.
so we have a good example in the code base itself.

Regards,

Rajith

On 7/24/07, Paul Fremantle <pz...@gmail.com> wrote:
>
> Cool Rajith! How can we get this code a bit more available for Synapse
> users? Are you restricted to only QPID->QPID routing with this?
>
> Paul
>
> On 7/24/07, Rajith Attapattu <ra...@gmail.com> wrote:
> > Paul & Michael,
> >
> > Thats exactly how I used synapse in Qpid.
> > To do CBR and Transformation of messages. It was done in a few simple
> steps,
> > largely due to the way synapse is designed.
> > Synapse does have a rich set of features that can be utilized outside of
> > it's primary domain. (primary domain as in WS mediation).
> >
> > Here are a few ideas (I have to warn, that I only had a cursory glance
> at
> > the JBI spec)
> > These are based on my experiance with the Qpid integration.
> >
> > You synapse Service component in the JBI container can convert from the
> > javax.jbi.messaging.NormalizedMessage to the synapse
> > MessageContext.
> > You could then feed the message context to the synapse engine. It will
> do
> > transformation and/or CBR
> > Then you could take the message context and convert it back to a
> > javax.jbi.messaging.NormalizedMessage.
> > Now it can be handed back to the JBI container. The new NM message
> context
> > will now have new routing information and/or a transformed payload.
> >
> > I broke it down to two steps to, so that I can easily type
> > NM = Normalized message
> > SC = Synapse Message Context
> >
> > JBIContainer ------NM-------> Synapse Component ----SC-------> Synapse
> > Engine
> >
> > Synapse Engine ----SC------->  Synapse Component -----NM----->
> JBIContainer.
> >
> >
> >
> > Your component can implement the SynapseEnvironment interface and in the
> > send method you can convert the message context in to a NM and hand over
> to
> > the JBI container.
> > Here is the code I used for Qpid and demonstrates the idea.
> >
> > public void send(EndpointDefinition endpoint, MessageContext smc)
> > {
> >  if(endpoint != null)
> >  {
> >  smc.setTo(new EndpointReference(endpoint.getAddress()));
> >  AMQMessage newMessage =
> > MessageContextCreatorForQpid.getAMQMessage
> > (smc);
> >  try
> >  {
> > qpidExchange.getExchangeRegistry().routeContent(newMessage);
> >  }
> >  catch(Exception e)
> >  {
> >  throw new SynapseException("Faulty endpoint",e);
> >  }
> >  }
> >
> > }
> >
> > You can find the complete code at,.
> >
> https://svn.apache.org/repos/asf/incubator/qpid/branches/client_restructure/java/broker/src/main/java/org/apache/qpid/server/exchange/synapse/
> >
> > Regards,
> >
> > Rajith
> >
> >
> > On 7/23/07, Michael Buchholz <m....@subnatural.de> wrote:
> > > Paul
> > >
> > > I search for a sub-topic of my master thesis about Web-Service
> Mediation
> > > Systems. After reading the JBI spec I had the idea that a WMS
> (Synapse)
> > > could be used as a CBR in JBI-Enviroments:
> > >
> > > The Normalized Message Router (NMR) does not provide content based
> > > routing (CBR). Each component (Service Enging / Binding Component)
> > > referres another component by service endpoint, name or interface.
> That
> > > means each component has its own routing logic included. Also the
> > > component that sends the normalized message to the NMR must make sure
> > > that the normalized message payload is understood by the referenced
> > > component. (if i got the specs right)
> > >
> > > Synapse could provide a more convenient method to route messages by
> > > providing CBR to a JBI enviroment.
> > >
> > > For this each component registered on the NMR could forward its
> > > normalized message (NM) to the Synapse-Service Engine. Synapse can now
> > > select the next component on the NMR for the incoming message type and
> > > transform it to the message type of the selected component so that it
> > > will understand it. All this is done by simply adding all the rules in
> > > synpase rule-engine.
> > >
> > > In summary Synpase could provide:
> > >   - validation & classification (incoming XML message from the NMR)
> > >   - enrichment (for example calling other external services and
> > > inserting this data into the xml message)
> > >   - content based routing (choose next endpoint on the NMR)
> > >   - transformation (transform outgoing message so that the selected
> > > nmr-endpoint can understand it)
> > >
> > > .. that is a VERTO pattern: validate - enrich - route - transform -
> > operate.
> > >
> > > And all this information can be stored in the synapse registry. JBI
> > > routing in a centralized way. The components don´t need any more
> routing
> > > logic except sending their messages to the synapse endpoint.
> > >
> > > Well.. that´s it ;). What do you think?
> > >
> > > Michael
> > >
> > > Paul Fremantle schrieb:
> > > > So far we haven't done any work on JBI integration. You are the
> first
> > > > person to ask for it! :-)
> > > >
> > > > Could you give us some more information on your requirements and the
> > > > benefits you think there might be of integrating with a JBI
> container?
> > > >
> > > > Paul
> > > >
> > > > On 7/22/07, Michael Buchholz <m....@subnatural.de> wrote:
> > > >> Hi,
> > > >>
> > > >> I wonder how Synapse can be plugged into a JBI enviroment as
> service
> > > >> engine for content based routing.
> > > >>
> > > >> After googling for a while I found this:
> > > >>
> > > >> @http://wiki.apache.org/incubator/SynapseProposal
> > > >> "Synapse plans to support the Java Business Integration (JBI)
> standard,
> > > >> but we plan do so as an add-on rather than as core APIs."
> > > >>
> > > >> Is this still a planed feature? Do you have any more information on
> > what
> > > >>   the steps are to achieve it?
> > > >>
> > > >> Thanks.
> > > >> Michael
> > > >>
> > > >>
> > ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail:
> > synapse-dev-unsubscribe@ws.apache.org
> > > >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > synapse-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>

Re: Synapse and JBI

Posted by Paul Fremantle <pz...@gmail.com>.
Cool Rajith! How can we get this code a bit more available for Synapse
users? Are you restricted to only QPID->QPID routing with this?

Paul

On 7/24/07, Rajith Attapattu <ra...@gmail.com> wrote:
> Paul & Michael,
>
> Thats exactly how I used synapse in Qpid.
> To do CBR and Transformation of messages. It was done in a few simple steps,
> largely due to the way synapse is designed.
> Synapse does have a rich set of features that can be utilized outside of
> it's primary domain. (primary domain as in WS mediation).
>
> Here are a few ideas (I have to warn, that I only had a cursory glance at
> the JBI spec)
> These are based on my experiance with the Qpid integration.
>
> You synapse Service component in the JBI container can convert from the
> javax.jbi.messaging.NormalizedMessage to the synapse
> MessageContext.
> You could then feed the message context to the synapse engine. It will do
> transformation and/or CBR
> Then you could take the message context and convert it back to a
> javax.jbi.messaging.NormalizedMessage.
> Now it can be handed back to the JBI container. The new NM message context
> will now have new routing information and/or a transformed payload.
>
> I broke it down to two steps to, so that I can easily type
> NM = Normalized message
> SC = Synapse Message Context
>
> JBIContainer ------NM-------> Synapse Component ----SC-------> Synapse
> Engine
>
> Synapse Engine ----SC------->  Synapse Component -----NM-----> JBIContainer.
>
>
>
> Your component can implement the SynapseEnvironment interface and in the
> send method you can convert the message context in to a NM and hand over to
> the JBI container.
> Here is the code I used for Qpid and demonstrates the idea.
>
> public void send(EndpointDefinition endpoint, MessageContext smc)
> {
>  if(endpoint != null)
>  {
>  smc.setTo(new EndpointReference(endpoint.getAddress()));
>  AMQMessage newMessage =
> MessageContextCreatorForQpid.getAMQMessage
> (smc);
>  try
>  {
> qpidExchange.getExchangeRegistry().routeContent(newMessage);
>  }
>  catch(Exception e)
>  {
>  throw new SynapseException("Faulty endpoint",e);
>  }
>  }
>
> }
>
> You can find the complete code at,.
> https://svn.apache.org/repos/asf/incubator/qpid/branches/client_restructure/java/broker/src/main/java/org/apache/qpid/server/exchange/synapse/
>
> Regards,
>
> Rajith
>
>
> On 7/23/07, Michael Buchholz <m....@subnatural.de> wrote:
> > Paul
> >
> > I search for a sub-topic of my master thesis about Web-Service Mediation
> > Systems. After reading the JBI spec I had the idea that a WMS (Synapse)
> > could be used as a CBR in JBI-Enviroments:
> >
> > The Normalized Message Router (NMR) does not provide content based
> > routing (CBR). Each component (Service Enging / Binding Component)
> > referres another component by service endpoint, name or interface. That
> > means each component has its own routing logic included. Also the
> > component that sends the normalized message to the NMR must make sure
> > that the normalized message payload is understood by the referenced
> > component. (if i got the specs right)
> >
> > Synapse could provide a more convenient method to route messages by
> > providing CBR to a JBI enviroment.
> >
> > For this each component registered on the NMR could forward its
> > normalized message (NM) to the Synapse-Service Engine. Synapse can now
> > select the next component on the NMR for the incoming message type and
> > transform it to the message type of the selected component so that it
> > will understand it. All this is done by simply adding all the rules in
> > synpase rule-engine.
> >
> > In summary Synpase could provide:
> >   - validation & classification (incoming XML message from the NMR)
> >   - enrichment (for example calling other external services and
> > inserting this data into the xml message)
> >   - content based routing (choose next endpoint on the NMR)
> >   - transformation (transform outgoing message so that the selected
> > nmr-endpoint can understand it)
> >
> > .. that is a VERTO pattern: validate - enrich - route - transform -
> operate.
> >
> > And all this information can be stored in the synapse registry. JBI
> > routing in a centralized way. The components don´t need any more routing
> > logic except sending their messages to the synapse endpoint.
> >
> > Well.. that´s it ;). What do you think?
> >
> > Michael
> >
> > Paul Fremantle schrieb:
> > > So far we haven't done any work on JBI integration. You are the first
> > > person to ask for it! :-)
> > >
> > > Could you give us some more information on your requirements and the
> > > benefits you think there might be of integrating with a JBI container?
> > >
> > > Paul
> > >
> > > On 7/22/07, Michael Buchholz <m....@subnatural.de> wrote:
> > >> Hi,
> > >>
> > >> I wonder how Synapse can be plugged into a JBI enviroment as service
> > >> engine for content based routing.
> > >>
> > >> After googling for a while I found this:
> > >>
> > >> @http://wiki.apache.org/incubator/SynapseProposal
> > >> "Synapse plans to support the Java Business Integration (JBI) standard,
> > >> but we plan do so as an add-on rather than as core APIs."
> > >>
> > >> Is this still a planed feature? Do you have any more information on
> what
> > >>   the steps are to achieve it?
> > >>
> > >> Thanks.
> > >> Michael
> > >>
> > >>
> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail:
> synapse-dev-unsubscribe@ws.apache.org
> > >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > >>
> > >>
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Re: Synapse and JBI

Posted by Michael Buchholz <m....@subnatural.de>.
Rajith

great idea. I didn´t think about the possibility to use the 
SynapseEnvironment interface instead of converting the NM to a SOAP 
message and then forward it to Synapse.

Thanks for the code!

Michael

Rajith Attapattu schrieb:
> Paul & Michael,
> 
> Thats exactly how I used synapse in Qpid.
> To do CBR and Transformation of messages. It was done in a few simple 
> steps,
> largely due to the way synapse is designed.
> Synapse does have a rich set of features that can be utilized outside of
> it's primary domain. (primary domain as in WS mediation).
> 
> Here are a few ideas (I have to warn, that I only had a cursory glance at
> the JBI spec)
> These are based on my experiance with the Qpid integration.
> 
> You synapse Service component in the JBI container can convert from the
> javax.jbi.messaging.NormalizedMessage to the synapse MessageContext.
> You could then feed the message context to the synapse engine. It will do
> transformation and/or CBR
> Then you could take the message context and convert it back to a
> javax.jbi.messaging.NormalizedMessage.
> Now it can be handed back to the JBI container. The new NM message context
> will now have new routing information and/or a transformed payload.
> 
> I broke it down to two steps to, so that I can easily type
> NM = Normalized message
> SC = Synapse Message Context
> 
> JBIContainer ------NM-------> Synapse Component ----SC-------> Synapse
> Engine
> 
> Synapse Engine ----SC------->  Synapse Component -----NM-----> 
> JBIContainer.
> 
> 
> 
> Your component can implement the SynapseEnvironment interface and in the
> send method you can convert the message context in to a NM and hand over to
> the JBI container.
> Here is the code I used for Qpid and demonstrates the idea.
> 
> public void send(EndpointDefinition endpoint, MessageContext smc)
> {
>     if(endpoint != null)
>     {
>         smc.setTo(new EndpointReference(endpoint.getAddress()));
>         AMQMessage newMessage = 
> MessageContextCreatorForQpid.getAMQMessage(smc);
>         try
>         {   
>             qpidExchange.getExchangeRegistry().routeContent(newMessage);
>         }
>         catch(Exception e)
>         {
>             throw new SynapseException("Faulty endpoint",e);
>         }
>     }   
>     
> }
> 
> 
> You can find the complete code at,.
> https://svn.apache.org/repos/asf/incubator/qpid/branches/client_restructure/java/broker/src/main/java/org/apache/qpid/server/exchange/synapse/ 
> 
> 
> Regards,
> 
> Rajith
> 
> On 7/23/07, Michael Buchholz <m....@subnatural.de> wrote:
>>
>> Paul
>>
>> I search for a sub-topic of my master thesis about Web-Service Mediation
>> Systems. After reading the JBI spec I had the idea that a WMS (Synapse)
>> could be used as a CBR in JBI-Enviroments:
>>
>> The Normalized Message Router (NMR) does not provide content based
>> routing (CBR). Each component (Service Enging / Binding Component)
>> referres another component by service endpoint, name or interface. That
>> means each component has its own routing logic included. Also the
>> component that sends the normalized message to the NMR must make sure
>> that the normalized message payload is understood by the referenced
>> component. (if i got the specs right)
>>
>> Synapse could provide a more convenient method to route messages by
>> providing CBR to a JBI enviroment.
>>
>> For this each component registered on the NMR could forward its
>> normalized message (NM) to the Synapse-Service Engine. Synapse can now
>> select the next component on the NMR for the incoming message type and
>> transform it to the message type of the selected component so that it
>> will understand it. All this is done by simply adding all the rules in
>> synpase rule-engine.
>>
>> In summary Synpase could provide:
>>   - validation & classification (incoming XML message from the NMR)
>>   - enrichment (for example calling other external services and
>> inserting this data into the xml message)
>>   - content based routing (choose next endpoint on the NMR)
>>   - transformation (transform outgoing message so that the selected
>> nmr-endpoint can understand it)
>>
>> .. that is a VERTO pattern: validate - enrich - route - transform -
>> operate.
>>
>> And all this information can be stored in the synapse registry. JBI
>> routing in a centralized way. The components don´t need any more routing
>> logic except sending their messages to the synapse endpoint.
>>
>> Well.. that´s it ;). What do you think?
>>
>> Michael
>>
>> Paul Fremantle schrieb:
>> > So far we haven't done any work on JBI integration. You are the first
>> > person to ask for it! :-)
>> >
>> > Could you give us some more information on your requirements and the
>> > benefits you think there might be of integrating with a JBI container?
>> >
>> > Paul
>> >
>> > On 7/22/07, Michael Buchholz <m....@subnatural.de> wrote:
>> >> Hi,
>> >>
>> >> I wonder how Synapse can be plugged into a JBI enviroment as service
>> >> engine for content based routing.
>> >>
>> >> After googling for a while I found this:
>> >>
>> >> @http://wiki.apache.org/incubator/SynapseProposal
>> >> "Synapse plans to support the Java Business Integration (JBI) 
>> standard,
>> >> but we plan do so as an add-on rather than as core APIs."
>> >>
>> >> Is this still a planed feature? Do you have any more information on
>> what
>> >>   the steps are to achieve it?
>> >>
>> >> Thanks.
>> >> Michael
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
>> >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>> >>
>> >>
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Re: Synapse and JBI

Posted by Rajith Attapattu <ra...@gmail.com>.
Paul & Michael,

Thats exactly how I used synapse in Qpid.
To do CBR and Transformation of messages. It was done in a few simple steps,
largely due to the way synapse is designed.
Synapse does have a rich set of features that can be utilized outside of
it's primary domain. (primary domain as in WS mediation).

Here are a few ideas (I have to warn, that I only had a cursory glance at
the JBI spec)
These are based on my experiance with the Qpid integration.

You synapse Service component in the JBI container can convert from the
javax.jbi.messaging.NormalizedMessage to the synapse MessageContext.
You could then feed the message context to the synapse engine. It will do
transformation and/or CBR
Then you could take the message context and convert it back to a
javax.jbi.messaging.NormalizedMessage.
Now it can be handed back to the JBI container. The new NM message context
will now have new routing information and/or a transformed payload.

I broke it down to two steps to, so that I can easily type
NM = Normalized message
SC = Synapse Message Context

JBIContainer ------NM-------> Synapse Component ----SC-------> Synapse
Engine

Synapse Engine ----SC------->  Synapse Component -----NM-----> JBIContainer.



Your component can implement the SynapseEnvironment interface and in the
send method you can convert the message context in to a NM and hand over to
the JBI container.
Here is the code I used for Qpid and demonstrates the idea.

public void send(EndpointDefinition endpoint, MessageContext smc)
{
	if(endpoint != null)
	{
		smc.setTo(new EndpointReference(endpoint.getAddress()));
		AMQMessage newMessage = MessageContextCreatorForQpid.getAMQMessage(smc);
		try
		{	
			qpidExchange.getExchangeRegistry().routeContent(newMessage);
		}
		catch(Exception e)
		{
			throw new SynapseException("Faulty endpoint",e);
		}
	}	
	
}


You can find the complete code at,.
https://svn.apache.org/repos/asf/incubator/qpid/branches/client_restructure/java/broker/src/main/java/org/apache/qpid/server/exchange/synapse/

Regards,

Rajith

On 7/23/07, Michael Buchholz <m....@subnatural.de> wrote:
>
> Paul
>
> I search for a sub-topic of my master thesis about Web-Service Mediation
> Systems. After reading the JBI spec I had the idea that a WMS (Synapse)
> could be used as a CBR in JBI-Enviroments:
>
> The Normalized Message Router (NMR) does not provide content based
> routing (CBR). Each component (Service Enging / Binding Component)
> referres another component by service endpoint, name or interface. That
> means each component has its own routing logic included. Also the
> component that sends the normalized message to the NMR must make sure
> that the normalized message payload is understood by the referenced
> component. (if i got the specs right)
>
> Synapse could provide a more convenient method to route messages by
> providing CBR to a JBI enviroment.
>
> For this each component registered on the NMR could forward its
> normalized message (NM) to the Synapse-Service Engine. Synapse can now
> select the next component on the NMR for the incoming message type and
> transform it to the message type of the selected component so that it
> will understand it. All this is done by simply adding all the rules in
> synpase rule-engine.
>
> In summary Synpase could provide:
>   - validation & classification (incoming XML message from the NMR)
>   - enrichment (for example calling other external services and
> inserting this data into the xml message)
>   - content based routing (choose next endpoint on the NMR)
>   - transformation (transform outgoing message so that the selected
> nmr-endpoint can understand it)
>
> .. that is a VERTO pattern: validate - enrich - route - transform -
> operate.
>
> And all this information can be stored in the synapse registry. JBI
> routing in a centralized way. The components don´t need any more routing
> logic except sending their messages to the synapse endpoint.
>
> Well.. that´s it ;). What do you think?
>
> Michael
>
> Paul Fremantle schrieb:
> > So far we haven't done any work on JBI integration. You are the first
> > person to ask for it! :-)
> >
> > Could you give us some more information on your requirements and the
> > benefits you think there might be of integrating with a JBI container?
> >
> > Paul
> >
> > On 7/22/07, Michael Buchholz <m....@subnatural.de> wrote:
> >> Hi,
> >>
> >> I wonder how Synapse can be plugged into a JBI enviroment as service
> >> engine for content based routing.
> >>
> >> After googling for a while I found this:
> >>
> >> @http://wiki.apache.org/incubator/SynapseProposal
> >> "Synapse plans to support the Java Business Integration (JBI) standard,
> >> but we plan do so as an add-on rather than as core APIs."
> >>
> >> Is this still a planed feature? Do you have any more information on
> what
> >>   the steps are to achieve it?
> >>
> >> Thanks.
> >> Michael
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >>
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>

Re: Synapse and JBI

Posted by Michael Buchholz <m....@subnatural.de>.
Paul

I search for a sub-topic of my master thesis about Web-Service Mediation 
Systems. After reading the JBI spec I had the idea that a WMS (Synapse) 
could be used as a CBR in JBI-Enviroments:

The Normalized Message Router (NMR) does not provide content based 
routing (CBR). Each component (Service Enging / Binding Component) 
referres another component by service endpoint, name or interface. That 
means each component has its own routing logic included. Also the 
component that sends the normalized message to the NMR must make sure 
that the normalized message payload is understood by the referenced 
component. (if i got the specs right)

Synapse could provide a more convenient method to route messages by 
providing CBR to a JBI enviroment.

For this each component registered on the NMR could forward its 
normalized message (NM) to the Synapse-Service Engine. Synapse can now 
select the next component on the NMR for the incoming message type and 
transform it to the message type of the selected component so that it 
will understand it. All this is done by simply adding all the rules in 
synpase rule-engine.

In summary Synpase could provide:
  - validation & classification (incoming XML message from the NMR)
  - enrichment (for example calling other external services and 
inserting this data into the xml message)
  - content based routing (choose next endpoint on the NMR)
  - transformation (transform outgoing message so that the selected 
nmr-endpoint can understand it)

.. that is a VERTO pattern: validate - enrich - route - transform - operate.

And all this information can be stored in the synapse registry. JBI 
routing in a centralized way. The components don´t need any more routing 
logic except sending their messages to the synapse endpoint.

Well.. that´s it ;). What do you think?

Michael

Paul Fremantle schrieb:
> So far we haven't done any work on JBI integration. You are the first
> person to ask for it! :-)
> 
> Could you give us some more information on your requirements and the
> benefits you think there might be of integrating with a JBI container?
> 
> Paul
> 
> On 7/22/07, Michael Buchholz <m....@subnatural.de> wrote:
>> Hi,
>>
>> I wonder how Synapse can be plugged into a JBI enviroment as service
>> engine for content based routing.
>>
>> After googling for a while I found this:
>>
>> @http://wiki.apache.org/incubator/SynapseProposal
>> "Synapse plans to support the Java Business Integration (JBI) standard,
>> but we plan do so as an add-on rather than as core APIs."
>>
>> Is this still a planed feature? Do you have any more information on what
>>   the steps are to achieve it?
>>
>> Thanks.
>> Michael
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>>
>>
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Re: Synapse and JBI

Posted by Paul Fremantle <pz...@gmail.com>.
So far we haven't done any work on JBI integration. You are the first
person to ask for it! :-)

Could you give us some more information on your requirements and the
benefits you think there might be of integrating with a JBI container?

Paul

On 7/22/07, Michael Buchholz <m....@subnatural.de> wrote:
> Hi,
>
> I wonder how Synapse can be plugged into a JBI enviroment as service
> engine for content based routing.
>
> After googling for a while I found this:
>
> @http://wiki.apache.org/incubator/SynapseProposal
> "Synapse plans to support the Java Business Integration (JBI) standard,
> but we plan do so as an add-on rather than as core APIs."
>
> Is this still a planed feature? Do you have any more information on what
>   the steps are to achieve it?
>
> Thanks.
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Synapse and JBI

Posted by Michael Buchholz <m....@subnatural.de>.
Hi,

I wonder how Synapse can be plugged into a JBI enviroment as service 
engine for content based routing.

After googling for a while I found this:

@http://wiki.apache.org/incubator/SynapseProposal
"Synapse plans to support the Java Business Integration (JBI) standard, 
but we plan do so as an add-on rather than as core APIs."

Is this still a planed feature? Do you have any more information on what 
  the steps are to achieve it?

Thanks.
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Re: "Regarding Namespace Problem with an application"

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Renjith,


On 7/20/07, Renjith <R....@commence.com> wrote:
>
> Hi Ruwan, Jonnathan,
>
>
>
> Thank you for the great help.
>
> At last I have implemented my solution. Thanks for the wonderful help.



Nice to here that, you got it working. You are more than welcome.


Just for curiosity I have one last question.
>
> What is the difference between proposed XSLT and the XSLT given below:
> Both
> worked for me :-) .



Both seems to be equivalent from the logic, so you can use what ever you
like. In the XSLT I have provided it will call a different template to get
the elements copied, so that you can handle more than one NS if required
using another template. Your XSLT also seems to be fine.

You can always ask any more things regarding Synapse.....

Thanks,
Ruwan.


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

RE: "Regarding Namespace Problem with an application"

Posted by Renjith <R....@commence.com>.
Hi Ruwan, Jonnathan,

 

Thank you for the great help.

At last I have implemented my solution. Thanks for the wonderful help. 

 

Just for curiosity I have one last question.

What is the difference between proposed XSLT and the XSLT given below: Both
worked for me :-) .  

 

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:ns1="http://developer.intuit.com/" 

version="1.0">

<xsl:template match="*">

<xsl:element name="{local-name()}" namespace="http://sync.dtc.com/">

     <xsl:copy-of select="@*"/>

     <xsl:apply-templates/>

 </xsl:element>

</xsl:template>

</xsl:stylesheet>

 

 

Thanks & Regards,

Renjith 

  _____  

From: Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Sent: Thursday, July 19, 2007 1:36 AM
To: synapse-user@ws.apache.org
Subject: Re: "Regarding Namespace Problem with an application"

 

Sorry, here is the attachment.

Ruwan.

On 7/19/07, Ruwan Linton <ru...@gmail.com> wrote: 

Hi Renjith,

It seems now the discussion is on XSLT :D

I think the attached xslt will solve your problem.



I do have another question too .

Regarding next expected request to the same service from the same client
will be another element

Say right now the element is "authenticate". The next time the element will 
be "requestXML" with different child elements. (This is because after
"authenticate" the service expects "requestXML" as next request from the
client. Could you please help me in this or provide me any link that can 
really help me in this scenario.



The above solution I have proposed is not bound to any particular message.

I must state that I got the help of Jonathan in order to get this done
correctly. 

Thanks,
Ruwan.
 

 

Thanks & Regards,

Renjith





-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform" 




-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform" 


Re: "Regarding Namespace Problem with an application"

Posted by Ruwan Linton <ru...@gmail.com>.
Sorry, here is the attachment.

Ruwan.

On 7/19/07, Ruwan Linton <ru...@gmail.com> wrote:
>
> Hi Renjith,
>
> It seems now the discussion is on XSLT :D
>
> I think the attached xslt will solve your problem.
>
>
> >
> > I do have another question too .
> >
> > Regarding next expected request to the same service from the same client
> > will be another element
> >
> > Say right now the element is "authenticate". The next time the element
> > will
> > be "requestXML" with different child elements. (This is because after
> > "authenticate" the service expects "requestXML" as next request from the
> > client. Could you please help me in this or provide me any link that can
> >
> > really help me in this scenario.
>
>
>
> The above solution I have proposed is not bound to any particular message.
>
> I must state that I got the help of Jonathan in order to get this done
> correctly.
>
> Thanks,
> Ruwan.
>
>
> Thanks & Regards,
> >
> > Renjith
> >
> >
> >
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"
>



-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: "Regarding Namespace Problem with an application"

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Renjith,

It seems now the discussion is on XSLT :D

I think the attached xslt will solve your problem.


>
> I do have another question too .
>
> Regarding next expected request to the same service from the same client
> will be another element
>
> Say right now the element is "authenticate". The next time the element
> will
> be "requestXML" with different child elements. (This is because after
> "authenticate" the service expects "requestXML" as next request from the
> client. Could you please help me in this or provide me any link that can
> really help me in this scenario.



The above solution I have proposed is not bound to any particular message.

I must state that I got the help of Jonathan in order to get this done
correctly.

Thanks,
Ruwan.


Thanks & Regards,
>
> Renjith
>
>
>

-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

RE: "Regarding Namespace Problem with an application"

Posted by Renjith <R....@commence.com>.
Hi Ruwan,

Thank you for your patience.

 

The solution you provided by you worked to some extend.

Rt now I am able to get into my web services that is having another name
space. But the problem is that inside the web services user name and
password is null string.

I have changed your solution to

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="

1.0">

<xsl:template match="*">

<authenticate xmlns="http://sync.dtc.com/">

<strUserName><xsl:value-of

select="//authenticate/strUserName/text()"/></strUserName>

<strPassword><xsl:value-of

select="//authenticate/strPassword/text()"/></strPassword>

</authenticate>

</xsl:template>

</xsl:stylesheet>

 

 

Since strPassword::text() is giving invalid axes name error.

So I changed into strPassword/text().

 

I do have another question too .

Regarding next expected request to the same service from the same client
will be another element

Say right now the element is "authenticate". The next time the element will
be "requestXML" with different child elements. (This is because after
"authenticate" the service expects "requestXML" as next request from the
client. Could you please help me in this or provide me any link that can
really help me in this scenario.

 

Thanks & Regards,

Renjith

 

 

 

-----Original Message-----
From: Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Sent: Tuesday, July 17, 2007 3:48 AM
To: synapse-user@ws.apache.org
Subject: Re: "Regarding Namespace Problem with an application"

 

Hi Renjith,

 

I am not that sure about the error you are getting on the EPR, but if you

are not going to specify the source, then you need to change the XSLT a

little bit more in order to identically transform the element with changing

the NS only.

 

 

> authenticate, Envelope:

> 

> <?xml version='1.0' encoding='utf-8'?>

> 

> <soap:Envelope

> 

> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

> 

> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

> 

> xmlns:xsd="http://www.w3.org/2001/XMLSchema">

> 

> <soap:Body>

> 

>   <authenticate xmlns="http://developer.intuit.com/">

> 

> <strUserName>test</strUserName>

> 

> <strPassword>test</strPassword>

> 

>   </authenticate>

> 

> </soap:Body>

> 

> </soap:Envelope>

> 

> 

> Note: I avoid using source option in xslt , since I read somewhere that it

> will take the first element by default if we are not using "source"

> attribute in the tag.

> 

> 

> 

> Could you please guide me with this problem?

 

 

 

If you are not going to use the source attr of XSLT mediator, U need to

write a  full xsl transformation on the message body.

 

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="

1.0">

<xsl:template match="*">

<authenticate xmlns="http://developer.intuit.com/">

<strUserName><xsl:value-of

select="//authenticate/strUserName::text()"/></strUserName>

<strPassword><xsl:value-of

select="//authenticate/strPassword::text()"/></strPassword>

</authenticate>

</xsl:template>

</xsl:stylesheet>

 

Can U try with this new XSLT (here I am assuming that the message is in the

format of what U pasted earlier only with the NS being different)

 

 

If this even fails can U please attach the full console log to the mail so

that I can see what is going wrong.

 

Thanks,

Ruwan

 

-- 

Ruwan Linton

http://www.wso2.org - "Oxygenating the Web Services Platform"


Re: "Regarding Namespace Problem with an application"

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Renjith,

I am not that sure about the error you are getting on the EPR, but if you
are not going to specify the source, then you need to change the XSLT a
little bit more in order to identically transform the element with changing
the NS only.


> authenticate, Envelope:
>
> <?xml version='1.0' encoding='utf-8'?>
>
> <soap:Envelope
>
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> <soap:Body>
>
>   <authenticate xmlns="http://developer.intuit.com/">
>
> <strUserName>test</strUserName>
>
> <strPassword>test</strPassword>
>
>   </authenticate>
>
> </soap:Body>
>
> </soap:Envelope>
>
>
> Note: I avoid using source option in xslt , since I read somewhere that it
> will take the first element by default if we are not using "source"
> attribute in the tag.
>
>
>
> Could you please guide me with this problem?



If you are not going to use the source attr of XSLT mediator, U need to
write a  full xsl transformation on the message body.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="
1.0">
<xsl:template match="*">
<authenticate xmlns="http://developer.intuit.com/">
<strUserName><xsl:value-of
select="//authenticate/strUserName::text()"/></strUserName>
<strPassword><xsl:value-of
select="//authenticate/strPassword::text()"/></strPassword>
</authenticate>
</xsl:template>
</xsl:stylesheet>

Can U try with this new XSLT (here I am assuming that the message is in the
format of what U pasted earlier only with the NS being different)


If this even fails can U please attach the full console log to the mail so
that I can see what is going wrong.

Thanks,
Ruwan

-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

RE: "Regarding Namespace Problem with an application"

Posted by Renjith <R....@commence.com>.
Hi Ruwan,

 

Thank you for the great help.

I tried the solution you suggested.

But could not pass through the XSLT Mediator ( I'm sure that I did something
terribly wrong):

 

I am getting an error as mentioned below:

 

 

============================================================================
==========================================================================

[I/O reactor worker thread 7] INFO  PipeImpl - Using simulated buffered
Pipes for event-driven to stream IO bridging

[HttpServerWorker-1] ERROR ServerWorker - Error processing POST request

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
not found is /soap/MySvc and the WSA Action = http://developer.intuit.com/c

lientVersion

        at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java
:48)

        at org.apache.axis2.engine.Phase.invoke(Phase.java:399)

        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:203)

        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:131)

        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT
TPTransportUtils.java:279)

        at
org.apache.axis2.transport.nhttp.ServerWorker.processPost(ServerWorker.java:
207)

        at
org.apache.axis2.transport.nhttp.ServerWorker.run(ServerWorker.java:171)

        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:650)

        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
75)

        at java.lang.Thread.run(Thread.java:595)

[HttpServerWorker-2] ERROR XSLTMediator - Unable to do the transformation

[HttpServerWorker-2] INFO  LogMediator - To: /soap/MySvc, WSAction:
http://developer.intuit.com/authenticate, SOAPAction:
http://developer.intuit.com/

authenticate, Envelope:

 <?xml version='1.0' encoding='utf-8'?>

<soap:Envelope

 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 

 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

 xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

  <authenticate xmlns="http://developer.intuit.com/">

<strUserName>test</strUserName>

<strPassword>test</strPassword>

  </authenticate>

</soap:Body>

</soap:Envelope>

 

 

============================================================================
==========================================================================

 

 

 

 

The xslt which I created is exactly like you mentioned in your solution.

And Config file is like mentioned below:

 

============================================================================
===========================================================================

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

<localEntry key="xslt-key-qb" src="file:repository/qbsync.xslt"/>

    <proxy name="WCRMERPAPISvc">

        <target>

          <inSequence>

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

        </inSequence>

 

            <endpoint>

                <address uri="http://localhost:8080/axis2/services/MySvc"/>

            </endpoint>

                  <outSequence>

                        <send/>

                  </outSequence>

        </target>

        <publishWSDL
uri="file:repository/conf/sample/resources/proxy/ERPAPISvc.wsdl"/>

    </proxy>

</definitions>

 

============================================================================
==========================================================================

 

Note: I avoid using source option in xslt , since I read somewhere that it
will take the first element by default if we are not using "source"
attribute in the tag. 

 

Could you please guide me with this problem?

 

Thanks,

Renjith 

 

 

 

-----Original Message-----
From: Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Sent: Friday, July 13, 2007 10:48 PM
To: synapse-user@ws.apache.org
Subject: Re: "Regarding Namespace Problem with an application"

 

Hi Renjith,

 

Cool, nice to here that you got it working... See the comments in line;

 

 

On 7/14/07, Renjith <R....@commence.com> wrote:

> 

> 

> 

> Hi Ruwan,

> 

> 

> 

> Thanks for the information.

> 

> With the information provided by you, I am able to get proxy service

> worked.

> 

> Let me repeat my original question and your proposed solution so that I

> can get some help with XSLT:

> 

> 

> 

> 

> 

> *ORIGINAL QUESTION:*

> 

> 

> 

>          "Let me explain how I developed the WebServices. I started

> 

>  developing the code from the WSDL the ERP client provides. And it is

> 

>  as shown in attached ERPAPISvc.wsdl (Namespace is

> 

>  "*http://developer.intuit.com*"). And when I deployed the service it

> 

>  worked fine with the client (Let say Client1).

> 

> 

> 

>          But we have 2 or more client program that can use the same

> 

>  service.

> 

>  But that client exists in our System in different Namespace. As

> 

>  described in MySvc.wsdl (Namespace is "*http://sync.dtc.com/*").

> 

> 

> 

>          So when I tried to change the existing Namespace

> 

>  "http://developer.intuit.com" to "*http://sync.dtc.com/*" the Client1

> (build using ERPAPISvc.wsdl)

> 

>  stop working and throws unexpected subelement strUserName. And all

> 

>  other client program (build using MySvc.wsdl) starts running.

> 

> 

> 

>        So what I am trying to do is make all client works with code

> 

>  developed from same wsdl (MySvc.wsdl)  and having the namespace

> 

>  "*http://sync.dtc.com/*"."

> 

> 

> 

> 

> 

> * AND THE SOLUTION PROPOSED BY YOU WAS*:(I modified 2 values as per my

> understading)

> 

> 

> 

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

> 

>     <proxy name="$NAME_OF_THE_PROXY">

> 

> 

> 

>         <target>

> 

>             <inSequence>

> 

>                 <xslt key*="$XSLT_FILE_REGISTRY_KEY*"/>

> 

>             </inSequence>

> 

>             <endpoint>

> 

>                 <address uri=" *http://localhost:8080/axis2/services/MySvc

> *"/>

> 

>             </endpoint>

> 

>             <outSequence>

> 

>                 <send/>

> 

>             </outSequence>

> 

>         </target>

> 

>         <publishWSDL uri="file:repository/*ERPAPISvc.wsdl*"/>

> 

>     </proxy>

> 

> </definitions>

> 

> 

> 

> 

> 

> In the XSLT you have to transform the NS from one to another.

> 

> 

> 

> Note : I have modified the address URI to

> http://localhost:8080/axis2/services/MySvc (It is been running in

> JBOSS-TOMCAT server where *MySvc.wsdl* is been published)

> 

> And I am supposed to keep *ERPAPI.wsdl* in publishWSDL-uri rt? Please

> correct me if I am wrong.

> 

 

You are absolutely correct.

 

 

Could you please guide me in creating the XSLT & configure the same in

> definitions file OR using WSO2 ESB.

> 

 

 

Yes sure.

 

Now you need to create a XSLT which will transform the name space from "

http://sync.dtc.com/" to "http://developer.intuit.com" and put that in the

repository  of synapse (will say $XSLT_FILE_REGISTRY_KEY).

 

Since you need to transform the NS of the request you could specify the

element which contains the NS declaration in the request to the XSLT

mediator using the attribute "source" as an XPATH (to do this you need to

know the exact request that is coming to synapse)

 

Now your configuration for the XSLT mediator will be something like this

 

<xslt key="$XSLT_FILE_REGISTRY_KEY" source="&XPATH_TO_THE_NS_DECLARATION" />

 

Your xslt file should looks something like the following

 

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="

1.0">

<xsl:template match="*">

<xsl:text>http://developer.intuit.com</xsl:text>

</xsl:template>

</xsl:stylesheet>

 

I assume that you can get the XPATH expression to get the NS declaration,

you can refer to the followings on XSLT and XPATH.

 

[1] - http://www.w3schools.com/xpath/xpath_examples.asp

[2] - http://www.cafeconleche.org/books/xmljava/chapters/ch16.html

[3] - http://www.w3schools.com/xsl/default.asp

 

If you are having any issues with this feel free to go for any more

clarifications...

 

 

Thanks,

Ruwan** <http://sync.dtc.com/>

 

 

-- 

Ruwan Linton

http://www.wso2.org - "Oxygenating the Web Services Platform"


Re: "Regarding Namespace Problem with an application"

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Renjith,

Cool, nice to here that you got it working... See the comments in line;


On 7/14/07, Renjith <R....@commence.com> wrote:
>
>
>
> Hi Ruwan,
>
>
>
> Thanks for the information.
>
> With the information provided by you, I am able to get proxy service
> worked.
>
> Let me repeat my original question and your proposed solution so that I
> can get some help with XSLT:
>
>
>
>
>
> *ORIGINAL QUESTION:*
>
>
>
>          "Let me explain how I developed the WebServices. I started
>
>  developing the code from the WSDL the ERP client provides. And it is
>
>  as shown in attached ERPAPISvc.wsdl (Namespace is
>
>  "*http://developer.intuit.com*"). And when I deployed the service it
>
>  worked fine with the client (Let say Client1).
>
>
>
>          But we have 2 or more client program that can use the same
>
>  service.
>
>  But that client exists in our System in different Namespace. As
>
>  described in MySvc.wsdl (Namespace is "*http://sync.dtc.com/*").
>
>
>
>          So when I tried to change the existing Namespace
>
>  "http://developer.intuit.com" to "*http://sync.dtc.com/*" the Client1
> (build using ERPAPISvc.wsdl)
>
>  stop working and throws unexpected subelement strUserName. And all
>
>  other client program (build using MySvc.wsdl) starts running.
>
>
>
>        So what I am trying to do is make all client works with code
>
>  developed from same wsdl (MySvc.wsdl)  and having the namespace
>
>  "*http://sync.dtc.com/*"."
>
>
>
>
>
> * AND THE SOLUTION PROPOSED BY YOU WAS*:(I modified 2 values as per my
> understading)
>
>
>
> <definitions xmlns="http://ws.apache.org/ns/synapse">
>
>     <proxy name="$NAME_OF_THE_PROXY">
>
>
>
>         <target>
>
>             <inSequence>
>
>                 <xslt key*="$XSLT_FILE_REGISTRY_KEY*"/>
>
>             </inSequence>
>
>             <endpoint>
>
>                 <address uri=" *http://localhost:8080/axis2/services/MySvc
> *"/>
>
>             </endpoint>
>
>             <outSequence>
>
>                 <send/>
>
>             </outSequence>
>
>         </target>
>
>         <publishWSDL uri="file:repository/*ERPAPISvc.wsdl*"/>
>
>     </proxy>
>
> </definitions>
>
>
>
>
>
> In the XSLT you have to transform the NS from one to another.
>
>
>
> Note : I have modified the address URI to
> http://localhost:8080/axis2/services/MySvc (It is been running in
> JBOSS-TOMCAT server where *MySvc.wsdl* is been published)
>
> And I am supposed to keep *ERPAPI.wsdl* in publishWSDL-uri rt? Please
> correct me if I am wrong.
>

You are absolutely correct.


Could you please guide me in creating the XSLT & configure the same in
> definitions file OR using WSO2 ESB.
>


Yes sure.

Now you need to create a XSLT which will transform the name space from "
http://sync.dtc.com/" to "http://developer.intuit.com" and put that in the
repository  of synapse (will say $XSLT_FILE_REGISTRY_KEY).

Since you need to transform the NS of the request you could specify the
element which contains the NS declaration in the request to the XSLT
mediator using the attribute "source" as an XPATH (to do this you need to
know the exact request that is coming to synapse)

Now your configuration for the XSLT mediator will be something like this

<xslt key="$XSLT_FILE_REGISTRY_KEY" source="&XPATH_TO_THE_NS_DECLARATION" />

Your xslt file should looks something like the following

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="
1.0">
<xsl:template match="*">
<xsl:text>http://developer.intuit.com</xsl:text>
</xsl:template>
</xsl:stylesheet>

I assume that you can get the XPATH expression to get the NS declaration,
you can refer to the followings on XSLT and XPATH.

[1] - http://www.w3schools.com/xpath/xpath_examples.asp
[2] - http://www.cafeconleche.org/books/xmljava/chapters/ch16.html
[3] - http://www.w3schools.com/xsl/default.asp

If you are having any issues with this feel free to go for any more
clarifications...


Thanks,
Ruwan** <http://sync.dtc.com/>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

RE: "Regarding Namespace Problem with an application"

Posted by Renjith <R....@commence.com>.
 

Hi Ruwan,

 

Thanks for the information.

With the information provided by you, I am able to get proxy service worked.

Let me repeat my original question and your proposed solution so that I can
get some help with XSLT:

 

 

ORIGINAL QUESTION:

 

         "Let me explain how I developed the WebServices. I started 

 developing the code from the WSDL the ERP client provides. And it is 

 as shown in attached ERPAPISvc.wsdl (Namespace is 

 "http://developer.intuit.com"). And when I deployed the service it 

 worked fine with the client (Let say Client1).

 

         But we have 2 or more client program that can use the same 

 service.

 But that client exists in our System in different Namespace. As 

 described in MySvc.wsdl (Namespace is "http://sync.dtc.com/").

 

         So when I tried to change the existing Namespace 

 "http://developer.intuit.com" to "http://sync.dtc.com/" the Client1 (build
using ERPAPISvc.wsdl) 

 stop working and throws unexpected subelement strUserName. And all 

 other client program (build using MySvc.wsdl) starts running.

 

       So what I am trying to do is make all client works with code 

 developed from same wsdl (MySvc.wsdl)  and having the namespace 

 "http://sync.dtc.com/"."

 

   

 AND THE SOLUTION PROPOSED BY YOU WAS:(I modified 2 values as per my
understading)

 

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

    <proxy name="$NAME_OF_THE_PROXY">

 

        <target>

            <inSequence>

                <xslt key="$XSLT_FILE_REGISTRY_KEY"/>

            </inSequence>

            <endpoint>

                <address uri=" http://localhost:8080/axis2/services/MySvc"/>

            </endpoint>

            <outSequence>

                <send/>

            </outSequence>

        </target>

        <publishWSDL uri="file:repository/ERPAPISvc.wsdl"/>

    </proxy>

</definitions>

 

 

In the XSLT you have to transform the NS from one to another. 

 

Note : I have modified the address URI to
http://localhost:8080/axis2/services/MySvc (It is been running in
JBOSS-TOMCAT server where MySvc.wsdl is been published)

And I am supposed to keep ERPAPI.wsdl in publishWSDL-uri rt? Please correct
me if I am wrong.

 

Could you please guide me in creating the XSLT & configure the same in
definitions file OR using WSO2 ESB.

 

 

Thanks & Regards,

Renjith Kalappurackal

 

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

-----Original Message-----
From: Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Sent: Thursday, July 12, 2007 11:42 PM
To: synapse-user@ws.apache.org
Subject: Re: "Regarding Namespace Problem with an application"

 

> 

> 2) Then I made changes to synapse_sample_100.xml file as below:

> 

> 

> 

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

> 

>     <proxy name="SAMPLEAPISvc">

> 

>         <target>

> 

>             <endpoint>

> 

>                 <address

> uri="http://localhost:8008/axis2/services/SAMPLEAPISvc"/>

> 

>             </endpoint>

> 

>                   <outSequence>

> 

>                         <send/>

> 

>                   </outSequence>

> 

>         </target>

> 

>         <publishWSDL

> uri="file:repository/conf/sample/resources/proxy/SAMPLEAPISvc.wsdl"/>

> 

>     </proxy>

> 

> </definitions>

 

 

 

It is better if you can switch to jdk 1.5 or *for the moment remove this

publishWSDL tag* and try again.

 

 

[main] INFO  SynapseModule - Deploying Proxy services...

> 

> java.lang.NoSuchMethodError: java.net.URLConnection.setReadTimeout(I)V

> 

>         at org.apache.synapse.config.Util.getOMElementFromURL(Util.java

> :150)

> 

>         at

 

 

 

BTW: I strongly recommend you to use WSO2ESB as Asankha pointed which will

provide a graphical interface for you to create the configuration.

 

I think Asankha has provided the answers to your questions, if you have any

more clarifications you are more than welcome.

 

[1] - http://wso2.org/projects/esb/java

 

Thanks,

Ruwan


Re: "Regarding Namespace Problem with an application"

Posted by Ruwan Linton <ru...@gmail.com>.
>
> 2) Then I made changes to synapse_sample_100.xml file as below:
>
>
>
> <definitions xmlns="http://ws.apache.org/ns/synapse">
>
>     <proxy name="SAMPLEAPISvc">
>
>         <target>
>
>             <endpoint>
>
>                 <address
> uri="http://localhost:8008/axis2/services/SAMPLEAPISvc"/>
>
>             </endpoint>
>
>                   <outSequence>
>
>                         <send/>
>
>                   </outSequence>
>
>         </target>
>
>         <publishWSDL
> uri="file:repository/conf/sample/resources/proxy/SAMPLEAPISvc.wsdl"/>
>
>     </proxy>
>
> </definitions>



It is better if you can switch to jdk 1.5 or *for the moment remove this
publishWSDL tag* and try again.


[main] INFO  SynapseModule - Deploying Proxy services...
>
> java.lang.NoSuchMethodError: java.net.URLConnection.setReadTimeout(I)V
>
>         at org.apache.synapse.config.Util.getOMElementFromURL(Util.java
> :150)
>
>         at



BTW: I strongly recommend you to use WSO2ESB as Asankha pointed which will
provide a graphical interface for you to create the configuration.

I think Asankha has provided the answers to your questions, if you have any
more clarifications you are more than welcome.

[1] - http://wso2.org/projects/esb/java

Thanks,
Ruwan

RE: "Regarding Namespace Problem with an application"

Posted by Renjith <R....@commence.com>.
Thanks a lot for this information.

-----Original Message-----
From: Asankha C. Perera [mailto:asankha@wso2.com] 
Sent: Thursday, July 12, 2007 11:11 PM
To: synapse-user@ws.apache.org
Subject: Re: "Regarding Namespace Problem with an application"

Renjith

I think Ruwan will answer your questions.. but if you are really new to 
Synapse and find it difficult to write the configuration manually or 
understand the concepts, you could try the WSO2 ESB which basically adds 
an enhanced registry and a graphical UI to Synapse. It is Synapse that 
does everything else, and the configurations are compatible.
> I tried to set up a proxy service as a first step. These are steps I
> followed.
>
> 1) I started my service using JBOSS-Tomcat Server and it is working on the
> port "8080". The wsdl is visible using
> "http://localhost:8008/axis2/services/SAMPLEAPISvc?wsdl"
>   
Now, Synapse by default tries to run on port 8080, and if its 
unavailable, would pick 8081! (the exact port would be printed on the 
console at startup)
> 2) Then I made changes to synapse_sample_100.xml file as below:
>
> <definitions xmlns="http://ws.apache.org/ns/synapse">
>     <proxy name="SAMPLEAPISvc">
>         <target>
>             <endpoint>
>                 <address
uri="http://localhost:8008/axis2/services/SAMPLEAPISvc"/>
>             </endpoint>
>                   <outSequence>
>                         <send/>
>                   </outSequence>
>         </target>
>         <publishWSDL
uri="file:repository/conf/sample/resources/proxy/SAMPLEAPISvc.wsdl"/>
>     </proxy>
> </definitions>
>
> 3) Then I tried starting Synapse using the command synapse.bat -sample 100
>
> 4) This is giving me an error in Synapse console as below:
>
> C:\synapse-1.0\bin>synapse.bat -sample 100
> [main] INFO  SynapseModule - Deploying Proxy services...
> java.lang.NoSuchMethodError: java.net.URLConnection.setReadTimeout(I)V
>
> Could you please guide me in solving this basic issue? I'm sure that I did
> something terribly wrong.
>   
Seems like you found a place in the code thats not JDK 1.4 compatible, 
and you are using a JDK 1.4. Could you please file a JIRA for this, so 
that we could fix this ASAP for the upcoming 1.0.1 release? Ideally we 
should not try to set a read timeout if the JDK does not support it. In 
the meantime, if you could switch to a JDK 1.5 it would be better - and 
faster too.
> Note: One Important question I should ask about proxy service is that, in
my
> case I cannot make change in code or the way it generated. Only thing I
can
> change is the uri to access the Service. Right now the URI that is
accessing
> by client is set to 
>
> http://localhost: <http://localhost:8008/axis2/services/SAMPLEAPISvc>
> 8008/axis2/services/SAMPLEAPISvc , where 8008 is the port that is using by
> Synpase. Is this the right way to make Synapse a mediator for service that
> is been running in port 8080? Because in my case I cannot use
> -Daddurl=<addressingEPR> -Dtrpurl=<synapse> for the client because the
> client is a windows program and I have no way to control it. 
>   
The EPR of a proxy would be of the form 
http://<host>:<port>/soap/<proxyname>.. I do not think I understand your 
question properly.. but hopefully this and the fact that I mentioned 
about the port 8080 being already in use by JBoss would help you figure 
things out.

asankha

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


Re: "Regarding Namespace Problem with an application"

Posted by "Asankha C. Perera" <as...@wso2.com>.
Renjith

I think Ruwan will answer your questions.. but if you are really new to 
Synapse and find it difficult to write the configuration manually or 
understand the concepts, you could try the WSO2 ESB which basically adds 
an enhanced registry and a graphical UI to Synapse. It is Synapse that 
does everything else, and the configurations are compatible.
> I tried to set up a proxy service as a first step. These are steps I
> followed.
>
> 1) I started my service using JBOSS-Tomcat Server and it is working on the
> port "8080". The wsdl is visible using
> "http://localhost:8008/axis2/services/SAMPLEAPISvc?wsdl"
>   
Now, Synapse by default tries to run on port 8080, and if its 
unavailable, would pick 8081! (the exact port would be printed on the 
console at startup)
> 2) Then I made changes to synapse_sample_100.xml file as below:
>
> <definitions xmlns="http://ws.apache.org/ns/synapse">
>     <proxy name="SAMPLEAPISvc">
>         <target>
>             <endpoint>
>                 <address uri="http://localhost:8008/axis2/services/SAMPLEAPISvc"/>
>             </endpoint>
>                   <outSequence>
>                         <send/>
>                   </outSequence>
>         </target>
>         <publishWSDL uri="file:repository/conf/sample/resources/proxy/SAMPLEAPISvc.wsdl"/>
>     </proxy>
> </definitions>
>
> 3) Then I tried starting Synapse using the command synapse.bat -sample 100
>
> 4) This is giving me an error in Synapse console as below:
>
> C:\synapse-1.0\bin>synapse.bat -sample 100
> [main] INFO  SynapseModule - Deploying Proxy services...
> java.lang.NoSuchMethodError: java.net.URLConnection.setReadTimeout(I)V
>
> Could you please guide me in solving this basic issue? I'm sure that I did
> something terribly wrong.
>   
Seems like you found a place in the code thats not JDK 1.4 compatible, 
and you are using a JDK 1.4. Could you please file a JIRA for this, so 
that we could fix this ASAP for the upcoming 1.0.1 release? Ideally we 
should not try to set a read timeout if the JDK does not support it. In 
the meantime, if you could switch to a JDK 1.5 it would be better - and 
faster too.
> Note: One Important question I should ask about proxy service is that, in my
> case I cannot make change in code or the way it generated. Only thing I can
> change is the uri to access the Service. Right now the URI that is accessing
> by client is set to 
>
> http://localhost: <http://localhost:8008/axis2/services/SAMPLEAPISvc>
> 8008/axis2/services/SAMPLEAPISvc , where 8008 is the port that is using by
> Synpase. Is this the right way to make Synapse a mediator for service that
> is been running in port 8080? Because in my case I cannot use
> -Daddurl=<addressingEPR> -Dtrpurl=<synapse> for the client because the
> client is a windows program and I have no way to control it. 
>   
The EPR of a proxy would be of the form 
http://<host>:<port>/soap/<proxyname>.. I do not think I understand your 
question properly.. but hopefully this and the fact that I mentioned 
about the port 8080 being already in use by JBoss would help you figure 
things out.

asankha

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org