Re: [Dev] How to get the Maven project version into a shell script?

2018-04-17 Thread Nipuni Bhagya
Hi,

Thanks for the quick response.

If you can run the shell script as a step in maven process, you can easily
> pass the ${project.version} using exec-maven-plugin
>

Hi Amalka,

The issue is we run the script after maven process.


> You can use xmlstarlet to read the version of the project without adding a
>> maven plugin to POM file. I used this to read XML values in the command
>> line. An example can be found here [2]
>>
>> [1]: http://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html
>> [2]: https://stackoverflow.com/questions/12640152/xmlstarlet-select-value
>>
>
Hi Abimaran,

It was initially decided not to use any external tools for this task. So we
will need an approach which does not require any external XML tools.

-- 



*Kind Regards,Nipuni Bhagya*

*Software Engineering Intern*
*WSO2*



*Mobile : +94 0779028904 <+94%2077%20767%201807>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to get the Maven project version into a shell script?

2018-04-17 Thread Amalka Subasinghe
If you can run the shell script as a step in maven process, you can easily
pass the ${project.version} using exec-maven-plugin

On Wed, Apr 18, 2018 at 9:36 AM, Abimaran Kugathasan 
wrote:

> Hi Nipuni,
>
> You can use xmlstarlet to read the version of the project without adding
> a maven plugin to POM file. I used this to read XML values in the command
> line. An example can be found here [2]
>
> [1]: http://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html
> [2]: https://stackoverflow.com/questions/12640152/xmlstarlet-select-value
>
> On Tue, Apr 17, 2018 at 2:37 PM, Nipuni Bhagya  wrote:
>
>> Hi all,
>>
>> I have encountered a problem while trying to get the version number of a
>> jar into a shell script. Currently, the name of the jar is hardcoded in the
>> script. But the problem is when the maven version get updated in the
>> project it should reflect in the script. The closest solution I have come
>> up at the moment is to use the Maven Help Plugin
>> . The
>> goal help:evaluate can evaluate Maven expression,
>> -Dexpression=project.version and then I can grep the version from its
>> result.
>>
>> I would really appreciate if someone of you could help me to find a
>> better way to achieve this task.
>>
>> Thank you in advance,
>>
>> --
>>
>>
>>
>> *Kind Regards,Nipuni Bhagya*
>>
>> *Software Engineering Intern*
>> *WSO2*
>>
>>
>>
>> *Mobile : +94 0779028904 <+94%2077%20767%201807>*
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer - API Technologies
>
> Email : abima...@wso2.com
> Mobile : +94 773922820
>
> 
> 
>   
> 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Amalka Subasinghe

WSO2 Inc. https://wso2.com/
Mobile: +94 77 9401267
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to get the Maven project version into a shell script?

2018-04-17 Thread Abimaran Kugathasan
Hi Nipuni,

You can use xmlstarlet to read the version of the project without adding a
maven plugin to POM file. I used this to read XML values in the command
line. An example can be found here [2]

[1]: http://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html
[2]: https://stackoverflow.com/questions/12640152/xmlstarlet-select-value

On Tue, Apr 17, 2018 at 2:37 PM, Nipuni Bhagya  wrote:

> Hi all,
>
> I have encountered a problem while trying to get the version number of a
> jar into a shell script. Currently, the name of the jar is hardcoded in the
> script. But the problem is when the maven version get updated in the
> project it should reflect in the script. The closest solution I have come
> up at the moment is to use the Maven Help Plugin
> . The
> goal help:evaluate can evaluate Maven expression,
> -Dexpression=project.version and then I can grep the version from its
> result.
>
> I would really appreciate if someone of you could help me to find a better
> way to achieve this task.
>
> Thank you in advance,
>
> --
>
>
>
> *Kind Regards,Nipuni Bhagya*
>
> *Software Engineering Intern*
> *WSO2*
>
>
>
> *Mobile : +94 0779028904 <+94%2077%20767%201807>*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Email : abima...@wso2.com
Mobile : +94 773922820


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


Re: [Dev] WSO2 EI - org.apache.cxf.jaxws.spi.ProviderImpl not found

2018-04-17 Thread Júnior
I tried adding the cxf-bundle:cxf-bundle-2.2.5.jar

And I am receiving this error:

gogo: BundleException: The bundle "org.apache.cxf.bundle_2.2.5 [172]" could
not be resolved. Reason: Missing Constraint: Import-Package:
javax.activation; version="[1.1.0,2.0.0)"
osgi>

Do you know hwo to add this dependency?

Thanks,

2018-04-17 6:16 GMT-03:00 Júnior :

> Hi Shakila,
>
> I am not building the jar, it is a third party jar. As I could see, It has
> no reference tô cxf, but only jax-ws.
>
> I am trying to add the required jars to the dropins folder, this is still
> in progress.
>
> Getting the jars from wso2/lib/runtimes/cxf
>
> Thanks
>
> Em ter, 17 de abr de 2018 00:32, Shakila Sasikaran 
> escreveu:
>
>> Hi,
>>
>> I hope you are building this jar from a maven project. Could you please
>> share the pom file of this application? Could you please import the
>> relevant package (org.apache.cxf.jaxws.spi) with correct version and
>> try?
>>
>> Thanks
>>
>> On Tue, Apr 17, 2018 at 5:12 AM, Júnior  wrote:
>>
>>> Hi,
>>>
>>> I am adding a jar file that uses a JAX-WS client to invoke a web
>>> service. When I am trying to execute the code, I am getting this error:
>>>
>>> javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider
>>> org.apache.cxf.jaxws.spi.ProviderImpl not found
>>>
>>> Caused by: javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider
>>> org.apache.cxf.jaxws.spi.ProviderImpl not found
>>> at javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:130)
>>> at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
>>> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:124)
>>> at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)
>>> at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:211)
>>> at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
>>> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
>>> at javax.xml.ws.spi.Provider.provider(Provider.java:43)
>>> at javax.xml.ws.Service.(Service.java:35)
>>>
>>>
>>> Do you know how to overcome this error?
>>>
>>> Thanks,
>>>
>>> --
>>> Francisco Ribeiro
>>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Shakila Sasikaran
>> Software Engineer
>> Mobile :+94 (0) 77 526 6848
>> shak...@wso2.com
>> WSO2, Inc.
>> lean . enterprise . middleware
>> http://www.wso2.com/
>>
>


-- 
Francisco Ribeiro
*SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Issues with extra claims when using self signed tokens

2018-04-17 Thread Ciprian Sabolovits
Hello,

We are running WSO2 IS 550 using self signed tokens,. However it seems that we 
are not able to add any additional OpenID Claims to the JWT tokens. Whenever 
mapping a claim in a Service Provider as per the below a null pointer 
exceptions is thrown.


  1.  Enabled Self Signed Tokens in identity.xml
  2.  Configured new service provider
 *   Added email address in the claim configuration

[cid:image001.png@01D3D62D.874B0770]

 *   Enabled OAuth.OpenID connect configuration
 *   Create a new scope for email
  1.  Whenever trying to get a token with a request

curl --request POST \
  --url https://localhost:9443/oauth2/token \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data 
'grant_type=password_id=CLIENT-ID_secret=CLIENT-SECRET=foo=foopass=openid%20esante'



the following error and stacktrace is returned

[2018-04-17 07:16:36,155] ERROR {org.wso2.carbon.identity.oauth2.OAuth2Service} 
-  Error occurred while issuing the access token for Client ID : 
QWEQWEWQEsasdasda, User ID foo, Scope : [esante, openid] and Grant Type : 
password
java.lang.NullPointerException
at 
org.wso2.carbon.identity.oauth.tokenprocessor.HashingPersistenceProcessor.hash(HashingPersistenceProcessor.java:112)
at 
org.wso2.carbon.identity.oauth.tokenprocessor.HashingPersistenceProcessor.getProcessedAccessTokenIdentifier(HashingPersistenceProcessor.java:77)
at 
org.wso2.carbon.identity.oauth2.dao.AccessTokenDAOImpl.getTokenIdByAccessToken(AccessTokenDAOImpl.java:1512)
at 
org.wso2.carbon.identity.oauth2.dao.AccessTokenDAOImpl.getTokenIdByAccessToken(AccessTokenDAOImpl.java:1477)
at 
org.wso2.carbon.identity.openidconnect.dao.RequestObjectDAOImpl.getRequestedClaims(RequestObjectDAOImpl.java:258)
at 
org.wso2.carbon.identity.openidconnect.RequestObjectService.getRequestedClaims(RequestObjectService.java:78)
at 
org.wso2.carbon.identity.openidconnect.RequestObjectService.getRequestedClaimsForIDToken(RequestObjectService.java:94)
at 
org.wso2.carbon.identity.openidconnect.DefaultOIDCClaimsCallbackHandler.filterClaimsFromRequestObject(DefaultOIDCClaimsCallbackHandler.java:210)
at 
org.wso2.carbon.identity.openidconnect.DefaultOIDCClaimsCallbackHandler.filterOIDCClaims(DefaultOIDCClaimsCallbackHandler.java:192)
at 
org.wso2.carbon.identity.openidconnect.DefaultOIDCClaimsCallbackHandler.filterOIDCClaims(DefaultOIDCClaimsCallbackHandler.java:164)
at 
org.wso2.carbon.identity.openidconnect.DefaultOIDCClaimsCallbackHandler.getUserClaimsInOIDCDialect(DefaultOIDCClaimsCallbackHandler.java:150)
at 
org.wso2.carbon.identity.openidconnect.DefaultOIDCClaimsCallbackHandler.handleCustomClaims(DefaultOIDCClaimsCallbackHandler.java:84)
at 
org.wso2.carbon.identity.oauth2.token.JWTTokenIssuer.handleCustomClaims(JWTTokenIssuer.java:500)
at 
org.wso2.carbon.identity.oauth2.token.JWTTokenIssuer.createJWTClaimSet(JWTTokenIssuer.java:403)
at 
org.wso2.carbon.identity.oauth2.token.JWTTokenIssuer.buildJWTToken(JWTTokenIssuer.java:160)
at 
org.wso2.carbon.identity.oauth2.token.JWTTokenIssuer.accessToken(JWTTokenIssuer.java:111)
at 
org.wso2.carbon.identity.oauth2.token.handlers.grant.AbstractAuthorizationGrantHandler.getNewAccessToken(AbstractAuthorizationGrantHandler.java:391)
at 
org.wso2.carbon.identity.oauth2.token.handlers.grant.AbstractAuthorizationGrantHandler.createNewTokenBean(AbstractAuthorizationGrantHandler.java:314)
at 
org.wso2.carbon.identity.oauth2.token.handlers.grant.AbstractAuthorizationGrantHandler.generateNewAccessTokenResponse(AbstractAuthorizationGrantHandler.java:268)
at 
org.wso2.carbon.identity.oauth2.token.handlers.grant.AbstractAuthorizationGrantHandler.issue(AbstractAuthorizationGrantHandler.java:129)
at 
org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.issue(AccessTokenIssuer.java:274)
at 
org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessToken(OAuth2Service.java:225)
at 
org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.issueAccessToken(OAuth2TokenEndpoint.java:293)
at 
org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.issueAccessToken(OAuth2TokenEndpoint.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:188)
at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:104)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101)
at 

Re: [Dev] Siddhi - TCP Source (Netty ?) - Python Client

2018-04-17 Thread Tishan Dahanayakage
Hi Bathiyar,

Currently we don't have any Python clients to use with Siddhi TCP
transport. My Python skill is sparse but I can provide steps.
1. Create the json you want to send as a String. Json needs to comply to
following schema
{
"event":{
"my_key":WSO2,
"my_value":55.6
}
}
2. Convert String to byte[] with UTF-8 encoding
3. Send that byte[] as a stream to tcp socket. Your @source definition
should be corrected as per documentaion[1]
4. Also you need to add a query to consume this stream. Ex:
>From SampleStream#log()
select *
insert into tempStream;

Also please note that Siddhi has several other io extensions like HTTP,
JMS[2] that you can use. All extensions with prefix io are source/sink
extensions


[1] https://wso2-extensions.github.io/siddhi-io-tcp/api/2.0.15/
[2] https://wso2.github.io/siddhi/extensions/

THanks,
/Tishan

On Tue, Apr 17, 2018 at 4:00 PM, Bahtiyar KARANLIK 
wrote:

> Hi All,
>
> I’m facing a weird issue with sending JSON formatted events to a Siddhi
> TCP Source defined as below:
>
> @source(type = 'tcp',
>@map(type = 'json', fail.on.missing.attribute = "false"))
> define stream SampleStram(my_key string, my_value double);
>
> I’ve created a Python client to send messages to this TCP socket but
> nothing happens (sample Python lines are as follows):
>
> host = '127.0.0.1'
> port = 9892
> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> s.connect((host, port))
> s.sendall(my_values)
>
>
>  I just see the below line in the Siddhi app logs:
> [io.netty.util.ResourceLeakDetectorFactory] : Loaded default
> ResourceLeakDetector: io.netty.util.ResourceLeakDetector@7b7de0bb
>
> Any ideas are highly welcome.. (or any sample Python client ?)
>
> best regards..
>
> bahtiyar
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Tishan Dahanayakage
Associate Technical Lead
WSO2, Inc.
Mobile:+94 716481328

Disclaimer: This communication may contain privileged or other confidential
information and is intended exclusively for the addressee/s. If you are not
the intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print, copy,
re-transmit, disseminate, or otherwise use the information contained in
this communication. Internet communications cannot be guaranteed to be
timely, secure, error or virus-free. The sender does not accept liability
for any errors or omissions.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Siddhi - TCP Source (Netty ?) - Python Client

2018-04-17 Thread Bahtiyar KARANLIK
Hi All,

I’m facing a weird issue with sending JSON formatted events to a Siddhi TCP 
Source defined as below:

@source(type = 'tcp',
   @map(type = 'json', fail.on.missing.attribute = "false"))
define stream SampleStram(my_key string, my_value double);
I’ve created a Python client to send messages to this TCP socket but nothing 
happens (sample Python lines are as follows):

host = '127.0.0.1'
port = 9892
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port)) 
s.sendall(my_values)


 I just see the below line in the Siddhi app logs:
[io.netty.util.ResourceLeakDetectorFactory] : Loaded default 
ResourceLeakDetector: io.netty.util.ResourceLeakDetector@7b7de0bb

Any ideas are highly welcome.. (or any sample Python client ?)

best regards..

bahtiyar

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


Re: [Dev] WSO2 EI - org.apache.cxf.jaxws.spi.ProviderImpl not found

2018-04-17 Thread Júnior
Hi Shakila,

I am not building the jar, it is a third party jar. As I could see, It has
no reference tô cxf, but only jax-ws.

I am trying to add the required jars to the dropins folder, this is still
in progress.

Getting the jars from wso2/lib/runtimes/cxf

Thanks

Em ter, 17 de abr de 2018 00:32, Shakila Sasikaran 
escreveu:

> Hi,
>
> I hope you are building this jar from a maven project. Could you please
> share the pom file of this application? Could you please import the
> relevant package (org.apache.cxf.jaxws.spi) with correct version and try?
>
> Thanks
>
> On Tue, Apr 17, 2018 at 5:12 AM, Júnior  wrote:
>
>> Hi,
>>
>> I am adding a jar file that uses a JAX-WS client to invoke a web service.
>> When I am trying to execute the code, I am getting this error:
>>
>> javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider
>> org.apache.cxf.jaxws.spi.ProviderImpl not found
>>
>> Caused by: javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider
>> org.apache.cxf.jaxws.spi.ProviderImpl not found
>> at javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:130)
>> at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
>> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:124)
>> at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)
>> at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:211)
>> at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
>> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
>> at javax.xml.ws.spi.Provider.provider(Provider.java:43)
>> at javax.xml.ws.Service.(Service.java:35)
>>
>>
>> Do you know how to overcome this error?
>>
>> Thanks,
>>
>> --
>> Francisco Ribeiro
>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Shakila Sasikaran
> Software Engineer
> Mobile :+94 (0) 77 526 6848
> shak...@wso2.com
> WSO2, Inc.
> lean . enterprise . middleware
> http://www.wso2.com/
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How to get the Maven project version into a shell script?

2018-04-17 Thread Nipuni Bhagya
Hi all,

I have encountered a problem while trying to get the version number of a
jar into a shell script. Currently, the name of the jar is hardcoded in the
script. But the problem is when the maven version get updated in the
project it should reflect in the script. The closest solution I have come
up at the moment is to use the Maven Help Plugin
. The
goal help:evaluate can evaluate Maven expression,
-Dexpression=project.version and then I can grep the version from its
result.

I would really appreciate if someone of you could help me to find a better
way to achieve this task.

Thank you in advance,

-- 



*Kind Regards,Nipuni Bhagya*

*Software Engineering Intern*
*WSO2*



*Mobile : +94 0779028904 <+94%2077%20767%201807>*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev