You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by "Sabareeswar P. B." <Sa...@infosys.com> on 2009/10/28 05:49:19 UTC

Adding a security token

Hi,
 I am new to frameworks like WS-policy and WS-Security.

I am using synapse as a SOAP intermediary and I want to introduce a username token in the soap message which comes out of synapse.
The token must look like

            xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
      <oas:Security>
         <oas:UsernameToken>
            <oas:Username>admin</oas:Username>
            <oas:Password>admin123</oas:Password>
         </oas:UsernameToken>
      </oas:Security>

Could you please tell me how I must proceed with synapse?

Regards,
Sabareeswar
+91 80 668 82267


Re: publishing an RPC-encoded WSDL in Synapse

Posted by Ruwan Linton <ru...@gmail.com>.
Nice to hear that you got it to work!

Thanks,
Ruwan

On Tue, Dec 15, 2009 at 10:16 AM, Sabareeswar P. B. <
Sabareeswar_PB@infosys.com> wrote:

> Thanks a lot Ruwan! it worked.
>
> Regards,
> Sabareeswar
> -----Original Message-----
> From: Ruwan Linton [mailto:ruwan.linton@gmail.com]
> Sent: Monday, December 14, 2009 6:49 PM
> To: user@synapse.apache.org
> Subject: Re: publishing an RPC-encoded WSDL in Synapse
>
> It has to be on the proxy level and please note the spelling of the
> parameter name;
>
> <proxy name="Workflow">
>
>       <target>
>
>           <inSequence>
>
>               <send>
>
>                   <endpoint>
>
>                       <address uri="http://localhost:8080/workflow"/>
>
>                   </endpoint>
>
>               </send>
>
>           </inSequence>
>
>         <outSequence>
>
>               <send/>
>
>         </outSequence>
>
>       </target>
>
>       <publishWSDL
> uri="file:repository/conf/sample/resources/proxy/rpc.wsdl"/>
>
>       <parameter name="useOriginalwsdl">true</parameter>
>
>   </proxy>
>
> Thanks,
> Ruwan
>
>
> On Mon, Dec 14, 2009 at 6:30 PM, Sabareeswar P. B. <
> Sabareeswar_PB@infosys.com> wrote:
>
> > Thanks for replying Ruwan!
> >
> >
> >
> > I tried this out but still not getting the rpc wsdl as it is.
> >
> >
> >
> > I tried it with both
> >
> >      <parameter name="useOriginalWSDL" value="true"/>
> >
> > And
> >
> >      <parameter name="useOriginalWSDL">true</parameter>
> >
> >
> >
> > under publishWSDL as..
> >
> >
> >
> > <definitions xmlns="http://ws.apache.org/ns/synapse">
> >
> >   <proxy name="Workflow">
> >
> >        <target>
> >
> >            <inSequence>
> >
> >                <send>
> >
> >                    <endpoint>
> >
> >                        <address uri="http://localhost:8080/workflow"/>
> >
> >                    </endpoint>
> >
> >                </send>
> >
> >            </inSequence>
> >
> >          <outSequence>
> >
> >                <send/>
> >
> >          </outSequence>
> >
> >        </target>
> >
> >        <publishWSDL
> > uri="file:repository/conf/sample/resources/proxy/rpc.wsdl">
> >
> >            <parameter name="useOriginalWSDL">true</parameter>
> >
> >        </publishWSDL>
> >
> >    </proxy>
> >
> > </definitions>
> >
> >
> >
> > Regards,
> >
> > Sabareeswar
> >
> > +91 80 668 82267
> >
> > -----Original Message-----
> > From: Ruwan Linton [mailto:ruwan.linton@gmail.com]
> > Sent: Friday, December 11, 2009 9:21 PM
> > To: user@synapse.apache.org
> > Subject: Re: publishing an RPC-encoded WSDL in Synapse
> >
> >
> >
> > Please use the parameter useOriginalWSDL as a parameter while creating
> the
> >
> > proxy.
> >
> >
> >
> > <parameter name="useOriginalWSDL" value="true"/>
> >
> >
> >
> > Thanks,
> >
> > Ruwan
> >
> >
> >
> > On Wed, Dec 9, 2009 at 2:31 PM, Sabareeswar P. B. <
> >
> > Sabareeswar_PB@infosys.com> wrote:
> >
> >
> >
> > > Hi,
> >
> > >
> >
> > > My requirement is to use Synapse and a soap intermediary between a web
> >
> > > service which exposes a document-literal WSDL and a web service client
> > which
> >
> > > has been generated out of an rpc-encoded WSDL.
> >
> > >
> >
> > > So I had planned to use the publishWSDL feature in Synapse to expose
> the
> >
> > > rpc-encoded WSDL to the client and internally forward the soap message
> to
> >
> > > the document-literal web service (after necessary transformations).
> >
> > >
> >
> > > The issue is that even if I point publishWSDL to an rpc-encoded WSDL,
> the
> >
> > > resulting wsdl from synapse is document-literal.
> >
> > >
> >
> > > Could someone please suggest me how to expose the rpc-encoded wsdl as
> it
> >
> > > is?
> >
> > >
> >
> > > Regards,
> >
> > > Sabareeswar
> >
> > >
> >
> >
> >
> >
> >
> >
> >
> > --
> >
> > Ruwan Linton
> >
> > Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> >
> > WSO2 Inc.; http://wso2.org
> >
> > email: ruwan@wso2.com; cell: +94 77 341 3097
> >
> > blog: http://ruwansblog.blogspot.com
> >
>
>
>
> --
> Ruwan Linton
> Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> WSO2 <http://wso2.org/esb%0AWSO2> Inc.; http://wso2.org
> email: ruwan@wso2.com; cell: +94 77 341 3097
> blog: http://ruwansblog.blogspot.com
>



