[Dev] WSO2 API Manager Micro Gateway 2.5.0-Alpha Released!!!

2018-06-15 Thread Harsha Kumara
The WSO2 API Manager team is pleased to announce the release of API Manager
Micro Gateway 2.5.0-Alpha. It's now available to download.Distribution

https://github.com/wso2/product-microgateway/releases/download/v2.5.0-alpha/wso2am-micro-gw-2.5.0-aplha.zip
Documentation

https://docs.wso2.com/display/AM2xx/Configuring+the+API+Microgateway
Introduction

The Microgateway is a specialized form of the WSO2 API Gateway. Its main
characteristics are

   - Its ability to execute in isolation without mandatory connections to
   other components (Key Manager, Traffic Manager, etc).
   - Ability to host a subset of APIs of choice (defined on the API
   Publisher) instead of all.
   - Immutability - if you update an API you need to re-create the
   container/instance, no hot deployment.
   Microgateway offers you a proxy that is capable of performing security
   validations (OAuth, Basic Auth, Signed JWT), in-memory (local) rate
   limiting and operational analytics.

Design Goals

Following are some of its main expectations of Microgateway

Ability to host just one or a selected set (subset) of APIs only.
Ability to execute in complete isolation once setup, without having the
need to contact the Management or Security components.
Easy integration with CI/CD processes.
Seamless integration with deployment automation tools and techniques.
Architecture

The following diagram illustrates the process of getting an API (or a
selected set of APIs) to be hosted on a Microgateway.

[image: Architecture]

Setting up microgateway

This product will include a CLI, the B7a platform distribution and a few
B7a extensions (Endpoints and Filters). The CLI will have two main
responsibilities.

   - Setting up a Microgateway project.
   - Running the Microgateway project.

These two steps will be treated as two phases. One will first complete the
setup phase and move on to the Run phase. The reason for treating them as
phases is to make it possible for developers to take control of the runtime
if and when required. For example, what gets run as default on a
Microgateway is a simple API proxy. If a developer needs to perform some
sort of an integration or change the Ballerina source files for some other
reason, he could engage with the project after the setup phase and do the
required modifications before the runtime is deployed.
Bug Fixes And Improvements in 2.5.0-M1

   - GitHub (Product-Microgateway
   

   )

Known Issues

All the open issues pertaining to WSO2 API Manager Microgateway are
reported at the following location:

   - GitHub (Product-microgateway
   
   )

How You Can ContributeMailing Lists

Join our mailing list and correspond with the developers directly.

   -

   Developer List: dev@wso2.org | Subscribe | Mail Archive
   -

   User List: u...@wso2.org | Subscribe | Mail Archive

Reporting Issues

We encourage you to report issues, documentation faults, and feature
requests regarding WSO2 API Manager Micro Gateway through the public API
Manager Micro Gateway Git Repo
.
-- The WSO2 API Manager Team --

-- 
Harsha Kumara
Associate Technical Lead, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [VOTE] Release of WSO2 API Manager 2.5.0 RC1

2018-06-15 Thread Chamin Dias
Hi all,

We are pleased to announce the first release candidate of WSO2 API Manager
2.5.0.

This release fixes the following issues.

   - Fixes : carbon-apimgt
   

   - Fixes : product-apim
   

   - Fixes : analytics-apim
   


Source and distribution,
Runtime : https://github.com/wso2/product-apim/releases/tag/v2.5.0-rc1
Analytics :
https://github.com/wso2/analytics-apim/releases/tag/v2.5.0-rc1

Please download, test the product and vote.

[+] Stable - go ahead and release
[-] Broken - do not release (explain why)

Thanks,
WSO2 API Manager Team

-- 
Chamin Dias
Mobile : 0716097455
Email : cham...@wso2.com
LinkedIn : https://www.linkedin.com/in/chamindias
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Architecture] [VOTE] Release WSO2 Enterprise Integrator 6.3.0 RC2

2018-06-15 Thread Malaka Gangananda
Hi All,

We are pleased to announce the second release candidate of WSO2 Enterprise
Integrator 6.3.0.

Known issues: https://github.com/wso2/product-ei/issues

Source and binary distribution files:
https://github.com/wso2/product-ei/releases/tag/v6.3.0-rc2

The tag to be voted upon: https://github.com/wso2/product-ei/tree/v6.3.0-rc2

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

~The WSO2 Integration Team~

Thanks,


-- 
Malaka.
-- 
Malaka Gangananda - Software Engineer | WSO2
Email : mala...@wso2.com
Mobile : +94713564340
Web : http://wso2.com
  
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [WSO2 EI 6.1.1] DSS Error

2018-06-15 Thread Sidath Weerasinghe
Hi Devs,

I changed request as to PUT operation and remove the query pram form the
URL.  Then this worked fine.
Thank you so much for supports.



On Fri, Jun 15, 2018 at 5:35 PM Madhawa Gunasekara 
wrote:

> Hi Sidath,
>
> There is a limitation when we define resource paths with path params, when
> there is a payload available. Can you try to omit path param and use
> payload to pass the parameter?
>
> Thanks,
> Madhawa
>
> On Fri, Jun 15, 2018 at 5:20 PM, Janak Amarasena  wrote:
>
>> Hi Sidath,
>>
>> Is there a separate POST endpoint defined like *> path="applications**">* (/applications)? If so, it seems that it is the
>> endpoint being called as your JSON payload has the following
>> *_postapplications*. The following link[1] has the proper way of
>> constructing the JSON payload.
>>
>> [1] -
>> https://docs.wso2.com/display/DSS351/Using+JSON+Messages+with+RESTful+Services
>>
>> Best Regards,
>>
>> On Fri, Jun 15, 2018 at 4:11 PM, Sidath Weerasinghe > > wrote:
>>
>>> Hi devs,
>>>
>>> I changed the code as follows,
>>>
>>> 
>>>   {call update_application_from_applicationId(?, ?, ?, ?,
>>> ?)}
>>>   >> sqlType="INTEGER" type="IN"/>
>>>   >> type="IN"/>
>>>   >> type="IN"/>
>>>   >> sqlType="STRING" type="IN"/>
>>>   >> sqlType="BOOLEAN" type="IN"/>
>>>
>>>
>>> 
>>> 
>>> >> query-param="application_id"/>
>>> 
>>> 
>>> 
>>> >> query-param="word_required"/>
>>> 
>>> 
>>>
>>>
>>> Request -
>>>
>>> curl -X POST \
>>>   http://127.0.0.1:8280/services/test/applications/3 \
>>>   -H 'Accept: application/json' \
>>>   -H 'Cache-Control: no-cache' \
>>>   -H 'Content-Type: application/json' \
>>>   -H 'Postman-Token: 586ef320-573b-495e-9ce8-e64a90703fb5' \
>>>   -d '{
>>> "_postapplications" : {
>>> "word": "Sida",
>>> "code": "12345",
>>> "status": "active",
>>> "word_required": true
>>> }
>>> }'
>>>
>>>
>>> But still, I'm getting the below error,
>>>
>>> [2018-06-15 16:07:31,322] [EI-Core] ERROR - GsonXMLStreamReader Value
>>> type miss match, Expected value type - 'null', but found - 'STRING'
>>> [2018-06-15 16:07:31,324] [EI-Core] ERROR - ServerWorker Error
>>> processing POST reguest for : /services/test/applications/3. Error detail:
>>> Value type miss match, Expected value type - 'null', but found - 'STRING'.
>>> java.lang.IllegalArgumentException: Value type miss match, Expected
>>> value type - 'null', but found - 'STRING'
>>> at
>>> org.apache.axis2.json.gson.GsonXMLStreamReader.nextValue(GsonXMLStreamReader.java:737)
>>> at
>>> org.apache.axis2.json.gson.GsonXMLStreamReader.readValue(GsonXMLStreamReader.java:626)
>>> at
>>> org.apache.axis2.json.gson.GsonXMLStreamReader.stateTransition(GsonXMLStreamReader.java:532)
>>> at
>>> org.apache.axis2.json.gson.GsonXMLStreamReader.next(GsonXMLStreamReader.java:178)
>>> at
>>> org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
>>> at
>>> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
>>> at
>>> org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
>>> at
>>> org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722)
>>> at
>>> org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:700)
>>> at
>>> org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:105)
>>> at
>>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:296)
>>> at
>>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:212)
>>> at
>>> org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.java:231)
>>> at
>>> org.apache.axis2.json.gson.JSONMessageHandler.invoke(JSONMessageHandler.java:84)
>>> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
>>> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
>>> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
>>> at
>>> org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:326)
>>> at
>>> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:372)
>>> at
>>> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
>>> at
>>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>> at java.lang.Thread.run(Thread.java:748)
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Jun 15, 2018 at 9:45 AM Madhawa Gunasekara 
>>> wrote:
>>>
 Hi Sidath,

 Why are you using XML Mapping instead of JsonMapping [1]. This issue
 won't be occured if you use JSON mapping.

 [1] 

[Dev] [VOTE] Release of WSO2 Identity Server 5.6.0 RC3

2018-06-15 Thread Madawa Soysa
Hi all,

We are pleased to announce the third release candidate of WSO2 Identity
Server 5.6.0.

This release fixes the following issues

   - 5.6.0-RC Fixes
   
   - 5.6.0-Beta Fixes
   
   - 5.6.0-Alpha2 Fixes
   
   - 5.6.0-Alpha Fixes
   
   - 5.6.0-M7 Fixes
   
   - 5.6.0-M6 Fixes
   
   - 5.6.0-M5 Fixes
   
   - 5.6.0-M4 Fixes
   
   - 5.6.0-M3 Fixes
   
   - 5.6.0-M2 Fixes
   
   - 5.6.0-M1 Fixes
   

Source and distribution,
Runtime -  https://github.com/wso2/product-is/releases/tag/v5.6.0-rc3
Analytics - https://github.com/wso2/analytics-is/releases/v5.6.0-rc3

Please download, test the product and vote.

[+] Stable - go ahead and release
[-] Broken - do not release (explain why)

Thanks,
WSO2 Identity and Access Management Team
-- 

Madawa Soysa / Senior Software Engineer
mada...@wso2.com / +94714616050

*WSO2 Inc.*
lean.enterprise.middleware

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


Re: [Dev] [WSO2 EI 6.1.1] DSS Error

2018-06-15 Thread Madhawa Gunasekara
Hi Sidath,

There is a limitation when we define resource paths with path params, when
there is a payload available. Can you try to omit path param and use
payload to pass the parameter?

Thanks,
Madhawa

On Fri, Jun 15, 2018 at 5:20 PM, Janak Amarasena  wrote:

> Hi Sidath,
>
> Is there a separate POST endpoint defined like * path="applications**">* (/applications)? If so, it seems that it is the
> endpoint being called as your JSON payload has the following
> *_postapplications*. The following link[1] has the proper way of
> constructing the JSON payload.
>
> [1] - https://docs.wso2.com/display/DSS351/Using+JSON+
> Messages+with+RESTful+Services
>
> Best Regards,
>
> On Fri, Jun 15, 2018 at 4:11 PM, Sidath Weerasinghe 
> wrote:
>
>> Hi devs,
>>
>> I changed the code as follows,
>>
>> 
>>   {call update_application_from_applicationId(?, ?, ?, ?,
>> ?)}
>>   > sqlType="INTEGER" type="IN"/>
>>   > type="IN"/>
>>   > type="IN"/>
>>   > sqlType="STRING" type="IN"/>
>>   > sqlType="BOOLEAN" type="IN"/>
>>
>>
>> 
>> 
>> > query-param="application_id"/>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>>
>> Request -
>>
>> curl -X POST \
>>   http://127.0.0.1:8280/services/test/applications/3 \
>>   -H 'Accept: application/json' \
>>   -H 'Cache-Control: no-cache' \
>>   -H 'Content-Type: application/json' \
>>   -H 'Postman-Token: 586ef320-573b-495e-9ce8-e64a90703fb5' \
>>   -d '{
>> "_postapplications" : {
>> "word": "Sida",
>> "code": "12345",
>> "status": "active",
>> "word_required": true
>> }
>> }'
>>
>>
>> But still, I'm getting the below error,
>>
>> [2018-06-15 16:07:31,322] [EI-Core] ERROR - GsonXMLStreamReader Value
>> type miss match, Expected value type - 'null', but found - 'STRING'
>> [2018-06-15 16:07:31,324] [EI-Core] ERROR - ServerWorker Error processing
>> POST reguest for : /services/test/applications/3. Error detail: Value type
>> miss match, Expected value type - 'null', but found - 'STRING'.
>> java.lang.IllegalArgumentException: Value type miss match, Expected
>> value type - 'null', but found - 'STRING'
>> at org.apache.axis2.json.gson.GsonXMLStreamReader.nextValue(Gso
>> nXMLStreamReader.java:737)
>> at org.apache.axis2.json.gson.GsonXMLStreamReader.readValue(Gso
>> nXMLStreamReader.java:626)
>> at org.apache.axis2.json.gson.GsonXMLStreamReader.stateTransiti
>> on(GsonXMLStreamReader.java:532)
>> at org.apache.axis2.json.gson.GsonXMLStreamReader.next(GsonXMLS
>> treamReader.java:178)
>> at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(
>> StAXOMBuilder.java:681)
>> at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBu
>> ilder.java:214)
>> at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSer
>> ializableImpl.java:78)
>> at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementI
>> mpl.java:722)
>> at org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElement
>> Impl.java:700)
>> at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImp
>> l.java:105)
>> at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMEleme
>> ntImpl.java:296)
>> at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMEleme
>> ntImpl.java:212)
>> at org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBo
>> dyImpl.java:231)
>> at org.apache.axis2.json.gson.JSONMessageHandler.invoke(JSONMes
>> sageHandler.java:84)
>> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
>> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
>> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
>> at org.apache.synapse.transport.passthru.ServerWorker.processNo
>> nEntityEnclosingRESTHandler(ServerWorker.java:326)
>> at org.apache.synapse.transport.passthru.ServerWorker.processEn
>> tityEnclosingRequest(ServerWorker.java:372)
>> at org.apache.synapse.transport.passthru.ServerWorker.run(Serve
>> rWorker.java:151)
>> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.
>> run(NativeWorkerPool.java:172)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>> Executor.java:1149)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>> lExecutor.java:624)
>> at java.lang.Thread.run(Thread.java:748)
>>
>>
>>
>>
>>
>> On Fri, Jun 15, 2018 at 9:45 AM Madhawa Gunasekara 
>> wrote:
>>
>>> Hi Sidath,
>>>
>>> Why are you using XML Mapping instead of JsonMapping [1]. This issue
>>> won't be occured if you use JSON mapping.
>>>
>>> [1] https://docs.wso2.com/display/DSS350/JSON+Mapping
>>>
>>> Thanks,
>>> Madhawa
>>>
>>> On Thu, Jun 14, 2018 at 11:05 AM, Sidath Weerasinghe <
>>> sid...@wso2telco.com> wrote:
>>>
 Hi devs,

 Is this error related to this
 
  ?
 http://wso2-oxygen-tank.10903.n7.nabble.com/Issue-with-EI-6-

Re: [Dev] [WSO2 EI 6.1.1] DSS Error

2018-06-15 Thread Janak Amarasena
Hi Sidath,

Is there a separate POST endpoint defined like ** (/applications)? If so, it seems that it is the
endpoint being called as your JSON payload has the following
*_postapplications*. The following link[1] has the proper way of
constructing the JSON payload.

[1] -
https://docs.wso2.com/display/DSS351/Using+JSON+Messages+with+RESTful+Services

Best Regards,

On Fri, Jun 15, 2018 at 4:11 PM, Sidath Weerasinghe 
wrote:

> Hi devs,
>
> I changed the code as follows,
>
> 
>   {call update_application_from_applicationId(?, ?, ?, ?,
> ?)}
>sqlType="INTEGER" type="IN"/>
>type="IN"/>
>type="IN"/>
>type="IN"/>
>sqlType="BOOLEAN" type="IN"/>
>
>
> 
> 
>  query-param="application_id"/>
> 
> 
> 
> 
> 
> 
>
>
> Request -
>
> curl -X POST \
>   http://127.0.0.1:8280/services/test/applications/3 \
>   -H 'Accept: application/json' \
>   -H 'Cache-Control: no-cache' \
>   -H 'Content-Type: application/json' \
>   -H 'Postman-Token: 586ef320-573b-495e-9ce8-e64a90703fb5' \
>   -d '{
> "_postapplications" : {
> "word": "Sida",
> "code": "12345",
> "status": "active",
> "word_required": true
> }
> }'
>
>
> But still, I'm getting the below error,
>
> [2018-06-15 16:07:31,322] [EI-Core] ERROR - GsonXMLStreamReader Value type
> miss match, Expected value type - 'null', but found - 'STRING'
> [2018-06-15 16:07:31,324] [EI-Core] ERROR - ServerWorker Error processing
> POST reguest for : /services/test/applications/3. Error detail: Value type
> miss match, Expected value type - 'null', but found - 'STRING'.
> java.lang.IllegalArgumentException: Value type miss match, Expected value
> type - 'null', but found - 'STRING'
> at org.apache.axis2.json.gson.GsonXMLStreamReader.nextValue(
> GsonXMLStreamReader.java:737)
> at org.apache.axis2.json.gson.GsonXMLStreamReader.readValue(
> GsonXMLStreamReader.java:626)
> at org.apache.axis2.json.gson.GsonXMLStreamReader.stateTransition(
> GsonXMLStreamReader.java:532)
> at org.apache.axis2.json.gson.GsonXMLStreamReader.next(
> GsonXMLStreamReader.java:178)
> at org.apache.axiom.om.impl.builder.StAXOMBuilder.
> parserNext(StAXOMBuilder.java:681)
> at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(
> StAXOMBuilder.java:214)
> at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(
> OMSerializableImpl.java:78)
> at org.apache.axiom.om.impl.llom.OMElementImpl.build(
> OMElementImpl.java:722)
> at org.apache.axiom.om.impl.llom.OMElementImpl.detach(
> OMElementImpl.java:700)
> at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:105)
> at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(
> OMElementImpl.java:296)
> at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(
> OMElementImpl.java:212)
> at org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(
> SOAPBodyImpl.java:231)
> at org.apache.axis2.json.gson.JSONMessageHandler.invoke(
> JSONMessageHandler.java:84)
> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
> at org.apache.synapse.transport.passthru.ServerWorker.
> processNonEntityEnclosingRESTHandler(ServerWorker.java:326)
> at org.apache.synapse.transport.passthru.ServerWorker.
> processEntityEnclosingRequest(ServerWorker.java:372)
> at org.apache.synapse.transport.passthru.ServerWorker.run(
> ServerWorker.java:151)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$
> 1.run(NativeWorkerPool.java:172)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
>
>
>
>
>
> On Fri, Jun 15, 2018 at 9:45 AM Madhawa Gunasekara 
> wrote:
>
>> Hi Sidath,
>>
>> Why are you using XML Mapping instead of JsonMapping [1]. This issue
>> won't be occured if you use JSON mapping.
>>
>> [1] https://docs.wso2.com/display/DSS350/JSON+Mapping
>>
>> Thanks,
>> Madhawa
>>
>> On Thu, Jun 14, 2018 at 11:05 AM, Sidath Weerasinghe <
>> sid...@wso2telco.com> wrote:
>>
>>> Hi devs,
>>>
>>> Is this error related to this
>>> 
>>>  ?
>>> http://wso2-oxygen-tank.10903.n7.nabble.com/Issue-with-EI-6-
>>> 1-1-update-22-and-24-td156180.html
>>>
>>> On Thu, Jun 14, 2018 at 10:21 AM Sidath Weerasinghe <
>>> sid...@wso2telco.com> wrote:
>>>
 Hi Chanika,

 Im using EI 6.1.1 version and please find the dataservice config.


  
   {call update_application_from_applicationId(?, ?, ?, ?,
 ?)}
   >>> sqlType="INTEGER" type="IN"/>
   >>> sqlType="STRING" type="IN"/>
   >>> sqlType="STRING" type="IN"/>
 

Re: [Dev] CORS Error

2018-06-15 Thread Farasath Ahamed
On Thu, Jun 14, 2018 at 3:32 PM, shibsankar  wrote:

> *grant_type=password.*
>
>
>
> For your convenience, I  am providing the Angular JS relevant code
>
>
> *// from Angular Controller js*
>
> var dataObj="grant_type=password=x=xxx
> xx=openid";
>
>  Service.callTokenAPI(dataObj)
> .then(function onSuccess(response) {
> console.log("Success");
> console.log("result  = " + JSON.stringify(response));
> }, function onFailure(error) {
> console.log("failure");
> });
>
>
>
> *//from Service.js*
>
> var callTokenAPI = function (dataObj) {
> console.log("Call server dataObj =" + angular.toJson(dataObj));
> var secret=clientKey+":"+clientPass;
> var base64Encoded= btoa(secret);
> console.log("base64Encoded="+base64Encoded);
> return $http({
> url: tokenAPI,
> method: 'POST',
> data: dataObj,
> headers: { "Content-Type": "application/json;charset=utf-8"
> ,"Authorization":base64Encoded}
> });
> };
>
>
Can you try setting the 'content-type' header to
'application/x-www-form-urlencoded'?
(Check [1])

[1]
https://security.stackexchange.com/questions/187311/why-cors-preflight-is-not-available-for-post-requests-when-content-type-is-appli/187312#187312


>
> When I  run this I am getting CORS error screenshot shared earlier.
>
> Regards
> Shib
>
>
> On Thu, Jun 14, 2018 at 3:00 PM, Rushmin Fernando 
> wrote:
>
>> Could you please let us know the grant type you are using here. I would
>> like to know whether this is a valid use case.
>>
>> On Thu, Jun 14, 2018 at 2:54 PM shibsankar  wrote:
>>
>>> Yes.  I get  same CORS error with the correct endpoint, which is */*
>>> *token*
>>>
>>> screenshot attached.
>>>
>>> Regards
>>> Shib
>>>
>>> On Thu, Jun 14, 2018 at 2:42 PM, Rushmin Fernando 
>>> wrote:
>>>
 In the console logs, it says */toekn, *which is wrong spellings.

 Do you get the same CORS error with the correct endpoint, which is 
 */**token
 *?

 On Thu, Jun 14, 2018 at 2:26 PM shibsankar  wrote:

> I am receiving CORS Error when I call the WSO2 token API  from Angular
> JS application.
>
> How do you fix this?
>
> Regards
> Shib(9831418066)
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


 --
 *Best Regards*

 *Rushmin Fernando*
 *Technical Lead*

 WSO2 Inc.  - Lean . Enterprise . Middleware

 mobile : +94775615183



>>>
>>
>> --
>> *Best Regards*
>>
>> *Rushmin Fernando*
>> *Technical Lead*
>>
>> WSO2 Inc.  - Lean . Enterprise . Middleware
>>
>> mobile : +94775615183
>>
>>
>>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


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

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


Re: [Dev] [WSO2 EI 6.1.1] DSS Error

2018-06-15 Thread Sidath Weerasinghe
Hi devs,

I changed the code as follows,


  {call update_application_from_applicationId(?, ?, ?, ?, ?)}
  
  
  
  
  
   












Request -

curl -X POST \
  http://127.0.0.1:8280/services/test/applications/3 \
  -H 'Accept: application/json' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 586ef320-573b-495e-9ce8-e64a90703fb5' \
  -d '{
"_postapplications" : {
"word": "Sida",
"code": "12345",
"status": "active",
"word_required": true
}
}'


But still, I'm getting the below error,

[2018-06-15 16:07:31,322] [EI-Core] ERROR - GsonXMLStreamReader Value type
miss match, Expected value type - 'null', but found - 'STRING'
[2018-06-15 16:07:31,324] [EI-Core] ERROR - ServerWorker Error processing
POST reguest for : /services/test/applications/3. Error detail: Value type
miss match, Expected value type - 'null', but found - 'STRING'.
java.lang.IllegalArgumentException: Value type miss match, Expected value
type - 'null', but found - 'STRING'
at
org.apache.axis2.json.gson.GsonXMLStreamReader.nextValue(GsonXMLStreamReader.java:737)
at
org.apache.axis2.json.gson.GsonXMLStreamReader.readValue(GsonXMLStreamReader.java:626)
at
org.apache.axis2.json.gson.GsonXMLStreamReader.stateTransition(GsonXMLStreamReader.java:532)
at
org.apache.axis2.json.gson.GsonXMLStreamReader.next(GsonXMLStreamReader.java:178)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
at
org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722)
at
org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:700)
at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:105)
at
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:296)
at
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:212)
at
org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.java:231)
at
org.apache.axis2.json.gson.JSONMessageHandler.invoke(JSONMessageHandler.java:84)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at
org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:326)
at
org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:372)
at
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)





On Fri, Jun 15, 2018 at 9:45 AM Madhawa Gunasekara 
wrote:

> Hi Sidath,
>
> Why are you using XML Mapping instead of JsonMapping [1]. This issue won't
> be occured if you use JSON mapping.
>
> [1] https://docs.wso2.com/display/DSS350/JSON+Mapping
>
> Thanks,
> Madhawa
>
> On Thu, Jun 14, 2018 at 11:05 AM, Sidath Weerasinghe  > wrote:
>
>> Hi devs,
>>
>> Is this error related to this
>> 
>>  ?
>>
>> http://wso2-oxygen-tank.10903.n7.nabble.com/Issue-with-EI-6-1-1-update-22-and-24-td156180.html
>>
>> On Thu, Jun 14, 2018 at 10:21 AM Sidath Weerasinghe 
>> wrote:
>>
>>> Hi Chanika,
>>>
>>> Im using EI 6.1.1 version and please find the dataservice config.
>>>
>>>
>>>  
>>>   {call update_application_from_applicationId(?, ?, ?, ?,
>>> ?)}
>>>   >> sqlType="INTEGER" type="IN"/>
>>>   >> type="IN"/>
>>>   >> type="IN"/>
>>>   >> sqlType="STRING" type="IN"/>
>>>   >> sqlType="BOOLEAN" type="IN"/>
>>>   
>>>  >> xsdType="integer"/>
>>>  
>>>  
>>>  
>>>  >> xsdType="boolean"/>
>>>   
>>>
>>> 
>>> 
>>> >> query-param="application_id"/>
>>> 
>>> 
>>> 
>>> >> query-param="word_required"/>
>>> 
>>> 
>>>
>>>
>>> Request -
>>> http://127.0.0.1:8280/services/test/applications/3
>>> { "_postapplications" : { "word": "Sida", "code": "12345", "status":
>>> "active", "word_required": true } }
>>>
>>>
>>> On Thu, Jun 14, 2018 at 9:50 AM Chanika Geeganage 
>>> wrote:
>>>
 Hi Sidath,

 What is the DSS version? Is it EI? Also can you please attach the
 dataservice config and a sample request to identify the issue?

 Thanks

 On Thu, Jun 14,