You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Nencho Lupanov <ne...@googlemail.com> on 2007/07/19 09:46:48 UTC

Configure Transports on a service level

Hi all,

I need a way to configure what transports to be enabled for a particular
service
annd not on a global level.Is there a way in axis2 to do that maybe through
some parameter
in services.xml or this is currently configured only globally in axis2.xml?

Thanks,

Nencho

Re: Configure Transports on a service level

Posted by Saminda Abeyruwan <sa...@gmail.com>.
HI,

In your service, services.xml, you could  have following  under <service/>
tag

<transports>
            <transport>https</transport>
             <transport>http</tranport>
            <transport>mailto</transport>
        </transports>

Thus, you can control, which listener should the service be exposed from.

Thank you

Saminda

On 7/19/07, Nencho Lupanov <ne...@googlemail.com> wrote:
>
> Hi all,
>
> I need a way to configure what transports to be enabled for a particular
> service
> annd not on a global level.Is there a way in axis2 to do that maybe
> through some parameter
> in services.xml or this is currently configured only globally in axis2.xml
> ?
>
> Thanks,
>
> Nencho
>



-- 
Saminda Abeyruwan

Software Engineer
WSO2 Inc. - www.wso2.org

RE: Configuring security in client code for mule (uses axis)

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Shivani,

I don't know Axis1. I've just warned you that Mule does not support
Axis2 (you mentioned it in your first post). 

Michele

On Thu, 2007-07-19 at 18:55 +0530, Shivani Sawhney wrote:
> Hi Michele,
> 
> Thanks for your response.
> 
> I understand that Mule supports Axis1 but am I doing something in my code
> that is not supported on Axis1? Don't know how that should affect my code.
> Can you please suggest...
> 
> Sincerely, 
> 
> Shivani Sawhney 
> 
> Phone: +91-120-4363300 x 2624
> 
> -----Original Message-----
> From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk] 
> Sent: Thursday, July 19, 2007 4:40 PM
> To: axis-user@ws.apache.org
> Subject: Re: Configuring security in client code for mule (uses axis)
> 
> Shivani,
> 
> to my knowledge Mule has an Axis1 connector only [1].
> 
> Michele
> 
> [1] http://mule.mulesource.org/jira/browse/MULE-566
> 
> On Thu, 2007-07-19 at 15:56 +0530, Shivani Sawhney wrote:
> > Hi All,
> > 
> >  
> > 
> > I understand that I should be posting this query on mule forums first
> > and have done so but have got no help so far. Would appreciate any
> > help from Axis users.
> > 
> >  
> > 
> > I have successfully deployed a web service with ws-security on Axis2,
> > but am unable to deploy the same web service on Mule (ESB), which uses
> > Axis internally.
> > 
> >  
> > 
> > The security has been enabled on server side and client request gets
> > an error message which says, "WSDoAllReceiver: Request does not
> > contain required Security header". Can someone please tell me how to
> > provide client-config.xml to the client or set properties through
> > WSHandlerConstants? 
> > 
> > Following is the code I am using but still the security error.
> > 
> >  
> > 
> >  
> > 
> > package mule.client;
> > 
> >  
> > 
> > import java.util.Properties;
> > 
> >  
> > 
> > import org.apache.ws.security.WSConstants;
> > 
> > import org.apache.ws.security.handler.WSHandlerConstants;
> > 
> > import org.mule.extras.client.MuleClient;
> > 
> > import org.mule.umo.UMOException;
> > 
> > import org.mule.umo.UMOMessage;
> > 
> >  
> > 
> > public class MuleSpecificClient
> > 
> > {
> > 
> >     public static void main(String[] args)
> > 
> >     {
> > 
> >         Properties props = new Properties();
> > 
> >  
> > 
> >         // Action to perform : Signature
> > 
> >         props.setProperty(WSHandlerConstants.ACTION,
> > WSHandlerConstants.SIGNATURE);
> > 
> >  
> > 
> >         // User name to send
> > 
> >         props.setProperty(WSHandlerConstants.USER, "clientkeystore");
> > 
> >  
> > 
> >         // Password type : text or digest
> > 
> >         props.setProperty(WSHandlerConstants.PASSWORD_TYPE,
> > WSConstants.PASSWORD_DIGEST);
> > 
> >  
> > 
> >         // Callback used to retrive password for given user.
> > 
> >         props.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
> > "mule.util.PWCallback");
> > 
> >         //
> > 
> >         // // Configuration for accessing private key in keystore
> > 
> >         props.setProperty(WSHandlerConstants.SIG_PROP_FILE,
> > "out-signed-security.properties");
> > 
> >         //
> > 
> >         // // Set signature method to DirectReference
> > 
> >         props.setProperty(WSHandlerConstants.SIG_KEY_ID,
> > "DirectReference");
> > 
> >         //
> > 
> >         //
> > 
> >         //
> > 
> >         //
> > 
> >         UMOMessage result = null;
> > 
> >         try
> > 
> >         {
> > 
> >             //
> > 
> >             MuleClient client = new MuleClient();
> > 
> >             //
> > 
> >             //
> > 
> >             result =
> >
> client.send("axis:http://localhost:8081/services/myWebService?method=echo",
> "Inputgot", props);
> > 
> >             //
> > 
> >             System.out.println("Message Echoed is: " +
> > result.getPayload().toString());
> > 
> >             //
> > 
> >             //
> > 
> >         } catch (UMOException e)
> > 
> >         {
> > 
> >             System.out.println(e.getDetailedMessage());
> > 
> >             e.printStackTrace();
> > 
> >         }
> > 
> >  
> > 
> >     }
> > 
> > }
> > 
> >  
> > 
> > Sincerely, 
> > 
> > Shivani Sawhney 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


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


RE: Configuring security in client code for mule (uses axis)

Posted by Shivani Sawhney <sh...@impetus.co.in>.
Hi Michele,

Thanks for your response.

I understand that Mule supports Axis1 but am I doing something in my code
that is not supported on Axis1? Don't know how that should affect my code.
Can you please suggest...

Sincerely, 

Shivani Sawhney 

Phone: +91-120-4363300 x 2624

-----Original Message-----
From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk] 
Sent: Thursday, July 19, 2007 4:40 PM
To: axis-user@ws.apache.org
Subject: Re: Configuring security in client code for mule (uses axis)

Shivani,

to my knowledge Mule has an Axis1 connector only [1].

Michele

[1] http://mule.mulesource.org/jira/browse/MULE-566

On Thu, 2007-07-19 at 15:56 +0530, Shivani Sawhney wrote:
> Hi All,
> 
>  
> 
> I understand that I should be posting this query on mule forums first
> and have done so but have got no help so far. Would appreciate any
> help from Axis users.
> 
>  
> 
> I have successfully deployed a web service with ws-security on Axis2,
> but am unable to deploy the same web service on Mule (ESB), which uses
> Axis internally.
> 
>  
> 
> The security has been enabled on server side and client request gets
> an error message which says, "WSDoAllReceiver: Request does not
> contain required Security header". Can someone please tell me how to
> provide client-config.xml to the client or set properties through
> WSHandlerConstants? 
> 
> Following is the code I am using but still the security error.
> 
>  
> 
>  
> 
> package mule.client;
> 
>  
> 
> import java.util.Properties;
> 
>  
> 
> import org.apache.ws.security.WSConstants;
> 
> import org.apache.ws.security.handler.WSHandlerConstants;
> 
> import org.mule.extras.client.MuleClient;
> 
> import org.mule.umo.UMOException;
> 
> import org.mule.umo.UMOMessage;
> 
>  
> 
> public class MuleSpecificClient
> 
> {
> 
>     public static void main(String[] args)
> 
>     {
> 
>         Properties props = new Properties();
> 
>  
> 
>         // Action to perform : Signature
> 
>         props.setProperty(WSHandlerConstants.ACTION,
> WSHandlerConstants.SIGNATURE);
> 
>  
> 
>         // User name to send
> 
>         props.setProperty(WSHandlerConstants.USER, "clientkeystore");
> 
>  
> 
>         // Password type : text or digest
> 
>         props.setProperty(WSHandlerConstants.PASSWORD_TYPE,
> WSConstants.PASSWORD_DIGEST);
> 
>  
> 
>         // Callback used to retrive password for given user.
> 
>         props.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
> "mule.util.PWCallback");
> 
>         //
> 
>         // // Configuration for accessing private key in keystore
> 
>         props.setProperty(WSHandlerConstants.SIG_PROP_FILE,
> "out-signed-security.properties");
> 
>         //
> 
>         // // Set signature method to DirectReference
> 
>         props.setProperty(WSHandlerConstants.SIG_KEY_ID,
> "DirectReference");
> 
>         //
> 
>         //
> 
>         //
> 
>         //
> 
>         UMOMessage result = null;
> 
>         try
> 
>         {
> 
>             //
> 
>             MuleClient client = new MuleClient();
> 
>             //
> 
>             //
> 
>             result =
>
client.send("axis:http://localhost:8081/services/myWebService?method=echo",
"Inputgot", props);
> 
>             //
> 
>             System.out.println("Message Echoed is: " +
> result.getPayload().toString());
> 
>             //
> 
>             //
> 
>         } catch (UMOException e)
> 
>         {
> 
>             System.out.println(e.getDetailedMessage());
> 
>             e.printStackTrace();
> 
>         }
> 
>  
> 
>     }
> 
> }
> 
>  
> 
> Sincerely, 
> 
> Shivani Sawhney 
> 
> 


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



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


Re: Configuring security in client code for mule (uses axis)

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Shivani,

to my knowledge Mule has an Axis1 connector only [1].

Michele

[1] http://mule.mulesource.org/jira/browse/MULE-566

On Thu, 2007-07-19 at 15:56 +0530, Shivani Sawhney wrote:
> Hi All,
> 
>  
> 
> I understand that I should be posting this query on mule forums first
> and have done so but have got no help so far. Would appreciate any
> help from Axis users.
> 
>  
> 
> I have successfully deployed a web service with ws-security on Axis2,
> but am unable to deploy the same web service on Mule (ESB), which uses
> Axis internally.
> 
>  
> 
> The security has been enabled on server side and client request gets
> an error message which says, "WSDoAllReceiver: Request does not
> contain required Security header". Can someone please tell me how to
> provide client-config.xml to the client or set properties through
> WSHandlerConstants? 
> 
> Following is the code I am using but still the security error.
> 
>  
> 
>  
> 
> package mule.client;
> 
>  
> 
> import java.util.Properties;
> 
>  
> 
> import org.apache.ws.security.WSConstants;
> 
> import org.apache.ws.security.handler.WSHandlerConstants;
> 
> import org.mule.extras.client.MuleClient;
> 
> import org.mule.umo.UMOException;
> 
> import org.mule.umo.UMOMessage;
> 
>  
> 
> public class MuleSpecificClient
> 
> {
> 
>     public static void main(String[] args)
> 
>     {
> 
>         Properties props = new Properties();
> 
>  
> 
>         // Action to perform : Signature
> 
>         props.setProperty(WSHandlerConstants.ACTION,
> WSHandlerConstants.SIGNATURE);
> 
>  
> 
>         // User name to send
> 
>         props.setProperty(WSHandlerConstants.USER, "clientkeystore");
> 
>  
> 
>         // Password type : text or digest
> 
>         props.setProperty(WSHandlerConstants.PASSWORD_TYPE,
> WSConstants.PASSWORD_DIGEST);
> 
>  
> 
>         // Callback used to retrive password for given user.
> 
>         props.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
> "mule.util.PWCallback");
> 
>         //
> 
>         // // Configuration for accessing private key in keystore
> 
>         props.setProperty(WSHandlerConstants.SIG_PROP_FILE,
> "out-signed-security.properties");
> 
>         //
> 
>         // // Set signature method to DirectReference
> 
>         props.setProperty(WSHandlerConstants.SIG_KEY_ID,
> "DirectReference");
> 
>         //
> 
>         //
> 
>         //
> 
>         //
> 
>         UMOMessage result = null;
> 
>         try
> 
>         {
> 
>             //
> 
>             MuleClient client = new MuleClient();
> 
>             //
> 
>             //
> 
>             result =
> client.send("axis:http://localhost:8081/services/myWebService?method=echo", "Inputgot", props);
> 
>             //
> 
>             System.out.println("Message Echoed is: " +
> result.getPayload().toString());
> 
>             //
> 
>             //
> 
>         } catch (UMOException e)
> 
>         {
> 
>             System.out.println(e.getDetailedMessage());
> 
>             e.printStackTrace();
> 
>         }
> 
>  
> 
>     }
> 
> }
> 
>  
> 
> Sincerely, 
> 
> Shivani Sawhney 
> 
> 


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


Configuring security in client code for mule (uses axis)

Posted by Shivani Sawhney <sh...@impetus.co.in>.
Hi All,

 

I understand that I should be posting this query on mule forums first and
have done so but have got no help so far. Would appreciate any help from
Axis users.

 

I have successfully deployed a web service with ws-security on Axis2, but am
unable to deploy the same web service on Mule (ESB), which uses Axis
internally.

 

The security has been enabled on server side and client request gets an
error message which says, "WSDoAllReceiver: Request does not contain
required Security header". Can someone please tell me how to provide
client-config.xml to the client or set properties through
WSHandlerConstants? 

Following is the code I am using but still the security error.

 

 

package mule.client;

 

import java.util.Properties;

 

import org.apache.ws.security.WSConstants;

import org.apache.ws.security.handler.WSHandlerConstants;

import org.mule.extras.client.MuleClient;

import org.mule.umo.UMOException;

import org.mule.umo.UMOMessage;

 

public class MuleSpecificClient

{

    public static void main(String[] args)

    {

        Properties props = new Properties();

 

        // Action to perform : Signature

        props.setProperty(WSHandlerConstants.ACTION,
WSHandlerConstants.SIGNATURE);

 

        // User name to send

        props.setProperty(WSHandlerConstants.USER, "clientkeystore");

 

        // Password type : text or digest

        props.setProperty(WSHandlerConstants.PASSWORD_TYPE,
WSConstants.PASSWORD_DIGEST);

 

        // Callback used to retrive password for given user.

        props.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
"mule.util.PWCallback");

        //

        // // Configuration for accessing private key in keystore

        props.setProperty(WSHandlerConstants.SIG_PROP_FILE,
"out-signed-security.properties");

        //

        // // Set signature method to DirectReference

        props.setProperty(WSHandlerConstants.SIG_KEY_ID, "DirectReference");

        //

        //

        //

        //

        UMOMessage result = null;

        try

        {

            //

            MuleClient client = new MuleClient();

            //

            //

            result =
client.send("axis:http://localhost:8081/services/myWebService?method=echo",
"Inputgot", props);

            //

            System.out.println("Message Echoed is: " +
result.getPayload().toString());

            //

            //

        } catch (UMOException e)

        {

            System.out.println(e.getDetailedMessage());

            e.printStackTrace();

        }

 

    }

}

 

Sincerely, 

Shivani Sawhney 


Re: Configure Transports on a service level

Posted by Anthony Bull <an...@bcsoft.co.nz>.
Hi Nencho,

you can configure your transports in the services.xml file. I've been 
using the following service from the Axis2 examples to test running a 
service over JMS transports.  I also had to turn on the jms sender and 
receiver transport settings in the axis2.xml file.

<service name="EchoXMLService">
    <description>
        This is a sample Web Service for JMS tests.
    </description>
    <parameter name="ServiceClass" 
locked="false">org.apache.axis2.jms.Echo</parameter>
    <operation name="echoOMElementNoResponse">
        <messageReceiver 
class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
        <actionMapping>urn:echoOMElementNoResponse</actionMapping>
    </operation>
    <operation name="echoOMElement">
        <messageReceiver 
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
        <actionMapping>urn:echoOMElement</actionMapping>
    </operation>

    <transports>
      <transport>jms</transport>
    </transports>
    <parameter name="transport.jms.ConnectionFactory" 
locked="true">myQueueConnectionFactory</parameter>
    <parameter name="transport.jms.Destination" 
locked="true">dynamicQueues/TestQueue</parameter>
</service>


Nencho Lupanov wrote:
> Hi all,
>  
> I need a way to configure what transports to be enabled for a 
> particular service
> annd not on a global level.Is there a way in axis2 to do that maybe 
> through some parameter
> in services.xml or this is currently configured only globally in 
> axis2.xml?
>  
> Thanks,
>  
> Nencho


-- 
Anthony
-------------------------------------
Anthony Bull
Senior Developer
Black Coffee Software Ltd
PO Box 10-192 The Terrace
Wellington, New Zealand

anthony.bull@bcsoft.co.nz
Ph  +64 4 472 8818
Fax +64 4 472 8811
Mobile 021 303 692
-------------------------------------
www.bcsoft.co.nz
---------------------------------------------------------------
This email may contain confidential or privileged information,
and is intended for use only by the addressee, or addressees.
If you are not the intended recipient please advise the sender
immediately and do not copy, use or disclose the contents to
any other person or organisation.
Black Coffee Software Ltd accepts no responsibility for viruses
received with this email, or to any changes made to the original
content. Any views or opinions expressed in this email may be
personal to the sender and are not necessarily those of Black
Coffee Software Ltd.
---------------------------------------------------------------



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