-- 
Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com

RE: publishing an RPC-encoded WSDL in Synapse

Posted by "Sabareeswar P. B." <Sa...@infosys.com>.
Thanks a lot Ruwan! it worked.

Regards,
Sabareeswar
-----Original Message-----
From: Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Sent: Monday, December 14, 2009 6:49 PM
To: user@synapse.apache.org
Subject: Re: publishing an RPC-encoded WSDL in Synapse

It has to be on the proxy level and please note the spelling of the
parameter name;

<proxy name="Workflow">

       <target>

           <inSequence>

               <send>

                   <endpoint>

                       <address uri="http://localhost:8080/workflow"/>

                   </endpoint>

               </send>

           </inSequence>

         <outSequence>

               <send/>

         </outSequence>

       </target>

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

       <parameter name="useOriginalwsdl">true</parameter>

   </proxy>

Thanks,
Ruwan


On Mon, Dec 14, 2009 at 6:30 PM, Sabareeswar P. B. <
Sabareeswar_PB@infosys.com> wrote:

> Thanks for replying Ruwan!
>
>
>
> I tried this out but still not getting the rpc wsdl as it is.
>
>
>
> I tried it with both
>
>      <parameter name="useOriginalWSDL" value="true"/>
>
> And
>
>      <parameter name="useOriginalWSDL">true</parameter>
>
>
>
> under publishWSDL as..
>
>
>
> <definitions xmlns="http://ws.apache.org/ns/synapse">
>
>   <proxy name="Workflow">
>
>        <target>
>
>            <inSequence>
>
>                <send>
>
>                    <endpoint>
>
>                        <address uri="http://localhost:8080/workflow"/>
>
>                    </endpoint>
>
>                </send>
>
>            </inSequence>
>
>          <outSequence>
>
>                <send/>
>
>          </outSequence>
>
>        </target>
>
>        <publishWSDL
> uri="file:repository/conf/sample/resources/proxy/rpc.wsdl">
>
>            <parameter name="useOriginalWSDL">true</parameter>
>
>        </publishWSDL>
>
>    </proxy>
>
> </definitions>
>
>
>
> Regards,
>
> Sabareeswar
>
> +91 80 668 82267
>
> -----Original Message-----
> From: Ruwan Linton [mailto:ruwan.linton@gmail.com]
> Sent: Friday, December 11, 2009 9:21 PM
> To: user@synapse.apache.org
> Subject: Re: publishing an RPC-encoded WSDL in Synapse
>
>
>
> Please use the parameter useOriginalWSDL as a parameter while creating the
>
> proxy.
>
>
>
> <parameter name="useOriginalWSDL" value="true"/>
>
>
>
> Thanks,
>
> Ruwan
>
>
>
> On Wed, Dec 9, 2009 at 2:31 PM, Sabareeswar P. B. <
>
> Sabareeswar_PB@infosys.com> wrote:
>
>
>
> > Hi,
>
> >
>
> > My requirement is to use Synapse and a soap intermediary between a web
>
> > service which exposes a document-literal WSDL and a web service client
> which
>
> > has been generated out of an rpc-encoded WSDL.
>
> >
>
> > So I had planned to use the publishWSDL feature in Synapse to expose the
>
> > rpc-encoded WSDL to the client and internally forward the soap message to
>
> > the document-literal web service (after necessary transformations).
>
> >
>
> > The issue is that even if I point publishWSDL to an rpc-encoded WSDL, the
>
> > resulting wsdl from synapse is document-literal.
>
> >
>
> > Could someone please suggest me how to expose the rpc-encoded wsdl as it
>
> > is?
>
> >
>
> > Regards,
>
> > Sabareeswar
>
> >
>
>
>
>
>
>
>
> --
>
> Ruwan Linton
>
> Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
>
> WSO2 Inc.; http://wso2.org
>
> email: ruwan@wso2.com; cell: +94 77 341 3097
>
> blog: http://ruwansblog.blogspot.com
>



-- 
Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com

Re: publishing an RPC-encoded WSDL in Synapse

Posted by Ruwan Linton <ru...@gmail.com>.
It has to be on the proxy level and please note the spelling of the
parameter name;

<proxy name="Workflow">

       <target>

           <inSequence>

               <send>

                   <endpoint>

                       <address uri="http://localhost:8080/workflow"/>

                   </endpoint>

               </send>

           </inSequence>

         <outSequence>

               <send/>

         </outSequence>

       </target>

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

       <parameter name="useOriginalwsdl">true</parameter>

   </proxy>

Thanks,
Ruwan


On Mon, Dec 14, 2009 at 6:30 PM, Sabareeswar P. B. <
Sabareeswar_PB@infosys.com> wrote:

> Thanks for replying Ruwan!
>
>
>
> I tried this out but still not getting the rpc wsdl as it is.
>
>
>
> I tried it with both
>
>      <parameter name="useOriginalWSDL" value="true"/>
>
> And
>
>      <parameter name="useOriginalWSDL">true</parameter>
>
>
>
> under publishWSDL as..
>
>
>
> <definitions xmlns="http://ws.apache.org/ns/synapse">
>
>   <proxy name="Workflow">
>
>        <target>
>
>            <inSequence>
>
>                <send>
>
>                    <endpoint>
>
>                        <address uri="http://localhost:8080/workflow"/>
>
>                    </endpoint>
>
>                </send>
>
>            </inSequence>
>
>          <outSequence>
>
>                <send/>
>
>          </outSequence>
>
>        </target>
>
>        <publishWSDL
> uri="file:repository/conf/sample/resources/proxy/rpc.wsdl">
>
>            <parameter name="useOriginalWSDL">true</parameter>
>
>        </publishWSDL>
>
>    </proxy>
>
> </definitions>
>
>
>
> Regards,
>
> Sabareeswar
>
> +91 80 668 82267
>
> -----Original Message-----
> From: Ruwan Linton [mailto:ruwan.linton@gmail.com]
> Sent: Friday, December 11, 2009 9:21 PM
> To: user@synapse.apache.org
> Subject: Re: publishing an RPC-encoded WSDL in Synapse
>
>
>
> Please use the parameter useOriginalWSDL as a parameter while creating the
>
> proxy.
>
>
>
> <parameter name="useOriginalWSDL" value="true"/>
>
>
>
> Thanks,
>
> Ruwan
>
>
>
> On Wed, Dec 9, 2009 at 2:31 PM, Sabareeswar P. B. <
>
> Sabareeswar_PB@infosys.com> wrote:
>
>
>
> > Hi,
>
> >
>
> > My requirement is to use Synapse and a soap intermediary between a web
>
> > service which exposes a document-literal WSDL and a web service client
> which
>
> > has been generated out of an rpc-encoded WSDL.
>
> >
>
> > So I had planned to use the publishWSDL feature in Synapse to expose the
>
> > rpc-encoded WSDL to the client and internally forward the soap message to
>
> > the document-literal web service (after necessary transformations).
>
> >
>
> > The issue is that even if I point publishWSDL to an rpc-encoded WSDL, the
>
> > resulting wsdl from synapse is document-literal.
>
> >
>
> > Could someone please suggest me how to expose the rpc-encoded wsdl as it
>
> > is?
>
> >
>
> > Regards,
>
> > Sabareeswar
>
> >
>
>
>
>
>
>
>
> --
>
> Ruwan Linton
>
> Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
>
> WSO2 Inc.; http://wso2.org
>
> email: ruwan@wso2.com; cell: +94 77 341 3097
>
> blog: http://ruwansblog.blogspot.com
>



-- 
Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com

RE: publishing an RPC-encoded WSDL in Synapse

Posted by "Sabareeswar P. B." <Sa...@infosys.com>.
Thanks for replying Ruwan!



I tried this out but still not getting the rpc wsdl as it is.



I tried it with both

      <parameter name="useOriginalWSDL" value="true"/>

And

      <parameter name="useOriginalWSDL">true</parameter>



under publishWSDL as..



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

   <proxy name="Workflow">

        <target>

            <inSequence>

                <send>

                    <endpoint>

                        <address uri="http://localhost:8080/workflow"/>

                    </endpoint>

                </send>

            </inSequence>

          <outSequence>

                <send/>

          </outSequence>

        </target>

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

            <parameter name="useOriginalWSDL">true</parameter>

        </publishWSDL>

    </proxy>

</definitions>



Regards,

Sabareeswar

+91 80 668 82267

-----Original Message-----
From: Ruwan Linton [mailto:ruwan.linton@gmail.com]
Sent: Friday, December 11, 2009 9:21 PM
To: user@synapse.apache.org
Subject: Re: publishing an RPC-encoded WSDL in Synapse



Please use the parameter useOriginalWSDL as a parameter while creating the

proxy.



<parameter name="useOriginalWSDL" value="true"/>



Thanks,

Ruwan



On Wed, Dec 9, 2009 at 2:31 PM, Sabareeswar P. B. <

Sabareeswar_PB@infosys.com> wrote:



> Hi,

>

> My requirement is to use Synapse and a soap intermediary between a web

> service which exposes a document-literal WSDL and a web service client which

> has been generated out of an rpc-encoded WSDL.

>

> So I had planned to use the publishWSDL feature in Synapse to expose the

> rpc-encoded WSDL to the client and internally forward the soap message to

> the document-literal web service (after necessary transformations).

>

> The issue is that even if I point publishWSDL to an rpc-encoded WSDL, the

> resulting wsdl from synapse is document-literal.

>

> Could someone please suggest me how to expose the rpc-encoded wsdl as it

> is?

>

> Regards,

> Sabareeswar

>







--

Ruwan Linton

Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb

WSO2 Inc.; http://wso2.org

email: ruwan@wso2.com; cell: +94 77 341 3097

blog: http://ruwansblog.blogspot.com

Re: publishing an RPC-encoded WSDL in Synapse

Posted by Ruwan Linton <ru...@gmail.com>.
Please use the parameter useOriginalWSDL as a parameter while creating the
proxy.

<parameter name="useOriginalWSDL" value="true"/>

Thanks,
Ruwan

On Wed, Dec 9, 2009 at 2:31 PM, Sabareeswar P. B. <
Sabareeswar_PB@infosys.com> wrote:

> Hi,
>
> My requirement is to use Synapse and a soap intermediary between a web
> service which exposes a document-literal WSDL and a web service client which
> has been generated out of an rpc-encoded WSDL.
>
> So I had planned to use the publishWSDL feature in Synapse to expose the
> rpc-encoded WSDL to the client and internally forward the soap message to
> the document-literal web service (after necessary transformations).
>
> The issue is that even if I point publishWSDL to an rpc-encoded WSDL, the
> resulting wsdl from synapse is document-literal.
>
> Could someone please suggest me how to expose the rpc-encoded wsdl as it
> is?
>
> Regards,
> Sabareeswar
>



-- 
Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com

publishing an RPC-encoded WSDL in Synapse

Posted by "Sabareeswar P. B." <Sa...@infosys.com>.
Hi,

My requirement is to use Synapse and a soap intermediary between a web service which exposes a document-literal WSDL and a web service client which has been generated out of an rpc-encoded WSDL.

So I had planned to use the publishWSDL feature in Synapse to expose the rpc-encoded WSDL to the client and internally forward the soap message to the document-literal web service (after necessary transformations).

The issue is that even if I point publishWSDL to an rpc-encoded WSDL, the resulting wsdl from synapse is document-literal.

Could someone please suggest me how to expose the rpc-encoded wsdl as it is?

Regards,
Sabareeswar

RE: Adding a security token

Posted by "Sabareeswar P. B." <Sa...@infosys.com>.
Thanks Asankha! Will refer the Rampart site.

Regards,
Sabareeswar
-----Original Message-----
From: Asankha Perera [mailto:asankha.apache@gmail.com] On Behalf Of Asankha C. Perera
Sent: Wednesday, October 28, 2009 6:13 PM
To: user@synapse.apache.org
Subject: Re: Adding a security token

Hi Sabareeswar
> I am new to frameworks like WS-policy and WS-Security.
>
> I am using synapse as a SOAP intermediary and I want to introduce a username token in the soap message which comes out of synapse.
> The token must look like
>
>             xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
>       <oas:Security>
>          <oas:UsernameToken>
>             <oas:Username>admin</oas:Username>
>             <oas:Password>admin123</oas:Password>
>          </oas:UsernameToken>
>       </oas:Security>
>
> Could you please tell me how I must proceed with synapse?
>   
Basically Synapse does not go into exactly which WS-Security policy you
enforce.. you just provide it with a policy that states what you want.
For outgoing messages, what you need is similar to
http://synapse.apache.org/Synapse_Samples.html#Sample100

You should have the sample policy used for the above as
repository/conf/sample/resources/policy/policy_3.xml in your
distribution. Synapse uses Apache Rampart to get this done, so it is
Rampart that will read the policy and apply it. You will have better
luck if you ask someone on the Apache Rampart mailing list or search
through the samples for the above case.. I am sorry I do not have much
free time right now to look for this myself, but if you really cannot
find anything from Rampart, ping me again next week

cheers
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





Re: Adding a security token

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Sabareeswar
> I am new to frameworks like WS-policy and WS-Security.
>
> I am using synapse as a SOAP intermediary and I want to introduce a username token in the soap message which comes out of synapse.
> The token must look like
>
>             xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
>       <oas:Security>
>          <oas:UsernameToken>
>             <oas:Username>admin</oas:Username>
>             <oas:Password>admin123</oas:Password>
>          </oas:UsernameToken>
>       </oas:Security>
>
> Could you please tell me how I must proceed with synapse?
>   
Basically Synapse does not go into exactly which WS-Security policy you
enforce.. you just provide it with a policy that states what you want.
For outgoing messages, what you need is similar to
http://synapse.apache.org/Synapse_Samples.html#Sample100

You should have the sample policy used for the above as
repository/conf/sample/resources/policy/policy_3.xml in your
distribution. Synapse uses Apache Rampart to get this done, so it is
Rampart that will read the policy and apply it. You will have better
luck if you ask someone on the Apache Rampart mailing list or search
through the samples for the above case.. I am sorry I do not have much
free time right now to look for this myself, but if you really cannot
find anything from Rampart, ping me again next week

cheers
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com