Re: [Dev] [GSOC 2017][API Manager][Environment Support]

2017-07-26 Thread Pubudu Gunatilaka
Hi,

Will merge the PR.

@Ravindu: In the first window, when there are multiple environments, please
select one of the environments as the default rather than asking the user
to select an environment.

Thank you!

On Thu, Jul 27, 2017 at 8:09 AM, Prasanna Dangalla 
wrote:

> Hi Ravindu,
>
> I have approved the PR. Now Pubudu can proceed and merge it.
>
> Regards
> *Prasanna Dangalla*
> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
> lean.enterprise.middleware
>
>
> *cell: +94 718 11 27 51*
> *twitter: @prasa77*
>
> On Thu, Jul 27, 2017 at 12:53 AM, Ravindu Perera <
> ravindu.2014...@iit.ac.lk> wrote:
>
>> Hi
>> This mail is regarding the pull request , i have done the changes which
>> was mentioned yesterday and please approve it .
>>
>> Thank you .
>> Ravindu Perera
>>
>
>


-- 
*Pubudu Gunatilaka*
Committer and PMC Member - Apache Stratos
Software Engineer
WSO2, Inc.: http://wso2.com
mobile : +94774078049 <%2B94772207163>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issues in the Admin API WSDL Files

2017-07-26 Thread Sagar Kapadia
Thanks,  what I meant was without using UserAdminStub or other already
provided classes.
What I was asking was is it necessary to generate the stubs, or are they
already available? You answered that question. If the stubs provided cover
all the
services, there is no need to generate the stubs , right?
Sagar



On Wed, Jul 26, 2017 at 11:53 PM, KasunG Gajasinghe  wrote:

>
> wsimport is used to generate the JAX-WS service clients.
>
> But the generated client stubs are already available for all the admin
> services of WSO2. I suggest you use them. These work over Axis2 SOAP engine.
>
> On Wed, Jul 26, 2017 at 11:49 PM, KasunG Gajasinghe 
> wrote:
>
>>
>> If you are trying to invoke via Java, then you can check the existing
>> usage of UserAdminStub class here [1].
>>
>> These admin services are already used by the mgt console UI to invoke the
>> back-end services. A trick I used to capture the soap envelope is the
>> following. This does not work all the time. You can throw the dice and see.
>>
>> 1. Go to repository/components/plugins folder
>> 2. Unzip the relevant jar bundle that that contain the service. UserAdmin
>> service is in org.wso2.carbon.user.mgt_5.7.5.jar.
>> 3. In there, open META-INF/services.xml file in there, and remove the
>> following two lines
>>
>> true
>> true
>>
>> 4. Zip it back, and restart the server.
>>
>> 5. Now go to, *Monitor* -> *Soap Tracer*, and enable it.
>> 6. Do a user mgt UI operation and check the Soap Tracer.
>>
>> As I said, throw the dice and see. It may not work for you.
>>
>> [1] https://github.com/search?q=org%3Awso2+UserAdminStub=Code
>>
>> On Wed, Jul 26, 2017 at 11:11 PM, Sagar Kapadia 
>> wrote:
>>
>>> Hi
>>> I have another question. Is there a need to generate stubs for services,
>>> given that stubs for  services are present? I could not find a way to pass
>>> the token to generated web service stubs. However, I figured out how to use
>>> the stubs themselves
>>>
>>>   UserAdminStub s=new UserAdminStub();
>>> ServiceClient serviceClient =s._getServiceClient();
>>>
>>> option = serviceClient.getOptions();
>>> option.setManageSession(true);
>>> option.setProperty(
>>> org.apache.axis2.transport.htt
>>> p.HTTPConstants.COOKIE_STRING,
>>> token);
>>>
>>> FlaggedName[] names=s.listAllUsers("*", 100);
>>>for(FlaggedName name:names){
>>>
>>>
>>>System.out.println(name.getItemDisplayName());
>>>}
>>>
>>> Is there a way to do this with generated code? or do the provided stubs
>>> cover all services?
>>> Also, I have not managed to login using the authenticate method with
>>> either localhost or actual ip and credentials admin/admin. I used soapui to
>>> login and obtain the session token, which I passed to the above web
>>> service, which worked. Please let me know what mistake I am making in the
>>> login proocess.
>>>  System.setProperty("javax.net.ssl.trustStore",
>>> "C://wso2das-3.1.0/repository/resources/security/wso2carbon.jks");
>>> System.setProperty("javax.net.ssl.trustStorePassword",
>>> "wso2carbon");
>>> System.setProperty("javax.net.ssl.trustStoreType", "JKS");
>>>
>>>LoginAdminServiceClient c=new LoginAdminServiceClient(backEn
>>> dUrl);
>>>
>>>String token=c.authenticate("admin","ädmin");
>>>System.out.println("Token:"+token);
>>>
>>> Invoking an admin service
>>>
>>> Admin services are secured using common types of security protocols such
>>> as HTTP basic authentication, WS-Security username token, and session based
>>> authentication to prevent anonymous invocations. For example, the
>>> UserAdmin Web service is secured with the HTTP basic authentication. To
>>> invoke a service, you do the following:
>>>
>>>1. Authenticate yourself and get the session cookie.
>>>2. Generate the client stubs to access the back-end Web services.
>>>
>>> To generate the stubs, you can write your own client program using the
>>> Axis2 client API or use an existing tool like SoapUI
>>>  (4.5.1 or later) or wsdl2java.
>>>
>>> The wsdl2java tool, which comes with WSO2 products by default hides all
>>> the complexity and presents you with a proxy to the back-end service. The
>>> stub generation happens during the project build process within the Maven
>>> POM files. It uses the Maven ant run plug-in to execute the wsdl2java tool.
>>>
>>> You can also use the Java client program given here
>>> 
>>>  to
>>> invoke admin services. All dependency JAR files that you need to run this
>>> client are found in the /lib directory.
>>>
>>> On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia 
>>> wrote:
>>>
 Hi,

 I used this tutorial
 https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps

 I am facing the following issues in 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Harsha Thirimanna
On Thu, Jul 27, 2017 at 9:41 AM, KasunG Gajasinghe  wrote:

>
>
> On Wed, Jul 26, 2017 at 10:39 PM, Harsha Thirimanna 
> wrote:
>
>>
>> On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby 
>>> wrote:
>>>


 On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna 
 wrote:

> Hi All,
>
> I think we feel like both pros and cons because of these data file are
> located under the configurations. These are not actually config files and
> as Kasun said if these are under the config folder then anyone can feel to
> change and expect the changes in system after restarting. And same as 
> Johan
> said, we can explain in the documentation clearly about the behaviour.
>
> As an alternative solution, can't we have such files in some different
> root folder but not under the config or deployment ,because of these files
> are not either deployable artifact or configs. Then users will not
> misunderstand about these files and there can be its own behaviour as what
> we have now.
>

> *Harsha Thirimanna*
> *Associate Tech Lead | WSO2*
>
> Email: hars...@wso2.com
> Mob: +94715186770 <+94%2071%20518%206770>
> Blog: http://harshathirimanna.blogspot.com/
> Twitter: http://twitter.com/harshathirimann
> Linked-In: linked-in: http://www.linkedin.com/pub/ha
> rsha-thirimanna/10/ab8/122
> 
>
> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
> wrote:
>
>> Hi Johann,
>>
>>
>> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
>> wrote:
>>
>>> Hi,
>>>
>>> email-admin-config.xml has the default email templates that are used
>>> for Email notifications.
>>> Since we have a UI to add/update new Email templates I don't think
>>> the user has to go to the registry and do any modifications.
>>>
>>>
>>> Thanks,
>>> Farasath
>>>
>>> Farasath Ahamed
>>> Software Engineer, WSO2 Inc.; http://wso2.com
>>> Mobile: +94777603866
>>> Blog: blog.farazath.com
>>> Twitter: @farazath619 
>>> 
>>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby >> > wrote:
>>>
 Hi Kasun,

 I don't think we need to do this because,

 1. This is the model we follow for some other files as well.
 claim-config.xml
 identity-event.properties


>> Yes, I think Isura mentioned the same. Let me revise my original
>> query. The problem I was trying to address is:
>>
>> 1. There is a config file under repository/conf/ which is only read
>> during start-up. Since it is read once, should it really be in the
>> repository/conf/?
>>
>> 2. If a config file is there under repository/conf/, then users
>> expect any changes to it will be visible to users. It is not that 
>> intuitive
>> for a first time user IMO.
>>
>
>> As the product is quite matured, I think it may be better to look
>> into these aspects to make the first time user experience better.  Hence,
>> the request for $subject.
>>
>
 Agreed. We may be able to improve this.


>>> Cool.. :) My suggestion is to honor the changes to the file. So, if the
>>> file hash is changed, we re-upload the changes.
>>>
>>> MD5 hash can be stored in registry as a property along with the email
>>> templates. It is a simple change to [1] as I understand.
>>>
>>
>> ​But after some one change from the UI then it will update the changes in
>> registry. But it is not reflected in the file. Again if some one change in
>> the file, then registry will override the changes in registry that is
>> changed by the UI. Is this expected ?
>> ​
>>
>
> Yes, that happens. User need to stick to one. This is actually a problem
> we had in our platform for a while. Some of our configurations are
> duplicated in both file system and registry. This leads to much confusion
> for a first time user.
>

​Agree
​

>
> What's your suggestion?
>

​​I think, main reason is that we consider these data files as configs as i
explained above. ​

​My suggestion was to put these data files from out of config folder. We
can't treat these as configs. ​

And no need to push to the registry with every restart by checking the hash
and the current behaviour is correct then.

For the super tenant, it will push to the registry if there are no data in
registry for that resource path.
For the tenant, same thing when the tenant creation time.

WDYT ?



>
> Thanks.
>
>
>>
>>> [1] https://github.com/wso2-extensions/identity-event-handler-no
>>> 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread KasunG Gajasinghe
On Wed, Jul 26, 2017 at 10:39 PM, Harsha Thirimanna 
wrote:

>
> On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe 
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna 
>>> wrote:
>>>
 Hi All,

 I think we feel like both pros and cons because of these data file are
 located under the configurations. These are not actually config files and
 as Kasun said if these are under the config folder then anyone can feel to
 change and expect the changes in system after restarting. And same as Johan
 said, we can explain in the documentation clearly about the behaviour.

 As an alternative solution, can't we have such files in some different
 root folder but not under the config or deployment ,because of these files
 are not either deployable artifact or configs. Then users will not
 misunderstand about these files and there can be its own behaviour as what
 we have now.

>>>
 *Harsha Thirimanna*
 *Associate Tech Lead | WSO2*

 Email: hars...@wso2.com
 Mob: +94715186770 <+94%2071%20518%206770>
 Blog: http://harshathirimanna.blogspot.com/
 Twitter: http://twitter.com/harshathirimann
 Linked-In: linked-in: http://www.linkedin.com/pub/ha
 rsha-thirimanna/10/ab8/122
 

 On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
 wrote:

> Hi Johann,
>
>
> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
> wrote:
>
>> Hi,
>>
>> email-admin-config.xml has the default email templates that are used
>> for Email notifications.
>> Since we have a UI to add/update new Email templates I don't think
>> the user has to go to the registry and do any modifications.
>>
>>
>> Thanks,
>> Farasath
>>
>> Farasath Ahamed
>> Software Engineer, WSO2 Inc.; http://wso2.com
>> Mobile: +94777603866
>> Blog: blog.farazath.com
>> Twitter: @farazath619 
>> 
>>
>>
>>
>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
>> wrote:
>>
>>> Hi Kasun,
>>>
>>> I don't think we need to do this because,
>>>
>>> 1. This is the model we follow for some other files as well.
>>> claim-config.xml
>>> identity-event.properties
>>>
>>>
> Yes, I think Isura mentioned the same. Let me revise my original
> query. The problem I was trying to address is:
>
> 1. There is a config file under repository/conf/ which is only read
> during start-up. Since it is read once, should it really be in the
> repository/conf/?
>
> 2. If a config file is there under repository/conf/, then users expect
> any changes to it will be visible to users. It is not that intuitive for a
> first time user IMO.
>

> As the product is quite matured, I think it may be better to look into
> these aspects to make the first time user experience better.  Hence, the
> request for $subject.
>

>>> Agreed. We may be able to improve this.
>>>
>>>
>> Cool.. :) My suggestion is to honor the changes to the file. So, if the
>> file hash is changed, we re-upload the changes.
>>
>> MD5 hash can be stored in registry as a property along with the email
>> templates. It is a simple change to [1] as I understand.
>>
>
> ​But after some one change from the UI then it will update the changes in
> registry. But it is not reflected in the file. Again if some one change in
> the file, then registry will override the changes in registry that is
> changed by the UI. Is this expected ?
> ​
>

Yes, that happens. User need to stick to one. This is actually a problem we
had in our platform for a while. Some of our configurations are duplicated
in both file system and registry. This leads to much confusion for a first
time user.

What's your suggestion?

Thanks.


>
>> [1] https://github.com/wso2-extensions/identity-event-handler-
>> notification/blob/master/components/email-mgt/org.wso2.
>> carbon.email.mgt/src/main/java/org/wso2/carbon/email/
>> mgt/EmailTemplateManagerImpl.java#L78
>>
>>
>>>
>
>
>> 2. This content goes not only to the super tenant but also to tenants
>>> as default email templates. So if we change it in the middle tenants
>>> created until then will have a different default template and the ones
>>> created after that will have a different default template.
>>>
>>>
> Yes, this is the current behavior, isn't it?
>

>>> Yes. This is the current behavior.
>>>
>>>

> Thanks for your feedback.
>
>
>> I don't think we have any problems with current model. If we do this
>>> we need to change our migration, etc. If the 

[Dev] [VOTE] Release of WSO2 IoT Server 3.1.0 RC version 3

2017-07-26 Thread Madhawa Perera
Hi Devs,

We are pleased to announce the release candidate version 3 of WSO2 IoT
Server 3.1.0.

Please download, test the product and vote. Vote will be open for 72 hours
or as needed.

Known issues : https://github.com/wso2/product-iots/issues?q=is%
3Aopen+is%3Aissue+label%3A3.1.0-RC1

Source and binary distribution files:
https://github.com/wso2/product-iots/releases/tag/v3.1.0-RC3

The tag to be voted upon:
https://github.com/wso2/product-iots/tree/v3.1.0-RC3

Please vote as follows.
[+] Stable - go ahead and release
[-] Broken - do not release (explain why)

Thank you
Best Regards,
WSO2 IoT Team

-- 
Madhawa Perera
*Software Engineer*
Mobile : +94 (0) 773655496 <+94%2077%20365%205496>
<%2B94%20%280%29%20773%20451194>
madha...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSOC 2017][API Manager][Environment Support]

2017-07-26 Thread Prasanna Dangalla
Hi Ravindu,

I have approved the PR. Now Pubudu can proceed and merge it.

Regards
*Prasanna Dangalla*
Senior Software Engineer, WSO2, Inc.; http://wso2.com/
lean.enterprise.middleware


*cell: +94 718 11 27 51*
*twitter: @prasa77*

On Thu, Jul 27, 2017 at 12:53 AM, Ravindu Perera 
wrote:

> Hi
> This mail is regarding the pull request , i have done the changes which
> was mentioned yesterday and please approve it .
>
> Thank you .
> Ravindu Perera
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [IS] How to disable wso2is SSO session cache

2017-07-26 Thread Dean Staples
Hi All,

Currently I've configured wso2is 5.1.0 to act as our identity framework with 
SAML 2.0 interfaces on the SP and IDP sides. While testing we found that we can 
successfully authenticate however wso2is will cache the SAML assertion between 
our SP and wso2is even if the IDP assertion is different. We are currently 
using IDP initiated SAML primarily so users may not have explicitly logged out 
of wso2.

I've found that if I remove the commonAuthId cookie, wso2is will then send a 
correct SAML assertion matching what was received from the IDP. Is there any 
way to disable this caching or not set a commonAuthId cookie? We are not 
looking for the SSO functionality that the cookie provides between different 
SPs on our system.

Essentially the behaviour I'd like is that on the same browser 2 different 
users can do IDP initiated sign-ons, whichever one was done last should always 
be sent to our SP (this is not happening).

Thanks,
Dean
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS] Issue with prioritizing session time out period configuration

2017-07-26 Thread Hasintha Indrajee
To me logic is like this.

Session is maintained using commonAuthId cookie (not from samlssoTokenId).
Usually we do not configure a max age value for commonAuthID through
Identity.xml. Therefore the value which we configure through resident idp
will be taken as the timeout (session idle timeout or remember me period).
But if we configure this in identity.xml for commonAuthId then the value
configured through identity.xml will be taken. But this is fine since we
have given the ability to configure timeouts per tenant through UI. For the
rest of the cookies (including samlssoTokenId) the value which is
configured in identity.xml will be taken as the max age. So our
recommendation should be not to configure a max age for commonAuthId in
identity.xml.


On Wed, Jul 26, 2017 at 5:12 AM, Sathya Bandara  wrote:

> Hi all,
>
> In the current implementation we can configure the session time out for
> the Identity Server via the resident realm configuration (Idle Session Time
> Out). In addition, with the following configuration in identity.xml we can
> specify a maxAge parameter on cookies in order to configure the session
> time out periods (cookie expiration time).
>
>
>
> * httpOnly="true" secure="true" />*
>
> If this parameter value is specified, in our implementation we give
> priority to max age value configured through the identity.xml over session
> time out value configured in the resident IDP [1].
>
> But for the scenario where in a tenant mode, if the session time out
> period needs to be customized(reduced) for security reasons, if max age
> value is specified in the configuration file priority will be given to that
> rather than the customized session idle time out for that tenant. is this a
> valid use case?
>
> Highly appreciate your thoughts on this.
>
>
> [1] https://github.com/wso2-extensions/identity-inbound-
> auth-saml/blob/5.3.x/components/org.wso2.carbon.
> identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/servlet/
> SAMLSSOProviderServlet.java#L854
>
> Thanks,
> Sathya
>
> --
> Sathya Bandara
> Software Engineer
> WSO2 Inc. http://wso2.com
> Mobile: (+94) 715 360 421 <+94%2071%20411%205032>
>
> <+94%2071%20411%205032>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Hasintha Indrajee
WSO2, Inc.
Mobile:+94 771892453
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [GSOC 2017][API Manager][Environment Support]

2017-07-26 Thread Ravindu Perera
Hi
This mail is regarding the pull request , i have done the changes which was
mentioned yesterday and please approve it .

Thank you .
Ravindu Perera
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [GSOC 2017][API Manager][Environment Support][Meeting Minutes]

2017-07-26 Thread Ravindu Perera
The Meeting Minutes


   - Discussed on what needed to be done , in the next few stages of the
   project such as the seamless move from one environment to another .
   - Created new milestones and deadlines , which are needed to be
   fulfilled at time.
   - Discussed on some drawback and error which has occurred.
   - able to fix some doubts and also bugs with the help of mentors .


Thank you .
Ravindu Perera
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Problems with EventStreamAdminService

2017-07-26 Thread Sagar Kapadia
Perhaps I was not very clear. What I meant was generating the stubs using
the WSDL2JAVA tool  to generate code from the WSDL files as specified in
the documentation, and not building from source


On Thu, Jul 27, 2017 at 12:12 AM, KasunG Gajasinghe  wrote:

>
> OK. You can generate the stubs on your own or use the already generated
> stubs.
>
> https://github.com/wso2/carbon-identity-framework/
> tree/master/service-stubs/identity/org.wso2.carbon.user.mgt.stub
>
> On Thu, Jul 27, 2017 at 12:05 AM, Sagar Kapadia 
> wrote:
>
>> Thanks,
>> I figured that out. What I was asking [Now its just a curiosity], is that
>> , I had generated stubs using wsdl2java. How do I pass the session token to
>> that code
>> The following is a usage of the generated code.
>> I used the netbeans web service client wizard to generate the code.
>>
>> private static java.util.List> .user.mgt.common.xsd.FlaggedName> listAllUsers(java.lang.String filter,
>> java.lang.Integer limit) throws UserAdminUserAdminException {
>> org.wso2.carbon.user.mgt.UserAdmin service = new
>> org.wso2.carbon.user.mgt.UserAdmin();
>> org.wso2.carbon.user.mgt.UserAdminPortType port =
>> service.getUserAdminHttpsSoap11Endpoint();
>> return port.listAllUsers(filter, limit);
>> }
>>
>>
>> On Thu, Jul 27, 2017 at 12:00 AM, KasunG Gajasinghe 
>> wrote:
>>
>>>
>>> You can check this class [1] on how the AuthenticationAdminStub is used
>>> to login to WSO2. It also shows how to extract the session cookie.
>>>
>>> The sample at [2] shows how to add the session cookie to your stub.
>>>
>>> HTH
>>>
>>> [1] https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f
>>> 799606e5284b627c1e1c/modules/integration/tests-common/admin-
>>> clients/src/main/java/org/wso2/es/integration/common/clients
>>> /AuthenticatorClient.java#L37
>>>
>>> [2] https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f
>>> 799606e5284b627c1e1c/modules/integration/tests-common/admin-
>>> clients/src/main/java/org/wso2/es/integration/common/clients
>>> /AuthenticateStub.java#L52
>>>
>>>
>>> On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia 
>>> wrote:
>>>
 Can you also help me with the authentication part? I get a blank
 session id


 On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia 
 wrote:

> Hi,
> Thanks a lot , KasunG Gajasinghe. You made my day. :D. It worked.
> Sagar
>
>
> On Wed, Jul 26, 2017 at 11:40 PM, KasunG Gajasinghe 
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 11:34 PM, Sagar Kapadia 
>> wrote:
>>
>>> I am trying to call a method in the EventStreamAdminService.
>>> However, I get the following exception. I tried to fix the wsdl and
>>> recreate the jar, but because of the compiled classes containing a
>>> reference to 10.100.1.144, it did not work either. What is the work 
>>> around?
>>> Do I have to rebuild the jar from source?
>>>
>>
>> Not really. When creating the EventStreamAdminServiceStub instance,
>> you can pass your own endpoint. Check the over-loaded constructors.
>>
>>
>>
>>>
>>> Jul 26, 2017 11:30:20 PM org.apache.axis2.transport.htt
>>> p.impl.httpclient3.HTTPSenderImpl sendViaPost
>>> INFO: Unable to sendViaPost to url[https://10.100.1.144:9443/
>>> services/EventStreamAdminService.EventStreamAdminServiceHttp
>>> sSoap12Endpoint/]
>>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
>>> Allowed
>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>> mpl.handleResponse(HTTPSenderImpl.java:343)
>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>> mpl.sendViaPost(HTTPSenderImpl.java:213)
>>> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.j
>>> ava:121)
>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
>>> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
>>> nvoke(CommonsHTTPTransportSender.java:234)
>>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
>>> at org.apache.axis2.description.OutInAxisOperationClient.send(O
>>> utInAxisOperation.java:399)
>>> at org.apache.axis2.description.OutInAxisOperationClient.execut
>>> eImpl(OutInAxisOperation.java:225)
>>> at org.apache.axis2.client.OperationClient.execute(OperationCli
>>> ent.java:150)
>>> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStu
>>> b.getStreamNames(EventStreamAdminServiceStub.java:3246)
>>> at com.avinashi.wso2das.adminapi.Application.main(Application.j
>>> ava:80)
>>>
>>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
>>> Allowed
>>> at 

Re: [Dev] Problems with EventStreamAdminService

2017-07-26 Thread KasunG Gajasinghe
OK. You can generate the stubs on your own or use the already generated
stubs.

https://github.com/wso2/carbon-identity-framework/tree/master/service-stubs/identity/org.wso2.carbon.user.mgt.stub

On Thu, Jul 27, 2017 at 12:05 AM, Sagar Kapadia  wrote:

> Thanks,
> I figured that out. What I was asking [Now its just a curiosity], is that
> , I had generated stubs using wsdl2java. How do I pass the session token to
> that code
> The following is a usage of the generated code.
> I used the netbeans web service client wizard to generate the code.
>
> private static 
> java.util.List
> listAllUsers(java.lang.String filter, java.lang.Integer limit) throws
> UserAdminUserAdminException {
> org.wso2.carbon.user.mgt.UserAdmin service = new
> org.wso2.carbon.user.mgt.UserAdmin();
> org.wso2.carbon.user.mgt.UserAdminPortType port = service.
> getUserAdminHttpsSoap11Endpoint();
> return port.listAllUsers(filter, limit);
> }
>
>
> On Thu, Jul 27, 2017 at 12:00 AM, KasunG Gajasinghe 
> wrote:
>
>>
>> You can check this class [1] on how the AuthenticationAdminStub is used
>> to login to WSO2. It also shows how to extract the session cookie.
>>
>> The sample at [2] shows how to add the session cookie to your stub.
>>
>> HTH
>>
>> [1] https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f
>> 799606e5284b627c1e1c/modules/integration/tests-common/admin-
>> clients/src/main/java/org/wso2/es/integration/common/
>> clients/AuthenticatorClient.java#L37
>>
>> [2] https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f
>> 799606e5284b627c1e1c/modules/integration/tests-common/admin-
>> clients/src/main/java/org/wso2/es/integration/common/
>> clients/AuthenticateStub.java#L52
>>
>>
>> On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia 
>> wrote:
>>
>>> Can you also help me with the authentication part? I get a blank session
>>> id
>>>
>>>
>>> On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia 
>>> wrote:
>>>
 Hi,
 Thanks a lot , KasunG Gajasinghe. You made my day. :D. It worked.
 Sagar


 On Wed, Jul 26, 2017 at 11:40 PM, KasunG Gajasinghe 
 wrote:

>
>
> On Wed, Jul 26, 2017 at 11:34 PM, Sagar Kapadia 
> wrote:
>
>> I am trying to call a method in the EventStreamAdminService. However,
>> I get the following exception. I tried to fix the wsdl and recreate the
>> jar, but because of the compiled classes containing a reference to
>> 10.100.1.144, it did not work either. What is the work around? Do I have 
>> to
>> rebuild the jar from source?
>>
>
> Not really. When creating the EventStreamAdminServiceStub instance,
> you can pass your own endpoint. Check the over-loaded constructors.
>
>
>
>>
>> Jul 26, 2017 11:30:20 PM org.apache.axis2.transport.htt
>> p.impl.httpclient3.HTTPSenderImpl sendViaPost
>> INFO: Unable to sendViaPost to url[https://10.100.1.144:9443/
>> services/EventStreamAdminService.EventStreamAdminServiceHttp
>> sSoap12Endpoint/]
>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
>> Allowed
>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>> mpl.handleResponse(HTTPSenderImpl.java:343)
>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>> mpl.sendViaPost(HTTPSenderImpl.java:213)
>> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.j
>> ava:121)
>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
>> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
>> nvoke(CommonsHTTPTransportSender.java:234)
>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
>> at org.apache.axis2.description.OutInAxisOperationClient.send(O
>> utInAxisOperation.java:399)
>> at org.apache.axis2.description.OutInAxisOperationClient.execut
>> eImpl(OutInAxisOperation.java:225)
>> at org.apache.axis2.client.OperationClient.execute(OperationCli
>> ent.java:150)
>> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStu
>> b.getStreamNames(EventStreamAdminServiceStub.java:3246)
>> at com.avinashi.wso2das.adminapi.Application.main(Application.j
>> ava:80)
>>
>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
>> Allowed
>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>> mpl.handleResponse(HTTPSenderImpl.java:343)
>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>> mpl.sendViaPost(HTTPSenderImpl.java:213)
>> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.j
>> ava:121)
>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
>> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
>> at 

Re: [Dev] Problems with EventStreamAdminService

2017-07-26 Thread Sagar Kapadia
Thanks,
I figured that out. What I was asking [Now its just a curiosity], is that ,
I had generated stubs using wsdl2java. How do I pass the session token to
that code
The following is a usage of the generated code.
I used the netbeans web service client wizard to generate the code.

private static
java.util.List
listAllUsers(java.lang.String filter, java.lang.Integer limit) throws
UserAdminUserAdminException {
org.wso2.carbon.user.mgt.UserAdmin service = new
org.wso2.carbon.user.mgt.UserAdmin();
org.wso2.carbon.user.mgt.UserAdminPortType port =
service.getUserAdminHttpsSoap11Endpoint();
return port.listAllUsers(filter, limit);
}


On Thu, Jul 27, 2017 at 12:00 AM, KasunG Gajasinghe  wrote:

>
> You can check this class [1] on how the AuthenticationAdminStub is used to
> login to WSO2. It also shows how to extract the session cookie.
>
> The sample at [2] shows how to add the session cookie to your stub.
>
> HTH
>
> [1] https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f799606e528
> 4b627c1e1c/modules/integration/tests-common/admin-clients/src/main/java/
> org/wso2/es/integration/common/clients/AuthenticatorClient.java#L37
>
> [2] https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f799606e528
> 4b627c1e1c/modules/integration/tests-common/admin-clients/src/main/java/
> org/wso2/es/integration/common/clients/AuthenticateStub.java#L52
>
>
> On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia 
> wrote:
>
>> Can you also help me with the authentication part? I get a blank session
>> id
>>
>>
>> On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia 
>> wrote:
>>
>>> Hi,
>>> Thanks a lot , KasunG Gajasinghe. You made my day. :D. It worked.
>>> Sagar
>>>
>>>
>>> On Wed, Jul 26, 2017 at 11:40 PM, KasunG Gajasinghe 
>>> wrote:
>>>


 On Wed, Jul 26, 2017 at 11:34 PM, Sagar Kapadia 
 wrote:

> I am trying to call a method in the EventStreamAdminService. However,
> I get the following exception. I tried to fix the wsdl and recreate the
> jar, but because of the compiled classes containing a reference to
> 10.100.1.144, it did not work either. What is the work around? Do I have 
> to
> rebuild the jar from source?
>

 Not really. When creating the EventStreamAdminServiceStub instance,
 you can pass your own endpoint. Check the over-loaded constructors.



>
> Jul 26, 2017 11:30:20 PM org.apache.axis2.transport.htt
> p.impl.httpclient3.HTTPSenderImpl sendViaPost
> INFO: Unable to sendViaPost to url[https://10.100.1.144:9443/
> services/EventStreamAdminService.EventStreamAdminServiceHttp
> sSoap12Endpoint/]
> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
> Allowed
> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
> mpl.handleResponse(HTTPSenderImpl.java:343)
> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
> mpl.sendViaPost(HTTPSenderImpl.java:213)
> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.j
> ava:121)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
> nvoke(CommonsHTTPTransportSender.java:234)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
> at org.apache.axis2.description.OutInAxisOperationClient.send(O
> utInAxisOperation.java:399)
> at org.apache.axis2.description.OutInAxisOperationClient.execut
> eImpl(OutInAxisOperation.java:225)
> at org.apache.axis2.client.OperationClient.execute(OperationCli
> ent.java:150)
> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStu
> b.getStreamNames(EventStreamAdminServiceStub.java:3246)
> at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)
>
> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
> Allowed
> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
> mpl.handleResponse(HTTPSenderImpl.java:343)
> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
> mpl.sendViaPost(HTTPSenderImpl.java:213)
> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.j
> ava:121)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
> nvoke(CommonsHTTPTransportSender.java:234)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
> at org.apache.axis2.description.OutInAxisOperationClient.send(O
> utInAxisOperation.java:399)
> at org.apache.axis2.description.OutInAxisOperationClient.execut
> eImpl(OutInAxisOperation.java:225)
> at 

Re: [Dev] Problems with EventStreamAdminService

2017-07-26 Thread KasunG Gajasinghe
You can check this class [1] on how the AuthenticationAdminStub is used to
login to WSO2. It also shows how to extract the session cookie.

The sample at [2] shows how to add the session cookie to your stub.

HTH

[1]
https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f799606e5284b627c1e1c/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/es/integration/common/clients/AuthenticatorClient.java#L37

[2]
https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f799606e5284b627c1e1c/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/es/integration/common/clients/AuthenticateStub.java#L52


On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia  wrote:

> Can you also help me with the authentication part? I get a blank session id
>
>
> On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia 
> wrote:
>
>> Hi,
>> Thanks a lot , KasunG Gajasinghe. You made my day. :D. It worked.
>> Sagar
>>
>>
>> On Wed, Jul 26, 2017 at 11:40 PM, KasunG Gajasinghe 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 11:34 PM, Sagar Kapadia 
>>> wrote:
>>>
 I am trying to call a method in the EventStreamAdminService. However, I
 get the following exception. I tried to fix the wsdl and recreate the jar,
 but because of the compiled classes containing a reference to 10.100.1.144,
 it did not work either. What is the work around? Do I have to rebuild the
 jar from source?

>>>
>>> Not really. When creating the EventStreamAdminServiceStub instance, you
>>> can pass your own endpoint. Check the over-loaded constructors.
>>>
>>>
>>>

 Jul 26, 2017 11:30:20 PM org.apache.axis2.transport.htt
 p.impl.httpclient3.HTTPSenderImpl sendViaPost
 INFO: Unable to sendViaPost to url[https://10.100.1.144:9443/
 services/EventStreamAdminService.EventStreamAdminServiceHttp
 sSoap12Endpoint/]
 org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
 Allowed
 at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
 mpl.handleResponse(HTTPSenderImpl.java:343)
 at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
 mpl.sendViaPost(HTTPSenderImpl.java:213)
 at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
 at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
 riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
 at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
 nvoke(CommonsHTTPTransportSender.java:234)
 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
 at org.apache.axis2.description.OutInAxisOperationClient.send(O
 utInAxisOperation.java:399)
 at org.apache.axis2.description.OutInAxisOperationClient.execut
 eImpl(OutInAxisOperation.java:225)
 at org.apache.axis2.client.OperationClient.execute(OperationCli
 ent.java:150)
 at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStu
 b.getStreamNames(EventStreamAdminServiceStub.java:3246)
 at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)

 org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
 Allowed
 at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
 mpl.handleResponse(HTTPSenderImpl.java:343)
 at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
 mpl.sendViaPost(HTTPSenderImpl.java:213)
 at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
 at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
 riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
 at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
 nvoke(CommonsHTTPTransportSender.java:234)
 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
 at org.apache.axis2.description.OutInAxisOperationClient.send(O
 utInAxisOperation.java:399)
 at org.apache.axis2.description.OutInAxisOperationClient.execut
 eImpl(OutInAxisOperation.java:225)
 at org.apache.axis2.client.OperationClient.execute(OperationCli
 ent.java:150)
 at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStu
 b.getStreamNames(EventStreamAdminServiceStub.java:3246)
 at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)

 Sagar


 On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia 
 wrote:

> Hi,
>
> I used this tutorial
> https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps
>
> I am facing the following issues in importing the WSDL files and
> generating the code
> I get the following error message when I call
> wsimport AuthenticationAdmin.xml
>
> [ERROR] missing required attribute "message" of element "wsdl:output"
>
>
> Failed to parse the WSDL.
>
> I could not fix this issue.
>
> In 

Re: [Dev] Issues in the Admin API WSDL Files

2017-07-26 Thread KasunG Gajasinghe
wsimport is used to generate the JAX-WS service clients.

But the generated client stubs are already available for all the admin
services of WSO2. I suggest you use them. These work over Axis2 SOAP engine.

On Wed, Jul 26, 2017 at 11:49 PM, KasunG Gajasinghe  wrote:

>
> If you are trying to invoke via Java, then you can check the existing
> usage of UserAdminStub class here [1].
>
> These admin services are already used by the mgt console UI to invoke the
> back-end services. A trick I used to capture the soap envelope is the
> following. This does not work all the time. You can throw the dice and see.
>
> 1. Go to repository/components/plugins folder
> 2. Unzip the relevant jar bundle that that contain the service. UserAdmin
> service is in org.wso2.carbon.user.mgt_5.7.5.jar.
> 3. In there, open META-INF/services.xml file in there, and remove the
> following two lines
>
> true
> true
>
> 4. Zip it back, and restart the server.
>
> 5. Now go to, *Monitor* -> *Soap Tracer*, and enable it.
> 6. Do a user mgt UI operation and check the Soap Tracer.
>
> As I said, throw the dice and see. It may not work for you.
>
> [1] https://github.com/search?q=org%3Awso2+UserAdminStub=Code
>
> On Wed, Jul 26, 2017 at 11:11 PM, Sagar Kapadia 
> wrote:
>
>> Hi
>> I have another question. Is there a need to generate stubs for services,
>> given that stubs for  services are present? I could not find a way to pass
>> the token to generated web service stubs. However, I figured out how to use
>> the stubs themselves
>>
>>   UserAdminStub s=new UserAdminStub();
>> ServiceClient serviceClient =s._getServiceClient();
>>
>> option = serviceClient.getOptions();
>> option.setManageSession(true);
>> option.setProperty(
>> org.apache.axis2.transport.htt
>> p.HTTPConstants.COOKIE_STRING,
>> token);
>>
>> FlaggedName[] names=s.listAllUsers("*", 100);
>>for(FlaggedName name:names){
>>
>>
>>System.out.println(name.getItemDisplayName());
>>}
>>
>> Is there a way to do this with generated code? or do the provided stubs
>> cover all services?
>> Also, I have not managed to login using the authenticate method with
>> either localhost or actual ip and credentials admin/admin. I used soapui to
>> login and obtain the session token, which I passed to the above web
>> service, which worked. Please let me know what mistake I am making in the
>> login proocess.
>>  System.setProperty("javax.net.ssl.trustStore",
>> "C://wso2das-3.1.0/repository/resources/security/wso2carbon.jks");
>> System.setProperty("javax.net.ssl.trustStorePassword",
>> "wso2carbon");
>> System.setProperty("javax.net.ssl.trustStoreType", "JKS");
>>
>>LoginAdminServiceClient c=new LoginAdminServiceClient(backEndUrl);
>>
>>String token=c.authenticate("admin","ädmin");
>>System.out.println("Token:"+token);
>>
>> Invoking an admin service
>>
>> Admin services are secured using common types of security protocols such
>> as HTTP basic authentication, WS-Security username token, and session based
>> authentication to prevent anonymous invocations. For example, the
>> UserAdmin Web service is secured with the HTTP basic authentication. To
>> invoke a service, you do the following:
>>
>>1. Authenticate yourself and get the session cookie.
>>2. Generate the client stubs to access the back-end Web services.
>>
>> To generate the stubs, you can write your own client program using the
>> Axis2 client API or use an existing tool like SoapUI
>>  (4.5.1 or later) or wsdl2java.
>>
>> The wsdl2java tool, which comes with WSO2 products by default hides all
>> the complexity and presents you with a proxy to the back-end service. The
>> stub generation happens during the project build process within the Maven
>> POM files. It uses the Maven ant run plug-in to execute the wsdl2java tool.
>>
>> You can also use the Java client program given here
>> 
>>  to
>> invoke admin services. All dependency JAR files that you need to run this
>> client are found in the /lib directory.
>>
>> On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia 
>> wrote:
>>
>>> Hi,
>>>
>>> I used this tutorial
>>> https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps
>>>
>>> I am facing the following issues in importing the WSDL files and
>>> generating the code
>>> I get the following error message when I call
>>> wsimport AuthenticationAdmin.xml
>>>
>>> [ERROR] missing required attribute "message" of element "wsdl:output"
>>>
>>>
>>> Failed to parse the WSDL.
>>>
>>> I could not fix this issue.
>>>
>>> In another wsdl file "UserAdmin", I got multiple errors,
>>> [ERROR] operation "" has an invalid style
>>> which I fixed as follows
>>> https://stackoverflow.com/questions/12155114/generating-stub
>>> 

Re: [Dev] Issues in the Admin API WSDL Files

2017-07-26 Thread KasunG Gajasinghe
If you are trying to invoke via Java, then you can check the existing usage
of UserAdminStub class here [1].

These admin services are already used by the mgt console UI to invoke the
back-end services. A trick I used to capture the soap envelope is the
following. This does not work all the time. You can throw the dice and see.

1. Go to repository/components/plugins folder
2. Unzip the relevant jar bundle that that contain the service. UserAdmin
service is in org.wso2.carbon.user.mgt_5.7.5.jar.
3. In there, open META-INF/services.xml file in there, and remove the
following two lines

true
true

4. Zip it back, and restart the server.

5. Now go to, *Monitor* -> *Soap Tracer*, and enable it.
6. Do a user mgt UI operation and check the Soap Tracer.

As I said, throw the dice and see. It may not work for you.

[1] https://github.com/search?q=org%3Awso2+UserAdminStub=Code

On Wed, Jul 26, 2017 at 11:11 PM, Sagar Kapadia  wrote:

> Hi
> I have another question. Is there a need to generate stubs for services,
> given that stubs for  services are present? I could not find a way to pass
> the token to generated web service stubs. However, I figured out how to use
> the stubs themselves
>
>   UserAdminStub s=new UserAdminStub();
> ServiceClient serviceClient =s._getServiceClient();
>
> option = serviceClient.getOptions();
> option.setManageSession(true);
> option.setProperty(
> org.apache.axis2.transport.http.HTTPConstants.COOKIE_
> STRING,
> token);
>
> FlaggedName[] names=s.listAllUsers("*", 100);
>for(FlaggedName name:names){
>
>
>System.out.println(name.getItemDisplayName());
>}
>
> Is there a way to do this with generated code? or do the provided stubs
> cover all services?
> Also, I have not managed to login using the authenticate method with
> either localhost or actual ip and credentials admin/admin. I used soapui to
> login and obtain the session token, which I passed to the above web
> service, which worked. Please let me know what mistake I am making in the
> login proocess.
>  System.setProperty("javax.net.ssl.trustStore",
> "C://wso2das-3.1.0/repository/resources/security/wso2carbon.jks");
> System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
> System.setProperty("javax.net.ssl.trustStoreType", "JKS");
>
>LoginAdminServiceClient c=new LoginAdminServiceClient(backEndUrl);
>
>String token=c.authenticate("admin","ädmin");
>System.out.println("Token:"+token);
>
> Invoking an admin service
>
> Admin services are secured using common types of security protocols such
> as HTTP basic authentication, WS-Security username token, and session based
> authentication to prevent anonymous invocations. For example, the
> UserAdmin Web service is secured with the HTTP basic authentication. To
> invoke a service, you do the following:
>
>1. Authenticate yourself and get the session cookie.
>2. Generate the client stubs to access the back-end Web services.
>
> To generate the stubs, you can write your own client program using the
> Axis2 client API or use an existing tool like SoapUI
>  (4.5.1 or later) or wsdl2java.
>
> The wsdl2java tool, which comes with WSO2 products by default hides all
> the complexity and presents you with a proxy to the back-end service. The
> stub generation happens during the project build process within the Maven
> POM files. It uses the Maven ant run plug-in to execute the wsdl2java tool.
>
> You can also use the Java client program given here
> 
>  to
> invoke admin services. All dependency JAR files that you need to run this
> client are found in the /lib directory.
>
> On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia  wrote:
>
>> Hi,
>>
>> I used this tutorial
>> https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps
>>
>> I am facing the following issues in importing the WSDL files and
>> generating the code
>> I get the following error message when I call
>> wsimport AuthenticationAdmin.xml
>>
>> [ERROR] missing required attribute "message" of element "wsdl:output"
>>
>>
>> Failed to parse the WSDL.
>>
>> I could not fix this issue.
>>
>> In another wsdl file "UserAdmin", I got multiple errors,
>> [ERROR] operation "" has an invalid style
>> which I fixed as follows
>> https://stackoverflow.com/questions/12155114/generating-stub
>> s-with-jax-ws-fails
>> I added  and also
>> corresponding
>> 
>>
>> I was able to generate code for the UserAdmin sevice, but not for
>> AuthenticationAdmin Service
>>
>> By the way the reason I tried to generate code for the Autherntication
>> Service is that login fails without any exception . The token returned is
>> null.
>> I am sharing a link to the source code [Netbeans project] for the web
>> service client and the the modified 

Re: [Dev] Problems with EventStreamAdminService

2017-07-26 Thread Sagar Kapadia
Can you also help me with the authentication part? I get a blank session id


On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia  wrote:

> Hi,
> Thanks a lot , KasunG Gajasinghe. You made my day. :D. It worked.
> Sagar
>
>
> On Wed, Jul 26, 2017 at 11:40 PM, KasunG Gajasinghe 
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 11:34 PM, Sagar Kapadia 
>> wrote:
>>
>>> I am trying to call a method in the EventStreamAdminService. However, I
>>> get the following exception. I tried to fix the wsdl and recreate the jar,
>>> but because of the compiled classes containing a reference to 10.100.1.144,
>>> it did not work either. What is the work around? Do I have to rebuild the
>>> jar from source?
>>>
>>
>> Not really. When creating the EventStreamAdminServiceStub instance, you
>> can pass your own endpoint. Check the over-loaded constructors.
>>
>>
>>
>>>
>>> Jul 26, 2017 11:30:20 PM org.apache.axis2.transport.htt
>>> p.impl.httpclient3.HTTPSenderImpl sendViaPost
>>> INFO: Unable to sendViaPost to url[https://10.100.1.144:9443/
>>> services/EventStreamAdminService.EventStreamAdminServiceHttp
>>> sSoap12Endpoint/]
>>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
>>> Allowed
>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>> mpl.handleResponse(HTTPSenderImpl.java:343)
>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>> mpl.sendViaPost(HTTPSenderImpl.java:213)
>>> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
>>> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
>>> nvoke(CommonsHTTPTransportSender.java:234)
>>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
>>> at org.apache.axis2.description.OutInAxisOperationClient.send(O
>>> utInAxisOperation.java:399)
>>> at org.apache.axis2.description.OutInAxisOperationClient.execut
>>> eImpl(OutInAxisOperation.java:225)
>>> at org.apache.axis2.client.OperationClient.execute(OperationCli
>>> ent.java:150)
>>> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStu
>>> b.getStreamNames(EventStreamAdminServiceStub.java:3246)
>>> at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)
>>>
>>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
>>> Allowed
>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>> mpl.handleResponse(HTTPSenderImpl.java:343)
>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>> mpl.sendViaPost(HTTPSenderImpl.java:213)
>>> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
>>> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
>>> nvoke(CommonsHTTPTransportSender.java:234)
>>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
>>> at org.apache.axis2.description.OutInAxisOperationClient.send(O
>>> utInAxisOperation.java:399)
>>> at org.apache.axis2.description.OutInAxisOperationClient.execut
>>> eImpl(OutInAxisOperation.java:225)
>>> at org.apache.axis2.client.OperationClient.execute(OperationCli
>>> ent.java:150)
>>> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStu
>>> b.getStreamNames(EventStreamAdminServiceStub.java:3246)
>>> at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)
>>>
>>> Sagar
>>>
>>>
>>> On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia 
>>> wrote:
>>>
 Hi,

 I used this tutorial
 https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps

 I am facing the following issues in importing the WSDL files and
 generating the code
 I get the following error message when I call
 wsimport AuthenticationAdmin.xml

 [ERROR] missing required attribute "message" of element "wsdl:output"


 Failed to parse the WSDL.

 I could not fix this issue.

 In another wsdl file "UserAdmin", I got multiple errors,
 [ERROR] operation "" has an invalid style
 which I fixed as follows
 https://stackoverflow.com/questions/12155114/generating-stub
 s-with-jax-ws-fails
 I added  and also
 corresponding
 

 I was able to generate code for the UserAdmin sevice, but not for
 AuthenticationAdmin Service

 By the way the reason I tried to generate code for the Autherntication
 Service is that login fails without any exception . The token returned is
 null.
 I am sharing a link to the source code [Netbeans project] for the web
 service client and the the modified wsdl files I am using


 Link to the source
 https://drive.google.com/open?id=0BwqZCw5oc2rwcmJGTllNbEo2U00


 The help I require is 

Re: [Dev] Problems with EventStreamAdminService

2017-07-26 Thread Sagar Kapadia
Hi,
Thanks a lot , KasunG Gajasinghe. You made my day. :D. It worked.
Sagar


On Wed, Jul 26, 2017 at 11:40 PM, KasunG Gajasinghe  wrote:

>
>
> On Wed, Jul 26, 2017 at 11:34 PM, Sagar Kapadia 
> wrote:
>
>> I am trying to call a method in the EventStreamAdminService. However, I
>> get the following exception. I tried to fix the wsdl and recreate the jar,
>> but because of the compiled classes containing a reference to 10.100.1.144,
>> it did not work either. What is the work around? Do I have to rebuild the
>> jar from source?
>>
>
> Not really. When creating the EventStreamAdminServiceStub instance, you
> can pass your own endpoint. Check the over-loaded constructors.
>
>
>
>>
>> Jul 26, 2017 11:30:20 PM org.apache.axis2.transport.htt
>> p.impl.httpclient3.HTTPSenderImpl sendViaPost
>> INFO: Unable to sendViaPost to url[https://10.100.1.144:9443/
>> services/EventStreamAdminService.EventStreamAdminServiceHttp
>> sSoap12Endpoint/]
>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed
>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>> mpl.handleResponse(HTTPSenderImpl.java:343)
>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>> mpl.sendViaPost(HTTPSenderImpl.java:213)
>> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
>> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
>> nvoke(CommonsHTTPTransportSender.java:234)
>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
>> at org.apache.axis2.description.OutInAxisOperationClient.send(O
>> utInAxisOperation.java:399)
>> at org.apache.axis2.description.OutInAxisOperationClient.execut
>> eImpl(OutInAxisOperation.java:225)
>> at org.apache.axis2.client.OperationClient.execute(OperationCli
>> ent.java:150)
>> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStu
>> b.getStreamNames(EventStreamAdminServiceStub.java:3246)
>> at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)
>>
>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed
>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>> mpl.handleResponse(HTTPSenderImpl.java:343)
>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>> mpl.sendViaPost(HTTPSenderImpl.java:213)
>> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
>> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
>> nvoke(CommonsHTTPTransportSender.java:234)
>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
>> at org.apache.axis2.description.OutInAxisOperationClient.send(O
>> utInAxisOperation.java:399)
>> at org.apache.axis2.description.OutInAxisOperationClient.execut
>> eImpl(OutInAxisOperation.java:225)
>> at org.apache.axis2.client.OperationClient.execute(OperationCli
>> ent.java:150)
>> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStu
>> b.getStreamNames(EventStreamAdminServiceStub.java:3246)
>> at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)
>>
>> Sagar
>>
>>
>> On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia 
>> wrote:
>>
>>> Hi,
>>>
>>> I used this tutorial
>>> https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps
>>>
>>> I am facing the following issues in importing the WSDL files and
>>> generating the code
>>> I get the following error message when I call
>>> wsimport AuthenticationAdmin.xml
>>>
>>> [ERROR] missing required attribute "message" of element "wsdl:output"
>>>
>>>
>>> Failed to parse the WSDL.
>>>
>>> I could not fix this issue.
>>>
>>> In another wsdl file "UserAdmin", I got multiple errors,
>>> [ERROR] operation "" has an invalid style
>>> which I fixed as follows
>>> https://stackoverflow.com/questions/12155114/generating-stub
>>> s-with-jax-ws-fails
>>> I added  and also
>>> corresponding
>>> 
>>>
>>> I was able to generate code for the UserAdmin sevice, but not for
>>> AuthenticationAdmin Service
>>>
>>> By the way the reason I tried to generate code for the Autherntication
>>> Service is that login fails without any exception . The token returned is
>>> null.
>>> I am sharing a link to the source code [Netbeans project] for the web
>>> service client and the the modified wsdl files I am using
>>>
>>>
>>> Link to the source
>>> https://drive.google.com/open?id=0BwqZCw5oc2rwcmJGTllNbEo2U00
>>>
>>>
>>> The help I require is primarily with the login functionality, because
>>> its failing. Also, is the manner I am trying to fix the wsdls correct?
>>> [Adding wsdl:output with message]
>>>
>>>
>>> Sincerely
>>> Sagar
>>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org

Re: [Dev] Problems with EventStreamAdminService

2017-07-26 Thread KasunG Gajasinghe
On Wed, Jul 26, 2017 at 11:34 PM, Sagar Kapadia  wrote:

> I am trying to call a method in the EventStreamAdminService. However, I
> get the following exception. I tried to fix the wsdl and recreate the jar,
> but because of the compiled classes containing a reference to 10.100.1.144,
> it did not work either. What is the work around? Do I have to rebuild the
> jar from source?
>

Not really. When creating the EventStreamAdminServiceStub instance, you can
pass your own endpoint. Check the over-loaded constructors.



>
> Jul 26, 2017 11:30:20 PM 
> org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl
> sendViaPost
> INFO: Unable to sendViaPost to url[https://10.100.1.144:9443/services/
> EventStreamAdminService.EventStreamAdminServiceHttpsSoap12Endpoint/]
> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed
> at org.apache.axis2.transport.http.impl.httpclient3.
> HTTPSenderImpl.handleResponse(HTTPSenderImpl.java:343)
> at org.apache.axis2.transport.http.impl.httpclient3.
> HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:213)
> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.
> writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
> CommonsHTTPTransportSender.java:234)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
> at org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:399)
> at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:225)
> at org.apache.axis2.client.OperationClient.execute(
> OperationClient.java:150)
> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStub.
> getStreamNames(EventStreamAdminServiceStub.java:3246)
> at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)
>
> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed
> at org.apache.axis2.transport.http.impl.httpclient3.
> HTTPSenderImpl.handleResponse(HTTPSenderImpl.java:343)
> at org.apache.axis2.transport.http.impl.httpclient3.
> HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:213)
> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.
> writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
> CommonsHTTPTransportSender.java:234)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
> at org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:399)
> at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:225)
> at org.apache.axis2.client.OperationClient.execute(
> OperationClient.java:150)
> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStub.
> getStreamNames(EventStreamAdminServiceStub.java:3246)
> at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)
>
> Sagar
>
>
> On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia  wrote:
>
>> Hi,
>>
>> I used this tutorial
>> https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps
>>
>> I am facing the following issues in importing the WSDL files and
>> generating the code
>> I get the following error message when I call
>> wsimport AuthenticationAdmin.xml
>>
>> [ERROR] missing required attribute "message" of element "wsdl:output"
>>
>>
>> Failed to parse the WSDL.
>>
>> I could not fix this issue.
>>
>> In another wsdl file "UserAdmin", I got multiple errors,
>> [ERROR] operation "" has an invalid style
>> which I fixed as follows
>> https://stackoverflow.com/questions/12155114/generating-stub
>> s-with-jax-ws-fails
>> I added  and also
>> corresponding
>> 
>>
>> I was able to generate code for the UserAdmin sevice, but not for
>> AuthenticationAdmin Service
>>
>> By the way the reason I tried to generate code for the Autherntication
>> Service is that login fails without any exception . The token returned is
>> null.
>> I am sharing a link to the source code [Netbeans project] for the web
>> service client and the the modified wsdl files I am using
>>
>>
>> Link to the source
>> https://drive.google.com/open?id=0BwqZCw5oc2rwcmJGTllNbEo2U00
>>
>>
>> The help I require is primarily with the login functionality, because its
>> failing. Also, is the manner I am trying to fix the wsdls correct? [Adding
>> wsdl:output with message]
>>
>>
>> Sincerely
>> Sagar
>>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813

[Dev] Problems with EventStreamAdminService

2017-07-26 Thread Sagar Kapadia
I am trying to call a method in the EventStreamAdminService. However, I get
the following exception. I tried to fix the wsdl and recreate the jar, but
because of the compiled classes containing a reference to 10.100.1.144, it
did not work either. What is the work around? Do I have to rebuild the jar
from source?

Jul 26, 2017 11:30:20 PM
org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl sendViaPost
INFO: Unable to sendViaPost to url[
https://10.100.1.144:9443/services/EventStreamAdminService.EventStreamAdminServiceHttpsSoap12Endpoint/
]
org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed
at
org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.handleResponse(HTTPSenderImpl.java:343)
at
org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:213)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:234)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:399)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
at
org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStub.getStreamNames(EventStreamAdminServiceStub.java:3246)
at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)

org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed
at
org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.handleResponse(HTTPSenderImpl.java:343)
at
org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:213)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:234)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:399)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
at
org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStub.getStreamNames(EventStreamAdminServiceStub.java:3246)
at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)

Sagar


On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia  wrote:

> Hi,
>
> I used this tutorial
> https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps
>
> I am facing the following issues in importing the WSDL files and
> generating the code
> I get the following error message when I call
> wsimport AuthenticationAdmin.xml
>
> [ERROR] missing required attribute "message" of element "wsdl:output"
>
>
> Failed to parse the WSDL.
>
> I could not fix this issue.
>
> In another wsdl file "UserAdmin", I got multiple errors,
> [ERROR] operation "" has an invalid style
> which I fixed as follows
> https://stackoverflow.com/questions/12155114/generating-
> stubs-with-jax-ws-fails
> I added  and also
> corresponding
> 
>
> I was able to generate code for the UserAdmin sevice, but not for
> AuthenticationAdmin Service
>
> By the way the reason I tried to generate code for the Autherntication
> Service is that login fails without any exception . The token returned is
> null.
> I am sharing a link to the source code [Netbeans project] for the web
> service client and the the modified wsdl files I am using
>
>
> Link to the source
> https://drive.google.com/open?id=0BwqZCw5oc2rwcmJGTllNbEo2U00
>
>
> The help I require is primarily with the login functionality, because its
> failing. Also, is the manner I am trying to fix the wsdls correct? [Adding
> wsdl:output with message]
>
>
> Sincerely
> Sagar
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] (IDENTITY-6168) Ambiguous code segment

2017-07-26 Thread KasunG Gajasinghe
Hi,

The #replace operations pointed in this jira are actually a no-ops since
the original string and the replacement string are the same!

@Indunil, it seems above code segment was introduced by the following
commit. Can you enlighten the reason for this?

https://github.com/wso2-extensions/identity-inbound-auth-oauth/commit/f40fd2acc9682117bb7e4780c7a274fd5f93c248#diff-3bcd1e69e27d53fa42e00cdc31c36b7bR713

Thanks,
Kasun


On Wed, Jul 26, 2017 at 2:48 PM, Kasun Gajasinghe (JIRA) 
wrote:

> Kasun Gajasinghe
> 
> *commented* on [image: Improvement] IDENTITY-6168
> 
>
> Re: Ambiguous code segment 
>
> Hi,
>
> I checked the code, the #replace is actually a no-op here since the
> original string and the replacement string are the same!
>
> @Indunil, it seems above code segment was introduced by the following
> commit. Can you enlighten the reason for this?
>
> https://github.com/wso2-extensions/identity-inbound-auth-oauth/commit/
> f40fd2acc9682117bb7e4780c7a274fd5f93c248#diff-
> 3bcd1e69e27d53fa42e00cdc31c36b7bR713
>
> Thanks,
> KasunG
> [image: Add Comment]
>  Add Comment
> 
>
> This message was sent by Atlassian JIRA (v7.2.2#72004-sha1:9d51328)
> [image: Atlassian logo]
>
> ___
> Carbon-jira mailing list
> carbon-j...@wso2.org
> https://wso2.org/cgi-bin/mailman/listinfo/carbon-jira
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issues in the Admin API WSDL Files

2017-07-26 Thread Sagar Kapadia
Hi
I have another question. Is there a need to generate stubs for services,
given that stubs for  services are present? I could not find a way to pass
the token to generated web service stubs. However, I figured out how to use
the stubs themselves

  UserAdminStub s=new UserAdminStub();
ServiceClient serviceClient =s._getServiceClient();

option = serviceClient.getOptions();
option.setManageSession(true);
option.setProperty(
org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING,
token);

FlaggedName[] names=s.listAllUsers("*", 100);
   for(FlaggedName name:names){


   System.out.println(name.getItemDisplayName());
   }

Is there a way to do this with generated code? or do the provided stubs
cover all services?
Also, I have not managed to login using the authenticate method with either
localhost or actual ip and credentials admin/admin. I used soapui to login
and obtain the session token, which I passed to the above web service,
which worked. Please let me know what mistake I am making in the login
proocess.
 System.setProperty("javax.net.ssl.trustStore",
"C://wso2das-3.1.0/repository/resources/security/wso2carbon.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
System.setProperty("javax.net.ssl.trustStoreType", "JKS");

   LoginAdminServiceClient c=new LoginAdminServiceClient(backEndUrl);

   String token=c.authenticate("admin","ädmin");
   System.out.println("Token:"+token);

Invoking an admin service

Admin services are secured using common types of security protocols such
as HTTP basic authentication, WS-Security username token, and session based
authentication to prevent anonymous invocations. For example, the UserAdmin Web
service is secured with the HTTP basic authentication. To invoke a service,
you do the following:

   1. Authenticate yourself and get the session cookie.
   2. Generate the client stubs to access the back-end Web services.

To generate the stubs, you can write your own client program using the
Axis2 client API or use an existing tool like SoapUI
 (4.5.1 or later) or wsdl2java.

The wsdl2java tool, which comes with WSO2 products by default hides all the
complexity and presents you with a proxy to the back-end service. The stub
generation happens during the project build process within the Maven POM
files. It uses the Maven ant run plug-in to execute the wsdl2java tool.

You can also use the Java client program given here

to
invoke admin services. All dependency JAR files that you need to run this
client are found in the /lib directory.

On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia  wrote:

> Hi,
>
> I used this tutorial
> https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps
>
> I am facing the following issues in importing the WSDL files and
> generating the code
> I get the following error message when I call
> wsimport AuthenticationAdmin.xml
>
> [ERROR] missing required attribute "message" of element "wsdl:output"
>
>
> Failed to parse the WSDL.
>
> I could not fix this issue.
>
> In another wsdl file "UserAdmin", I got multiple errors,
> [ERROR] operation "" has an invalid style
> which I fixed as follows
> https://stackoverflow.com/questions/12155114/generating-
> stubs-with-jax-ws-fails
> I added  and also
> corresponding
> 
>
> I was able to generate code for the UserAdmin sevice, but not for
> AuthenticationAdmin Service
>
> By the way the reason I tried to generate code for the Autherntication
> Service is that login fails without any exception . The token returned is
> null.
> I am sharing a link to the source code [Netbeans project] for the web
> service client and the the modified wsdl files I am using
>
>
> Link to the source
> https://drive.google.com/open?id=0BwqZCw5oc2rwcmJGTllNbEo2U00
>
>
> The help I require is primarily with the login functionality, because its
> failing. Also, is the manner I am trying to fix the wsdls correct? [Adding
> wsdl:output with message]
>
>
> Sincerely
> Sagar
>


LoginAdminServiceClient.java
Description: Binary data
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Harsha Thirimanna
On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe  wrote:

>
>
> On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby 
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna 
>> wrote:
>>
>>> Hi All,
>>>
>>> I think we feel like both pros and cons because of these data file are
>>> located under the configurations. These are not actually config files and
>>> as Kasun said if these are under the config folder then anyone can feel to
>>> change and expect the changes in system after restarting. And same as Johan
>>> said, we can explain in the documentation clearly about the behaviour.
>>>
>>> As an alternative solution, can't we have such files in some different
>>> root folder but not under the config or deployment ,because of these files
>>> are not either deployable artifact or configs. Then users will not
>>> misunderstand about these files and there can be its own behaviour as what
>>> we have now.
>>>
>>
>>> *Harsha Thirimanna*
>>> *Associate Tech Lead | WSO2*
>>>
>>> Email: hars...@wso2.com
>>> Mob: +94715186770 <+94%2071%20518%206770>
>>> Blog: http://harshathirimanna.blogspot.com/
>>> Twitter: http://twitter.com/harshathirimann
>>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>>> rsha-thirimanna/10/ab8/122
>>> 
>>>
>>> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
>>> wrote:
>>>
 Hi Johann,


 On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
 wrote:

> Hi,
>
> email-admin-config.xml has the default email templates that are used
> for Email notifications.
> Since we have a UI to add/update new Email templates I don't think the
> user has to go to the registry and do any modifications.
>
>
> Thanks,
> Farasath
>
> Farasath Ahamed
> Software Engineer, WSO2 Inc.; http://wso2.com
> Mobile: +94777603866
> Blog: blog.farazath.com
> Twitter: @farazath619 
> 
>
>
>
> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
> wrote:
>
>> Hi Kasun,
>>
>> I don't think we need to do this because,
>>
>> 1. This is the model we follow for some other files as well.
>> claim-config.xml
>> identity-event.properties
>>
>>
 Yes, I think Isura mentioned the same. Let me revise my original query.
 The problem I was trying to address is:

 1. There is a config file under repository/conf/ which is only read
 during start-up. Since it is read once, should it really be in the
 repository/conf/?

 2. If a config file is there under repository/conf/, then users expect
 any changes to it will be visible to users. It is not that intuitive for a
 first time user IMO.

>>>
 As the product is quite matured, I think it may be better to look into
 these aspects to make the first time user experience better.  Hence, the
 request for $subject.

>>>
>> Agreed. We may be able to improve this.
>>
>>
> Cool.. :) My suggestion is to honor the changes to the file. So, if the
> file hash is changed, we re-upload the changes.
>
> MD5 hash can be stored in registry as a property along with the email
> templates. It is a simple change to [1] as I understand.
>

​But after some one change from the UI then it will update the changes in
registry. But it is not reflected in the file. Again if some one change in
the file, then registry will override the changes in registry that is
changed by the UI. Is this expected ?
​

>
> [1] https://github.com/wso2-extensions/identity-event-
> handler-notification/blob/master/components/email-mgt/
> org.wso2.carbon.email.mgt/src/main/java/org/wso2/carbon/email/mgt/
> EmailTemplateManagerImpl.java#L78
>
>
>>


> 2. This content goes not only to the super tenant but also to tenants
>> as default email templates. So if we change it in the middle tenants
>> created until then will have a different default template and the ones
>> created after that will have a different default template.
>>
>>
 Yes, this is the current behavior, isn't it?

>>>
>> Yes. This is the current behavior.
>>
>>
>>>
 Thanks for your feedback.


> I don't think we have any problems with current model. If we do this
>> we need to change our migration, etc. If the issue here is clarity for 
>> the
>> users it is better we explain it using better wordings in the docs.
>>
>> Regards,
>> Johann.
>>
>> -- Forwarded message --
>> From: Kasun Gajasinghe (JIRA) 
>> Date: Wed, Jul 19, 2017 at 1:54 AM
>> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
>> email-admin-config.xml file
>> To: joh...@wso2.com
>>
>>
>> Kasun Gajasinghe
>> 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread KasunG Gajasinghe
On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby  wrote:

>
>
> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna 
> wrote:
>
>> Hi All,
>>
>> I think we feel like both pros and cons because of these data file are
>> located under the configurations. These are not actually config files and
>> as Kasun said if these are under the config folder then anyone can feel to
>> change and expect the changes in system after restarting. And same as Johan
>> said, we can explain in the documentation clearly about the behaviour.
>>
>> As an alternative solution, can't we have such files in some different
>> root folder but not under the config or deployment ,because of these files
>> are not either deployable artifact or configs. Then users will not
>> misunderstand about these files and there can be its own behaviour as what
>> we have now.
>>
>
>> *Harsha Thirimanna*
>> *Associate Tech Lead | WSO2*
>>
>> Email: hars...@wso2.com
>> Mob: +94715186770 <+94%2071%20518%206770>
>> Blog: http://harshathirimanna.blogspot.com/
>> Twitter: http://twitter.com/harshathirimann
>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>> rsha-thirimanna/10/ab8/122
>> 
>>
>> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
>> wrote:
>>
>>> Hi Johann,
>>>
>>>
>>> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
>>> wrote:
>>>
 Hi,

 email-admin-config.xml has the default email templates that are used
 for Email notifications.
 Since we have a UI to add/update new Email templates I don't think the
 user has to go to the registry and do any modifications.


 Thanks,
 Farasath

 Farasath Ahamed
 Software Engineer, WSO2 Inc.; http://wso2.com
 Mobile: +94777603866
 Blog: blog.farazath.com
 Twitter: @farazath619 
 



 On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
 wrote:

> Hi Kasun,
>
> I don't think we need to do this because,
>
> 1. This is the model we follow for some other files as well.
> claim-config.xml
> identity-event.properties
>
>
>>> Yes, I think Isura mentioned the same. Let me revise my original query.
>>> The problem I was trying to address is:
>>>
>>> 1. There is a config file under repository/conf/ which is only read
>>> during start-up. Since it is read once, should it really be in the
>>> repository/conf/?
>>>
>>> 2. If a config file is there under repository/conf/, then users expect
>>> any changes to it will be visible to users. It is not that intuitive for a
>>> first time user IMO.
>>>
>>
>>> As the product is quite matured, I think it may be better to look into
>>> these aspects to make the first time user experience better.  Hence, the
>>> request for $subject.
>>>
>>
> Agreed. We may be able to improve this.
>
>
Cool.. :) My suggestion is to honor the changes to the file. So, if the
file hash is changed, we re-upload the changes.

MD5 hash can be stored in registry as a property along with the email
templates. It is a simple change to [1] as I understand.

[1]
https://github.com/wso2-extensions/identity-event-handler-notification/blob/master/components/email-mgt/org.wso2.carbon.email.mgt/src/main/java/org/wso2/carbon/email/mgt/EmailTemplateManagerImpl.java#L78


>
>>>
>>>
 2. This content goes not only to the super tenant but also to tenants
> as default email templates. So if we change it in the middle tenants
> created until then will have a different default template and the ones
> created after that will have a different default template.
>
>
>>> Yes, this is the current behavior, isn't it?
>>>
>>
> Yes. This is the current behavior.
>
>
>>
>>> Thanks for your feedback.
>>>
>>>
 I don't think we have any problems with current model. If we do this we
> need to change our migration, etc. If the issue here is clarity for the
> users it is better we explain it using better wordings in the docs.
>
> Regards,
> Johann.
>
> -- Forwarded message --
> From: Kasun Gajasinghe (JIRA) 
> Date: Wed, Jul 19, 2017 at 1:54 AM
> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
> email-admin-config.xml file
> To: joh...@wso2.com
>
>
> Kasun Gajasinghe
> 
> *created* an issue
>
> WSO2 Identity Server  / [image:
> Improvement] 
> IDENTITY-6167 
> Need to honor modifications to email-admin-config.xml file
> 
> Issue Type: [image: Improvement] Improvement
> Affects Versions: 5.3.0-GA
> Assignee: Johann 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Johann Nallathamby
On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna  wrote:

> Hi All,
>
> I think we feel like both pros and cons because of these data file are
> located under the configurations. These are not actually config files and
> as Kasun said if these are under the config folder then anyone can feel to
> change and expect the changes in system after restarting. And same as Johan
> said, we can explain in the documentation clearly about the behaviour.
>
> As an alternative solution, can't we have such files in some different
> root folder but not under the config or deployment ,because of these files
> are not either deployable artifact or configs. Then users will not
> misunderstand about these files and there can be its own behaviour as what
> we have now.
>

> *Harsha Thirimanna*
> *Associate Tech Lead | WSO2*
>
> Email: hars...@wso2.com
> Mob: +94715186770 <+94%2071%20518%206770>
> Blog: http://harshathirimanna.blogspot.com/
> Twitter: http://twitter.com/harshathirimann
> Linked-In: linked-in: http://www.linkedin.com/pub/
> harsha-thirimanna/10/ab8/122
> 
>
> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
> wrote:
>
>> Hi Johann,
>>
>>
>> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
>> wrote:
>>
>>> Hi,
>>>
>>> email-admin-config.xml has the default email templates that are used for
>>> Email notifications.
>>> Since we have a UI to add/update new Email templates I don't think the
>>> user has to go to the registry and do any modifications.
>>>
>>>
>>> Thanks,
>>> Farasath
>>>
>>> Farasath Ahamed
>>> Software Engineer, WSO2 Inc.; http://wso2.com
>>> Mobile: +94777603866
>>> Blog: blog.farazath.com
>>> Twitter: @farazath619 
>>> 
>>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
>>> wrote:
>>>
 Hi Kasun,

 I don't think we need to do this because,

 1. This is the model we follow for some other files as well.
 claim-config.xml
 identity-event.properties


>> Yes, I think Isura mentioned the same. Let me revise my original query.
>> The problem I was trying to address is:
>>
>> 1. There is a config file under repository/conf/ which is only read
>> during start-up. Since it is read once, should it really be in the
>> repository/conf/?
>>
>> 2. If a config file is there under repository/conf/, then users expect
>> any changes to it will be visible to users. It is not that intuitive for a
>> first time user IMO.
>>
>
>> As the product is quite matured, I think it may be better to look into
>> these aspects to make the first time user experience better.  Hence, the
>> request for $subject.
>>
>
Agreed. We may be able to improve this.


>>
>>
>>> 2. This content goes not only to the super tenant but also to tenants as
 default email templates. So if we change it in the middle tenants created
 until then will have a different default template and the ones created
 after that will have a different default template.


>> Yes, this is the current behavior, isn't it?
>>
>
Yes. This is the current behavior.


>
>> Thanks for your feedback.
>>
>>
>>> I don't think we have any problems with current model. If we do this we
 need to change our migration, etc. If the issue here is clarity for the
 users it is better we explain it using better wordings in the docs.

 Regards,
 Johann.

 -- Forwarded message --
 From: Kasun Gajasinghe (JIRA) 
 Date: Wed, Jul 19, 2017 at 1:54 AM
 Subject: [jira] (IDENTITY-6167) Need to honor modifications to
 email-admin-config.xml file
 To: joh...@wso2.com


 Kasun Gajasinghe
 
 *created* an issue

 WSO2 Identity Server  / [image:
 Improvement]  IDENTITY-6167
 
 Need to honor modifications to email-admin-config.xml file
 
 Issue Type: [image: Improvement] Improvement
 Affects Versions: 5.3.0-GA
 Assignee: Johann Nallathamby
 
 Created: 19/Jul/17 1:53 AM
 Fix Versions: 5.4.0-GA
 Priority: [image: High] High
 Reporter: Kasun Gajasinghe
 

 At the moment, we save the email-admin-config.xml in the registry
 during the very first server startup. After that, changes to the file are
 not picked up. So, users are forced to go to the registry to update the
 config.

 This is a bit confusing since a user probably expects that the changes
 to the file will be honored especially since it is located under

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Harsha Thirimanna
Hi All,

I think we feel like both pros and cons because of these data file are
located under the configurations. These are not actually config files and
as Kasun said if these are under the config folder then anyone can feel to
change and expect the changes in system after restarting. And same as Johan
said, we can explain in the documentation clearly about the behaviour.

As an alternative solution, can't we have such files in some different root
folder but not under the config or deployment ,because of these files are
not either deployable artifact or configs. Then users will not
misunderstand about these files and there can be its own behaviour as what
we have now.

*Harsha Thirimanna*
*Associate Tech Lead | WSO2*

Email: hars...@wso2.com
Mob: +94715186770
Blog: http://harshathirimanna.blogspot.com/
Twitter: http://twitter.com/harshathirimann
Linked-In: linked-in:
http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122


On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe  wrote:

> Hi Johann,
>
>
> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
> wrote:
>
>> Hi,
>>
>> email-admin-config.xml has the default email templates that are used for
>> Email notifications.
>> Since we have a UI to add/update new Email templates I don't think the
>> user has to go to the registry and do any modifications.
>>
>>
>> Thanks,
>> Farasath
>>
>> Farasath Ahamed
>> Software Engineer, WSO2 Inc.; http://wso2.com
>> Mobile: +94777603866
>> Blog: blog.farazath.com
>> Twitter: @farazath619 
>> 
>>
>>
>>
>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
>> wrote:
>>
>>> Hi Kasun,
>>>
>>> I don't think we need to do this because,
>>>
>>> 1. This is the model we follow for some other files as well.
>>> claim-config.xml
>>> identity-event.properties
>>>
>>>
> Yes, I think Isura mentioned the same. Let me revise my original query.
> The problem I was trying to address is:
>
> 1. There is a config file under repository/conf/ which is only read during
> start-up. Since it is read once, should it really be in the
> repository/conf/?
>
> 2. If a config file is there under repository/conf/, then users expect any
> changes to it will be visible to users. It is not that intuitive for a
> first time user IMO.
>
> As the product is quite matured, I think it may be better to look into
> these aspects to make the first time user experience better.  Hence, the
> request for $subject.
>
>
>
>> 2. This content goes not only to the super tenant but also to tenants as
>>> default email templates. So if we change it in the middle tenants created
>>> until then will have a different default template and the ones created
>>> after that will have a different default template.
>>>
>>>
> Yes, this is the current behavior, isn't it?
>
> Thanks for your feedback.
>
>
>> I don't think we have any problems with current model. If we do this we
>>> need to change our migration, etc. If the issue here is clarity for the
>>> users it is better we explain it using better wordings in the docs.
>>>
>>> Regards,
>>> Johann.
>>>
>>> -- Forwarded message --
>>> From: Kasun Gajasinghe (JIRA) 
>>> Date: Wed, Jul 19, 2017 at 1:54 AM
>>> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
>>> email-admin-config.xml file
>>> To: joh...@wso2.com
>>>
>>>
>>> Kasun Gajasinghe
>>> 
>>> *created* an issue
>>>
>>> WSO2 Identity Server  / [image:
>>> Improvement]  IDENTITY-6167
>>> 
>>> Need to honor modifications to email-admin-config.xml file
>>> 
>>> Issue Type: [image: Improvement] Improvement
>>> Affects Versions: 5.3.0-GA
>>> Assignee: Johann Nallathamby
>>> 
>>> Created: 19/Jul/17 1:53 AM
>>> Fix Versions: 5.4.0-GA
>>> Priority: [image: High] High
>>> Reporter: Kasun Gajasinghe
>>> 
>>>
>>> At the moment, we save the email-admin-config.xml in the registry during
>>> the very first server startup. After that, changes to the file are not
>>> picked up. So, users are forced to go to the registry to update the config.
>>>
>>> This is a bit confusing since a user probably expects that the changes
>>> to the file will be honored especially since it is located under
>>> repository/conf folder.
>>>
>>> We can do some hashing mechanism and verify whether the contents in the
>>> registry and the file matches. And, then we can update the registry
>>> accordingly.
>>> [image: Add Comment]
>>>  Add Comment
>>> 

[Dev] [IS] Issue with prioritizing session time out period configuration

2017-07-26 Thread Sathya Bandara
Hi all,

In the current implementation we can configure the session time out for the
Identity Server via the resident realm configuration (Idle Session Time
Out). In addition, with the following configuration in identity.xml we can
specify a maxAge parameter on cookies in order to configure the session
time out periods (cookie expiration time).



**

If this parameter value is specified, in our implementation we give
priority to max age value configured through the identity.xml over session
time out value configured in the resident IDP [1].

But for the scenario where in a tenant mode, if the session time out period
needs to be customized(reduced) for security reasons, if max age value is
specified in the configuration file priority will be given to that rather
than the customized session idle time out for that tenant. is this a valid
use case?

Highly appreciate your thoughts on this.


[1]
https://github.com/wso2-extensions/identity-inbound-auth-saml/blob/5.3.x/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLSSOProviderServlet.java#L854

Thanks,
Sathya

-- 
Sathya Bandara
Software Engineer
WSO2 Inc. http://wso2.com
Mobile: (+94) 715 360 421 <+94%2071%20411%205032>

<+94%2071%20411%205032>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Cipher Tool][WIndows] CARBON_HOME persists after ciphertool.bat execution

2017-07-26 Thread Manuri Amaya Perera
Hi,

Since $subject, if cipher tool is run on another server in the same
environment, the passwords of that server will not be encrypted. I've sent
a PR[1] to set environment variables locally to avoid this.
Please review and merge.
Please kindly consider releasing cipher tool with the fix for this issue
since we would like to have this fixed for EI 6.2.0 release.

[1] https://github.com/wso2/cipher-tool/pull/26

Thanks,
Manuri

-- 

*Manuri Amaya Perera*

*Software Engineer*

*WSO2 Inc.*

*Blog: http://manuriamayaperera.blogspot.com
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread KasunG Gajasinghe
Hi Johann,


On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed  wrote:

> Hi,
>
> email-admin-config.xml has the default email templates that are used for
> Email notifications.
> Since we have a UI to add/update new Email templates I don't think the
> user has to go to the registry and do any modifications.
>
>
> Thanks,
> Farasath
>
> Farasath Ahamed
> Software Engineer, WSO2 Inc.; http://wso2.com
> Mobile: +94777603866
> Blog: blog.farazath.com
> Twitter: @farazath619 
> 
>
>
>
> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
> wrote:
>
>> Hi Kasun,
>>
>> I don't think we need to do this because,
>>
>> 1. This is the model we follow for some other files as well.
>> claim-config.xml
>> identity-event.properties
>>
>>
Yes, I think Isura mentioned the same. Let me revise my original query. The
problem I was trying to address is:

1. There is a config file under repository/conf/ which is only read during
start-up. Since it is read once, should it really be in the
repository/conf/?

2. If a config file is there under repository/conf/, then users expect any
changes to it will be visible to users. It is not that intuitive for a
first time user IMO.

As the product is quite matured, I think it may be better to look into
these aspects to make the first time user experience better.  Hence, the
request for $subject.



> 2. This content goes not only to the super tenant but also to tenants as
>> default email templates. So if we change it in the middle tenants created
>> until then will have a different default template and the ones created
>> after that will have a different default template.
>>
>>
Yes, this is the current behavior, isn't it?

Thanks for your feedback.


> I don't think we have any problems with current model. If we do this we
>> need to change our migration, etc. If the issue here is clarity for the
>> users it is better we explain it using better wordings in the docs.
>>
>> Regards,
>> Johann.
>>
>> -- Forwarded message --
>> From: Kasun Gajasinghe (JIRA) 
>> Date: Wed, Jul 19, 2017 at 1:54 AM
>> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
>> email-admin-config.xml file
>> To: joh...@wso2.com
>>
>>
>> Kasun Gajasinghe
>> 
>> *created* an issue
>>
>> WSO2 Identity Server  / [image:
>> Improvement]  IDENTITY-6167
>> 
>> Need to honor modifications to email-admin-config.xml file
>> 
>> Issue Type: [image: Improvement] Improvement
>> Affects Versions: 5.3.0-GA
>> Assignee: Johann Nallathamby
>> 
>> Created: 19/Jul/17 1:53 AM
>> Fix Versions: 5.4.0-GA
>> Priority: [image: High] High
>> Reporter: Kasun Gajasinghe
>> 
>>
>> At the moment, we save the email-admin-config.xml in the registry during
>> the very first server startup. After that, changes to the file are not
>> picked up. So, users are forced to go to the registry to update the config.
>>
>> This is a bit confusing since a user probably expects that the changes to
>> the file will be honored especially since it is located under
>> repository/conf folder.
>>
>> We can do some hashing mechanism and verify whether the contents in the
>> registry and the file matches. And, then we can update the registry
>> accordingly.
>> [image: Add Comment]
>>  Add Comment
>> 
>>
>> This message was sent by Atlassian JIRA (v7.2.2#72004-sha1:9d51328)
>> [image: Atlassian logo]
>>
>>
>>
>> --
>> Thanks & Regards,
>>
>> *Johann Dilantha Nallathamby*
>> Senior Lead Solutions Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - *+9476950*
>> Blog - *http://nallaa.wordpress.com *
>>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error while run the connector integrationTest

2017-07-26 Thread Rajjaz Mohammed
Hi All,

I can able solve this issue by reducing the synapse version to
2.1.3-wso2v11[1] from 3.0.0[2].

[1]2.1.3-wso2v11
[2]3.0.0


On Wed, Jul 26, 2017 at 2:06 PM, Rajjaz Mohammed  wrote:

> Hi all,
> I got the following error when I tried to run the integration test for JMS
> connector.
>
> Any idea?
>
> [2017-07-26 13:56:13,708]  INFO {org.apache.axis2.deployment.ModuleDeployer}
> -  Deploying module: pagination-4.2.0 - file:/home/rajjaz/.m2/
> repository/org/wso2/carbon/org.wso2.carbon.registry.
> server/4.2.0/org.wso2.carbon.registry.server-4.2.0.jar
> org.apache.maven.surefire.util.SurefireReflectionException:
> java.lang.reflect.InvocationTargetException; nested exception is
> java.lang.reflect.InvocationTargetException: null
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.apache.maven.surefire.util.ReflectionUtils.
> invokeMethodWithArray(ReflectionUtils.java:189)
> at org.apache.maven.surefire.booter.ProviderFactory$
> ProviderProxy.invoke(ProviderFactory.java:165)
> at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(
> ProviderFactory.java:85)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(
> ForkedBooter.java:115)
> at org.apache.maven.surefire.booter.ForkedBooter.main(
> ForkedBooter.java:75)
> Caused by: java.lang.NoClassDefFoundError: org/apache/axiom/om/
> QNameAwareOMDataSource
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at java.security.SecureClassLoader.defineClass(
> SecureClassLoader.java:142)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
> at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at java.security.SecureClassLoader.defineClass(
> SecureClassLoader.java:142)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
> at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at org.wso2.carbon.authenticator.stub.Login.getOMElement(Login.
> java:168)
> at org.wso2.carbon.authenticator.stub.AuthenticationAdminStub.
> toEnvelope(AuthenticationAdminStub.java:2288)
> at org.wso2.carbon.authenticator.stub.AuthenticationAdminStub.
> login(AuthenticationAdminStub.java:642)
> at org.wso2.carbon.automation.api.clients.authenticators.
> AuthenticatorClient.login(AuthenticatorClient.java:59)
> at org.wso2.carbon.automation.core.utils.LoginLogoutUtil.
> login(LoginLogoutUtil.java:53)
> at org.wso2.carbon.automation.core.utils.ClientConnectionUtil.
> waitForLogin(ClientConnectionUtil.java:52)
> at org.wso2.carbon.automation.core.utils.serverutils.ServerUtils.
> startServerUsingCarbonHome(ServerUtils.java:143)
> at org.wso2.carbon.automation.core.ServerGroupManager.startServer(
> ServerGroupManager.java:92)
> at org.wso2.carbon.automation.core.ServerGroupManager.
> startServersForBuilder(ServerGroupManager.java:98)
> at org.wso2.carbon.automation.core.PlatformExecutionManager.
> startSevers(PlatformExecutionManager.java:187)
> at org.wso2.carbon.automation.core.PlatformExecutionManager.
> onExecutionStart(PlatformExecutionManager.java:76)
> at org.testng.TestNG.runExecutionListeners(TestNG.java:1032)
> at org.testng.TestNG.run(TestNG.java:983)
> at org.apache.maven.surefire.testng.TestNGExecutor.run(
> TestNGExecutor.java:178)
> at org.apache.maven.surefire.testng.TestNGXmlTestSuite.
> execute(TestNGXmlTestSuite.java:92)
> at org.apache.maven.surefire.testng.TestNGProvider.invoke(
> TestNGProvider.java:96)
> ... 9 more
> Caused by: 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Farasath Ahamed
Hi,

email-admin-config.xml has the default email templates that are used for
Email notifications.
Since we have a UI to add/update new Email templates I don't think the user
has to go to the registry and do any modifications.


Thanks,
Farasath

Farasath Ahamed
Software Engineer, WSO2 Inc.; http://wso2.com
Mobile: +94777603866
Blog: blog.farazath.com
Twitter: @farazath619 




On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby  wrote:

> Hi Kasun,
>
> I don't think we need to do this because,
>
> 1. This is the model we follow for some other files as well.
> claim-config.xml
> identity-event.properties
>
> 2. This content goes not only to the super tenant but also to tenants as
> default email templates. So if we change it in the middle tenants created
> until then will have a different default template and the ones created
> after that will have a different default template.
>
> I don't think we have any problems with current model. If we do this we
> need to change our migration, etc. If the issue here is clarity for the
> users it is better we explain it using better wordings in the docs.
>
> Regards,
> Johann.
>
> -- Forwarded message --
> From: Kasun Gajasinghe (JIRA) 
> Date: Wed, Jul 19, 2017 at 1:54 AM
> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
> email-admin-config.xml file
> To: joh...@wso2.com
>
>
> Kasun Gajasinghe
> 
> *created* an issue
>
> WSO2 Identity Server  / [image:
> Improvement]  IDENTITY-6167
> 
> Need to honor modifications to email-admin-config.xml file
> 
> Issue Type: [image: Improvement] Improvement
> Affects Versions: 5.3.0-GA
> Assignee: Johann Nallathamby
> 
> Created: 19/Jul/17 1:53 AM
> Fix Versions: 5.4.0-GA
> Priority: [image: High] High
> Reporter: Kasun Gajasinghe
> 
>
> At the moment, we save the email-admin-config.xml in the registry during
> the very first server startup. After that, changes to the file are not
> picked up. So, users are forced to go to the registry to update the config.
>
> This is a bit confusing since a user probably expects that the changes to
> the file will be honored especially since it is located under
> repository/conf folder.
>
> We can do some hashing mechanism and verify whether the contents in the
> registry and the file matches. And, then we can update the registry
> accordingly.
> [image: Add Comment]
>  Add Comment
> 
>
> This message was sent by Atlassian JIRA (v7.2.2#72004-sha1:9d51328)
> [image: Atlassian logo]
>
>
>
> --
> Thanks & Regards,
>
> *Johann Dilantha Nallathamby*
> Senior Lead Solutions Engineer
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - *+9476950*
> Blog - *http://nallaa.wordpress.com *
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MSF4J] Custom Interceptors in MSF4J 2.1.0

2017-07-26 Thread Thusitha Thilina Dayaratne
Hi Isuranga,
>
>
> If I'm not mistaken unlike standalone mode,  msf4j OSGI mode uses one
> MicroserviceRunner for all micro services. In that case if I'm to start a
> new MicroserviceRegistry then It should be under a separate port number
> and that way I can add resource group specific interceptors. Please correct
> me If I'm wrong.

In OSGi mode there aren't any MicroserviceRunner. There will be a separate
MicroserviceRegistry for each ListenerConfiguration. If you want to deploy
an Interceptor to a specific registry you need to set the property to the
CHANNEL_ID[1] relevant listener configuration id when you register the
Interceptor.

[1] -
https://github.com/wso2/msf4j/blob/v2.1.0/core/src/main/java/org/wso2/msf4j/internal/MicroservicesServerSC.java#L175

Thanks
Thusitha


On Wed, Jul 26, 2017 at 1:47 PM, Isuranga Perera 
wrote:

> Hi Thusitha,
>
> Thanks Thusith.
>
> If I'm not mistaken unlike standalone mode,  msf4j OSGI mode uses one
> MicroserviceRunner for all micro services. In that case if I'm to start a
> new MicroserviceRegistry then It should be under a separate port number
> and that way I can add resource group specific interceptors. Please correct
> me If I'm wrong.
>
> On Wed, Jul 26, 2017 at 6:35 AM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Isuranga,
>>
>> In 2.1.0 we only support global interceptors. Resource level interceptors
>> were introduced in 2.3.0-m2.
>>
>> Thanks
>> Thusitha
>>
>> On Tue, Jul 25, 2017 at 11:55 PM, Isuranga Perera <
>> isurangamper...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Is it possible to plug custom interceptors for micro-services  in msf4j
>>> 2.1.0. (per service not globally)
>>>
>>> Best Regards
>>> Isuranga Perera
>>>
>>
>>
>>
>> --
>> Thusitha Dayaratne
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> Mobile  +94712756809 <+94%2071%20275%206809>
>> Blog  alokayasoya.blogspot.com
>> Abouthttp://about.me/thusithathilina
>> 
>>
>>
>


-- 
Thusitha Dayaratne
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog  alokayasoya.blogspot.com
Abouthttp://about.me/thusithathilina

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Error while run the connector integrationTest

2017-07-26 Thread Rajjaz Mohammed
Hi all,
I got the following error when I tried to run the integration test for JMS
connector.

Any idea?

[2017-07-26 13:56:13,708]  INFO
{org.apache.axis2.deployment.ModuleDeployer} -  Deploying module:
pagination-4.2.0 -
file:/home/rajjaz/.m2/repository/org/wso2/carbon/org.wso2.carbon.registry.server/4.2.0/org.wso2.carbon.registry.server-4.2.0.jar
org.apache.maven.surefire.util.SurefireReflectionException:
java.lang.reflect.InvocationTargetException; nested exception is
java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NoClassDefFoundError:
org/apache/axiom/om/QNameAwareOMDataSource
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.wso2.carbon.authenticator.stub.Login.getOMElement(Login.java:168)
at
org.wso2.carbon.authenticator.stub.AuthenticationAdminStub.toEnvelope(AuthenticationAdminStub.java:2288)
at
org.wso2.carbon.authenticator.stub.AuthenticationAdminStub.login(AuthenticationAdminStub.java:642)
at
org.wso2.carbon.automation.api.clients.authenticators.AuthenticatorClient.login(AuthenticatorClient.java:59)
at
org.wso2.carbon.automation.core.utils.LoginLogoutUtil.login(LoginLogoutUtil.java:53)
at
org.wso2.carbon.automation.core.utils.ClientConnectionUtil.waitForLogin(ClientConnectionUtil.java:52)
at
org.wso2.carbon.automation.core.utils.serverutils.ServerUtils.startServerUsingCarbonHome(ServerUtils.java:143)
at
org.wso2.carbon.automation.core.ServerGroupManager.startServer(ServerGroupManager.java:92)
at
org.wso2.carbon.automation.core.ServerGroupManager.startServersForBuilder(ServerGroupManager.java:98)
at
org.wso2.carbon.automation.core.PlatformExecutionManager.startSevers(PlatformExecutionManager.java:187)
at
org.wso2.carbon.automation.core.PlatformExecutionManager.onExecutionStart(PlatformExecutionManager.java:76)
at org.testng.TestNG.runExecutionListeners(TestNG.java:1032)
at org.testng.TestNG.run(TestNG.java:983)
at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)
at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)
... 9 more
Caused by: java.lang.ClassNotFoundException:
org.apache.axiom.om.QNameAwareOMDataSource
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at 

Re: [Dev] [MSF4J] Custom Interceptors in MSF4J 2.1.0

2017-07-26 Thread Isuranga Perera
Hi Thusitha,

Thanks Thusith.

If I'm not mistaken unlike standalone mode,  msf4j OSGI mode uses one
MicroserviceRunner for all micro services. In that case if I'm to start a
new MicroserviceRegistry then It should be under a separate port number
and that way I can add resource group specific interceptors. Please correct
me If I'm wrong.

On Wed, Jul 26, 2017 at 6:35 AM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Isuranga,
>
> In 2.1.0 we only support global interceptors. Resource level interceptors
> were introduced in 2.3.0-m2.
>
> Thanks
> Thusitha
>
> On Tue, Jul 25, 2017 at 11:55 PM, Isuranga Perera <
> isurangamper...@gmail.com> wrote:
>
>> Hi,
>>
>> Is it possible to plug custom interceptors for micro-services  in msf4j
>> 2.1.0. (per service not globally)
>>
>> Best Regards
>> Isuranga Perera
>>
>
>
>
> --
> Thusitha Dayaratne
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> Mobile  +94712756809 <+94%2071%20275%206809>
> Blog  alokayasoya.blogspot.com
> Abouthttp://about.me/thusithathilina
> 
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Johann Nallathamby
Hi Kasun,

I don't think we need to do this because,

1. This is the model we follow for some other files as well.
claim-config.xml
identity-event.properties

2. This content goes not only to the super tenant but also to tenants as
default email templates. So if we change it in the middle tenants created
until then will have a different default template and the ones created
after that will have a different default template.

I don't think we have any problems with current model. If we do this we
need to change our migration, etc. If the issue here is clarity for the
users it is better we explain it using better wordings in the docs.

Regards,
Johann.

-- Forwarded message --
From: Kasun Gajasinghe (JIRA) 
Date: Wed, Jul 19, 2017 at 1:54 AM
Subject: [jira] (IDENTITY-6167) Need to honor modifications to
email-admin-config.xml file
To: joh...@wso2.com


Kasun Gajasinghe

*created* an issue

WSO2 Identity Server  / [image:
Improvement]  IDENTITY-6167

Need to honor modifications to email-admin-config.xml file

Issue Type: [image: Improvement] Improvement
Affects Versions: 5.3.0-GA
Assignee: Johann Nallathamby

Created: 19/Jul/17 1:53 AM
Fix Versions: 5.4.0-GA
Priority: [image: High] High
Reporter: Kasun Gajasinghe


At the moment, we save the email-admin-config.xml in the registry during
the very first server startup. After that, changes to the file are not
picked up. So, users are forced to go to the registry to update the config.

This is a bit confusing since a user probably expects that the changes to
the file will be honored especially since it is located under
repository/conf folder.

We can do some hashing mechanism and verify whether the contents in the
registry and the file matches. And, then we can update the registry
accordingly.
[image: Add Comment]
 Add Comment


This message was sent by Atlassian JIRA (v7.2.2#72004-sha1:9d51328)
[image: Atlassian logo]



-- 
Thanks & Regards,

*Johann Dilantha Nallathamby*
Senior Lead Solutions Engineer
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+9476950*
Blog - *http://nallaa.wordpress.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev