[Dev] Is docker.wso2.com down?

2018-03-21 Thread Johnson, Jeremy M
I'm getting a blank screen on the web portal and while I can login w/ "docker 
login", I'm getting "pull access denied" from "docker pull".


My trial subscription just expired-- I'm assuming this doesn't affect access to 
docker images?


Thanks,

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


[Dev] Get container IPs of scaled Marathon application members from inside a container

2018-03-21 Thread Chiranga Alwis
Hi all,

please see the following [1] DC/OS forum question, which I have posted in
relation with getting container IPs of scaled Marathon application members
from inside a container, when building DC/OS resources for WSO2 Identity
Server 5.4.1 based deployment patterns.

Your suggestions and concerns are highly appreciated.

[1]: https://groups.google.com/a/dcos.io/forum/#!topic/users/sSq4pUsnnMs

-- 
Yours sincerely,

*Chiranga Alwis*
Software Engineer | WSO2

*Mobile : *+94775930497
*Email: *chirangaal...@gmail.com
*LinkedIn: *https://lk.linkedin.com/in/chiranga-alwis-391342a9
*Medium:* https://medium.com/@chirangaalwis


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


Re: [Dev] Address endpoint and 404 code

2018-03-21 Thread Himasha Guruge
Hi Thomas,

Yes given your scenarios  handling each separately based on a flag/flags
(with switch mediator) would be the possible solution. You could store
these properties(such as documents) in registry itself.

Thanks,
Himasha

On Wed, Mar 21, 2018 at 9:08 PM, Thomas LEGRAND <
thomas.legr...@versusmind.eu> wrote:

> Hello,
>
> "And because the second step can be invoked in many contexts" can be like
> :
>
> * context 1 : retrieval of documents. We have an API like
> /documents/customer/{id}.
>
> - First step, I retrieve the local documents from the {id}.
> - Then step 2, I want to find the equivalence of the {id} for the other
> source (we'll call this equivalence, {id2}). However, {id2} does not exist
> so my web service returns 404. BOOM, step 2 prime is trigger
> - step 2 prime, fault sequence. How can I send back the retrieved
> documents from the first step? I can use a property and in this sequence,
> retrieve the property via a PayloadFactory and just use the respond
> mediator.
>
> whereas step 3 should be:
> - retrieve the document from the other source and merge them with the
> local ones
>
> * context 2 : retrieval of customer information. We have an API like
> /customer/{id}
>
> - First step, I retrieve the local information from the {id}.
> - Then, step 2,  I want to find the equivalence of the {id} for the other
> source (we'll call this equivalence, {id2}). However, {id2} does not exist
> so my web service returns 404. BOOM, step 2 prime is trigger. Yep, because
> we use the same sequence as in the context 1 because we are lazy :)
> - step 2 prime, fault sequence. How can I send back the local information
> from the first step whereas this same fault sequence could potentially be
> used for the context 1? Use the same property?
>
> whereas step 3 should be:
> - retrieve the information from the other source and merge them with the
> local ones
>
> Because of those two contexts (or more), I can't just call the fault
> sequence to do the merge because the data types are different. Or maybe by
> using a flag with the switch mediator but I don't know if it is
> common/right practice to do so.
>
> Regards,
>
> Thomas
>
> 2018-03-21 15:41 GMT+01:00 Vinod Kavinda :
>
>> Hi Thomas,
>> How about including your third step in a separate sequence and invoking
>> it from the fault sequence when it is triggered?
>>
>> Thanks,
>> Vinod.
>>
>> On Wed, Mar 21, 2018 at 8:05 PM, Himasha Guruge 
>> wrote:
>>
>>> Hi Thomas,
>>> Could you elaborate on following.
>>> " And because the second step can be invoked in many contexts, I can't
>>> just customize the fault sequence to invoke the third step."
>>>
>>> How about using switch mediator in fault sequence (for error_code
>>> property) and based on that, invoke the third step?
>>>
>>> Thanks,
>>> Himasha
>>>
>>> On Tue, Mar 20, 2018 at 8:43 PM, Thomas LEGRAND <
>>> thomas.legr...@versusmind.eu> wrote:
>>>
 Hello,

 I have a situation where I want to retrieve data from two sources. So,
 the client sends a request to a specific resource of an ESB API and the
 sequence follows like this :

 - retrieve the data from the local source
 - retrieve a corresponding id for the other source
 - if the correspondence exists, retrieve the data from the other source

 In the second step, I call a little REST web service which returns a
 404 when the correspondence does not exists. The call is implemented by
 using a Address mediator, like this:

 
 
 
 
 

 Of course, as you can see, the "getCorrespondenceUrl" is built just
 before thanks to registry parameters. My problem is the Address endpoint
 takes the 404 code as an error and just stop the sequence:

 TID: [-1234] [] [2018-03-20 15:48:45,114]  INFO {
 org.apache.axis2.transport.http.HTTPSender} -  Unable to sendViaGet to
 url[http://blablabla/find/my/correspondence] {
 org.apache.axis2.transport.http.HTTPSender}
 org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found

 So, I tried to use a fault sequence by setting the onError attribute:

 >>> onError="getCorrespondenceFaultSequence" trace="disable" xmlns="
 http://ws.apache.org/ns/synapse;>
 

 However, once this sequence is triggered, there is no turning back to
 the third step. And because the second step can be invoked in many
 contexts, I can't just customize the fault sequence to invoke the third
 step.

 So, is there a way to tell the mediator that 404 is no big deal?

 Regards,

 Thomas





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


>>>
>>>
>>> --
>>> Himasha Guruge
>>> Senior Software Engineer
>>> WS*O2* *Inc.*
>>> Mobile: +94 777459299 <+94%2077%20745%209299>
>>> 

Re: [Dev] Address endpoint and 404 code

2018-03-21 Thread Thomas LEGRAND
Hello,

"And because the second step can be invoked in many contexts" can be like :

* context 1 : retrieval of documents. We have an API like
/documents/customer/{id}.

- First step, I retrieve the local documents from the {id}.
- Then step 2, I want to find the equivalence of the {id} for the other
source (we'll call this equivalence, {id2}). However, {id2} does not exist
so my web service returns 404. BOOM, step 2 prime is trigger
- step 2 prime, fault sequence. How can I send back the retrieved documents
from the first step? I can use a property and in this sequence, retrieve
the property via a PayloadFactory and just use the respond mediator.

whereas step 3 should be:
- retrieve the document from the other source and merge them with the local
ones

* context 2 : retrieval of customer information. We have an API like
/customer/{id}

- First step, I retrieve the local information from the {id}.
- Then, step 2,  I want to find the equivalence of the {id} for the other
source (we'll call this equivalence, {id2}). However, {id2} does not exist
so my web service returns 404. BOOM, step 2 prime is trigger. Yep, because
we use the same sequence as in the context 1 because we are lazy :)
- step 2 prime, fault sequence. How can I send back the local information
from the first step whereas this same fault sequence could potentially be
used for the context 1? Use the same property?

whereas step 3 should be:
- retrieve the information from the other source and merge them with the
local ones

Because of those two contexts (or more), I can't just call the fault
sequence to do the merge because the data types are different. Or maybe by
using a flag with the switch mediator but I don't know if it is
common/right practice to do so.

Regards,

Thomas

2018-03-21 15:41 GMT+01:00 Vinod Kavinda :

> Hi Thomas,
> How about including your third step in a separate sequence and invoking it
> from the fault sequence when it is triggered?
>
> Thanks,
> Vinod.
>
> On Wed, Mar 21, 2018 at 8:05 PM, Himasha Guruge  wrote:
>
>> Hi Thomas,
>> Could you elaborate on following.
>> " And because the second step can be invoked in many contexts, I can't
>> just customize the fault sequence to invoke the third step."
>>
>> How about using switch mediator in fault sequence (for error_code
>> property) and based on that, invoke the third step?
>>
>> Thanks,
>> Himasha
>>
>> On Tue, Mar 20, 2018 at 8:43 PM, Thomas LEGRAND <
>> thomas.legr...@versusmind.eu> wrote:
>>
>>> Hello,
>>>
>>> I have a situation where I want to retrieve data from two sources. So,
>>> the client sends a request to a specific resource of an ESB API and the
>>> sequence follows like this :
>>>
>>> - retrieve the data from the local source
>>> - retrieve a corresponding id for the other source
>>> - if the correspondence exists, retrieve the data from the other source
>>>
>>> In the second step, I call a little REST web service which returns a 404
>>> when the correspondence does not exists. The call is implemented by using a
>>> Address mediator, like this:
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> Of course, as you can see, the "getCorrespondenceUrl" is built just
>>> before thanks to registry parameters. My problem is the Address endpoint
>>> takes the 404 code as an error and just stop the sequence:
>>>
>>> TID: [-1234] [] [2018-03-20 15:48:45,114]  INFO {
>>> org.apache.axis2.transport.http.HTTPSender} -  Unable to sendViaGet to
>>> url[http://blablabla/find/my/correspondence] {
>>> org.apache.axis2.transport.http.HTTPSender}
>>> org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found
>>>
>>> So, I tried to use a fault sequence by setting the onError attribute:
>>>
>>> >> onError="getCorrespondenceFaultSequence" trace="disable" xmlns="
>>> http://ws.apache.org/ns/synapse;>
>>> 
>>>
>>> However, once this sequence is triggered, there is no turning back to
>>> the third step. And because the second step can be invoked in many
>>> contexts, I can't just customize the fault sequence to invoke the third
>>> step.
>>>
>>> So, is there a way to tell the mediator that 404 is no big deal?
>>>
>>> Regards,
>>>
>>> Thomas
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Himasha Guruge
>> Senior Software Engineer
>> WS*O2* *Inc.*
>> Mobile: +94 777459299 <+94%2077%20745%209299>
>> himas...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Vinod Kavinda
> Senior Software Engineer
> *WSO2 Inc. - lean . enterprise . middleware .*
> Mobile : +94 (0) 712 415544
> Blog : http://soatechflicks.blogspot.com/
> [image: http://wso2.com/signature]
> 
>
>
___
Dev mailing list
Dev@wso2.org

Re: [Dev] Address endpoint and 404 code

2018-03-21 Thread Vinod Kavinda
Hi Thomas,
How about including your third step in a separate sequence and invoking it
from the fault sequence when it is triggered?

Thanks,
Vinod.

On Wed, Mar 21, 2018 at 8:05 PM, Himasha Guruge  wrote:

> Hi Thomas,
> Could you elaborate on following.
> " And because the second step can be invoked in many contexts, I can't
> just customize the fault sequence to invoke the third step."
>
> How about using switch mediator in fault sequence (for error_code
> property) and based on that, invoke the third step?
>
> Thanks,
> Himasha
>
> On Tue, Mar 20, 2018 at 8:43 PM, Thomas LEGRAND <
> thomas.legr...@versusmind.eu> wrote:
>
>> Hello,
>>
>> I have a situation where I want to retrieve data from two sources. So,
>> the client sends a request to a specific resource of an ESB API and the
>> sequence follows like this :
>>
>> - retrieve the data from the local source
>> - retrieve a corresponding id for the other source
>> - if the correspondence exists, retrieve the data from the other source
>>
>> In the second step, I call a little REST web service which returns a 404
>> when the correspondence does not exists. The call is implemented by using a
>> Address mediator, like this:
>>
>> 
>> 
>> 
>> 
>> 
>>
>> Of course, as you can see, the "getCorrespondenceUrl" is built just
>> before thanks to registry parameters. My problem is the Address endpoint
>> takes the 404 code as an error and just stop the sequence:
>>
>> TID: [-1234] [] [2018-03-20 15:48:45,114]  INFO {
>> org.apache.axis2.transport.http.HTTPSender} -  Unable to sendViaGet to
>> url[http://blablabla/find/my/correspondence] {
>> org.apache.axis2.transport.http.HTTPSender}
>> org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found
>>
>> So, I tried to use a fault sequence by setting the onError attribute:
>>
>> > onError="getCorrespondenceFaultSequence"
>> trace="disable" xmlns="http://ws.apache.org/ns/synapse;>
>> 
>>
>> However, once this sequence is triggered, there is no turning back to the
>> third step. And because the second step can be invoked in many contexts, I
>> can't just customize the fault sequence to invoke the third step.
>>
>> So, is there a way to tell the mediator that 404 is no big deal?
>>
>> Regards,
>>
>> Thomas
>>
>>
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Himasha Guruge
> Senior Software Engineer
> WS*O2* *Inc.*
> Mobile: +94 777459299 <+94%2077%20745%209299>
> himas...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Vinod Kavinda
Senior Software Engineer
*WSO2 Inc. - lean . enterprise . middleware .*
Mobile : +94 (0) 712 415544
Blog : http://soatechflicks.blogspot.com/
[image: http://wso2.com/signature]

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


Re: [Dev] Address endpoint and 404 code

2018-03-21 Thread Himasha Guruge
Hi Thomas,
Could you elaborate on following.
" And because the second step can be invoked in many contexts, I can't just
customize the fault sequence to invoke the third step."

How about using switch mediator in fault sequence (for error_code property)
and based on that, invoke the third step?

Thanks,
Himasha

On Tue, Mar 20, 2018 at 8:43 PM, Thomas LEGRAND <
thomas.legr...@versusmind.eu> wrote:

> Hello,
>
> I have a situation where I want to retrieve data from two sources. So, the
> client sends a request to a specific resource of an ESB API and the
> sequence follows like this :
>
> - retrieve the data from the local source
> - retrieve a corresponding id for the other source
> - if the correspondence exists, retrieve the data from the other source
>
> In the second step, I call a little REST web service which returns a 404
> when the correspondence does not exists. The call is implemented by using a
> Address mediator, like this:
>
> 
> 
> 
> 
> 
>
> Of course, as you can see, the "getCorrespondenceUrl" is built just before
> thanks to registry parameters. My problem is the Address endpoint takes the
> 404 code as an error and just stop the sequence:
>
> TID: [-1234] [] [2018-03-20 15:48:45,114]  INFO {
> org.apache.axis2.transport.http.HTTPSender} -  Unable to sendViaGet to
> url[http://blablabla/find/my/correspondence] {
> org.apache.axis2.transport.http.HTTPSender}
> org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found
>
> So, I tried to use a fault sequence by setting the onError attribute:
>
>  onError="getCorrespondenceFaultSequence"
> trace="disable" xmlns="http://ws.apache.org/ns/synapse;>
> 
>
> However, once this sequence is triggered, there is no turning back to the
> third step. And because the second step can be invoked in many contexts, I
> can't just customize the fault sequence to invoke the third step.
>
> So, is there a way to tell the mediator that 404 is no big deal?
>
> Regards,
>
> Thomas
>
>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Himasha Guruge
Senior Software Engineer
WS*O2* *Inc.*
Mobile: +94 777459299
himas...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Error while loading Tenant for the first time

2018-03-21 Thread Ruwan Yatawara
Hi All,

With the recent upgrade to new kernel version : 4.4.26, we can see the
following error when tenant is loaded for the first time, this happens
because the username argument passed to org.wso2.carbon.user.core.common.
AbstractUserStoreManager.getRoleListOfUser function is null. Even though
this error can be seen in the console nothing seems to be broken in the
normal execution flow.

This was observed in the IoT 3.3.0 as well as APIM 2.2.0.

Steps to reproduce : create a new tenant, log in to publisher or devicemgt
console with said tenant admin.

I believe this was observed sometime back as well (Discussed in a mail by
Ishara titled : "[ Dev] Error whileproduct-apim build"), but there is no
resolution in the thread.

Any recent changes that might have lead to this error?


[2018-03-21 14:34:41,833] ERROR - AbstractUserStoreManager Error occurred
while accessing Java Security Manager Privilege Block
[2018-03-21 14:34:41,839] ERROR - ContentBasedSearchService Invalid Search
Query, query contains invalid characters
org.apache.solr.common.SolrException: Error while creating user role filter
query
at org.wso2.carbon.registry.indexing.solr.SolrClient.
addUserRoleFilter(SolrClient.java:752)
at org.wso2.carbon.registry.indexing.solr.SolrClient.
query(SolrClient.java:598)
at org.wso2.carbon.registry.indexing.solr.SolrClient.
query(SolrClient.java:545)
at org.wso2.carbon.registry.indexing.service.ContentBasedSearchService.
searchContentInternal(ContentBasedSearchService.java:166)
at org.wso2.carbon.registry.indexing.service.ContentBasedSearchService.
searchByAttribute(ContentBasedSearchService.java:279)
at org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent$
AttributeSearchServiceImpl.search(IndexingServiceComponent.java:161)
at org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent$
AttributeSearchServiceImpl.search(IndexingServiceComponent.java:174)
at org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent$
AttributeSearchServiceImpl.search(IndexingServiceComponent.java:188)
at org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent$
AttributeSearchServiceImpl.search(IndexingServiceComponent.java:155)
at org.wso2.carbon.governance.lcm.util.CommonUtil.isLifecycleNameInUse(
CommonUtil.java:576)
at org.wso2.carbon.governance.lcm.util.CommonUtil.
addLifecycle(CommonUtil.java:262)
at org.wso2.carbon.governance.lcm.util.CommonUtil.
addDefaultLifecyclesIfNotAvailable(CommonUtil.java:496)
at org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.
jsFunction_login(APIProviderHostObject.java:264)
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.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at org.jaggeryjs.rhino.publisher.modules.user.c1._c_anonymous_
1(/publisher/modules/user/login.jag:20)
at org.jaggeryjs.rhino.publisher.modules.user.c1.call(/
publisher/modules/user/login.jag)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at org.jaggeryjs.rhino.publisher.modules.user.c0._c_anonymous_
1(/publisher/modules/user/module.jag:5)
at org.jaggeryjs.rhino.publisher.modules.user.c0.call(/
publisher/modules/user/module.jag)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.jaggeryjs.rhino.publisher.site.blocks.user.login.ajax.
c0._c_anonymous_1(/publisher/site/blocks/user/login/ajax/login.jag:29)
at org.jaggeryjs.rhino.publisher.site.blocks.user.login.ajax.
c0.call(/publisher/site/blocks/user/login/ajax/login.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
at org.jaggeryjs.rhino.publisher.site.blocks.user.login.ajax.
c0._c_script_0(/publisher/site/blocks/user/login/ajax/login.jag:5)
at org.jaggeryjs.rhino.publisher.site.blocks.user.login.ajax.
c0.call(/publisher/site/blocks/user/login/ajax/login.jag)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.jaggeryjs.rhino.publisher.site.blocks.user.login.ajax.
c0.call(/publisher/site/blocks/user/login/ajax/login.jag)
at org.jaggeryjs.rhino.publisher.site.blocks.user.login.ajax.
c0.exec(/publisher/site/blocks/user/login/ajax/login.jag)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(
RhinoEngine.java:567)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at 

Re: [Dev] SalesForce Bulk Api Issue when Creating the Upsert Job in WSO2

2018-03-21 Thread Lochana De Alwis
Hi Shakila,

Is upsert in Salesforce bulkapi jobs are available in SalesforceBulkApi
connector? Is insert job also acts as an upsert? As an example I need to
upload new records as well as update existing records in same batch? So can
you suggest me a way...?

Regards,
Prasan De Alwis

On 21 Mar 2018 1:42 p.m., "Shakila Sasikaran"  wrote:

> Hi Lochana,
>
> We don't support the custom fields in creating the job.
>
> [1] https://docs.wso2.com/display/ESBCONNECTORS/Working+
> with+Jobs+in+SalesforceBulk#WorkingwithJobsinSalesforceBulk-createJob
>
> Thanks
>
> On Wed, Mar 21, 2018 at 12:50 PM, Lochana De Alwis 
> wrote:
>
>> Hi Team,
>>
>> Im using SalesforceBulkApi connector(1.0.3) in WSO2 ESB(4.9.0) to upload
>> bulk object(Account) data to salesforce. I have created a test proxy
>> service to upload Account data to Salesforce..
>> Im having trouble to create the job using Upsert. Could you please go
>> through below xml of proxy service.
>>
>>
>> upsert
>> XML
>> External_ID__c
>> Account
>>  
>>
>> Im getting below error when calling from ESB.
>>
>> http://www.force.com/2009/06/asyncapi/dataload;>
>>InvalidJob
>>External ID was blank for Account. An External ID
>> must be specified for upsert.
>> 
>>
>> I have setup External_ID__c as external Id field in Salesforce Account
>> object.
>>
>>
>>
>> I have send a REST API request successfully using postman and get
>> response successfully.
>> Below is the postman request and the response.
>>
>> 
>> http://www.force.com/2009/06/asyncapi/dataload;>
>>  *upsert*
>>  Account
>>   External_ID__c
>>   XML
>> 
>>
>> Response
>> 
>> >xmlns="http://www.force.com/2009/06/asyncapi/dataload;>
>> 7509E03PD6EQAW
>> upsert
>> Account
>> 0059E03TrvLQAS
>> 2018-03-21T06:39:37.000Z
>> 2018-03-21T06:39:37.000Z
>> Open
>> External_ID__c
>> Parallel
>> XML
>> 0
>> 0
>> 0
>> 0
>> 0
>> 0
>> 0
>> 42.0
>> 0
>> 0
>> 0
>> 0
>> 
>>
>> So could you tell me what is the issue from WSO2 ESB bulk API upsert?
>>
>> Regards,
>> Prasan De Alwis
>> 077-4747163
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Shakila Sasikaran
> Software Engineer
> Mobile :+94 (0) 77 526 6848 <+94%2077%20526%206848>
> 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


Re: [Dev] SalesForce Bulk Api Issue when Creating the Upsert Job in WSO2

2018-03-21 Thread Shakila Sasikaran
Hi Lochana,

We don't support the custom fields in creating the job.

[1]
https://docs.wso2.com/display/ESBCONNECTORS/Working+with+Jobs+in+SalesforceBulk#WorkingwithJobsinSalesforceBulk-createJob

Thanks

On Wed, Mar 21, 2018 at 12:50 PM, Lochana De Alwis 
wrote:

> Hi Team,
>
> Im using SalesforceBulkApi connector(1.0.3) in WSO2 ESB(4.9.0) to upload
> bulk object(Account) data to salesforce. I have created a test proxy
> service to upload Account data to Salesforce..
> Im having trouble to create the job using Upsert. Could you please go
> through below xml of proxy service.
>
>
> upsert
> XML
> External_ID__c
> Account
>  
>
> Im getting below error when calling from ESB.
>
> http://www.force.com/2009/06/asyncapi/dataload;>
>InvalidJob
>External ID was blank for Account. An External ID
> must be specified for upsert.
> 
>
> I have setup External_ID__c as external Id field in Salesforce Account
> object.
>
>
>
> I have send a REST API request successfully using postman and get response
> successfully.
> Below is the postman request and the response.
>
> 
> http://www.force.com/2009/06/asyncapi/dataload;>
>  *upsert*
>  Account
>   External_ID__c
>   XML
> 
>
> Response
> 
> xmlns="http://www.force.com/2009/06/asyncapi/dataload;>
> 7509E03PD6EQAW
> upsert
> Account
> 0059E03TrvLQAS
> 2018-03-21T06:39:37.000Z
> 2018-03-21T06:39:37.000Z
> Open
> External_ID__c
> Parallel
> XML
> 0
> 0
> 0
> 0
> 0
> 0
> 0
> 42.0
> 0
> 0
> 0
> 0
> 
>
> So could you tell me what is the issue from WSO2 ESB bulk API upsert?
>
> Regards,
> Prasan De Alwis
> 077-4747163
>
> ___
> 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] SalesForce Bulk Api Issue when Creating the Upsert Job in WSO2

2018-03-21 Thread Lochana De Alwis
 Hi Team,

Im using SalesforceBulkApi connector(1.0.3) in WSO2 ESB(4.9.0) to upload
bulk object(Account) data to salesforce. I have created a test proxy
service to upload Account data to Salesforce..
Im having trouble to create the job using Upsert. Could you please go
through below xml of proxy service.

   
upsert
XML
External_ID__c
Account
 

Im getting below error when calling from ESB.

http://www.force.com/2009/06/asyncapi/dataload;>
   InvalidJob
   External ID was blank for Account. An External ID must
be specified for upsert.


I have setup External_ID__c as external Id field in Salesforce Account
object.



I have send a REST API request successfully using postman and get response
successfully.
Below is the postman request and the response.


http://www.force.com/2009/06/asyncapi/dataload;>
 *upsert*
 Account
  External_ID__c
  XML


Response

http://www.force.com/2009/06/asyncapi/dataload;>
7509E03PD6EQAW
upsert
Account
0059E03TrvLQAS
2018-03-21T06:39:37.000Z
2018-03-21T06:39:37.000Z
Open
External_ID__c
Parallel
XML
0
0
0
0
0
0
0
42.0
0
0
0
0


So could you tell me what is the issue from WSO2 ESB bulk API upsert?

Regards,
Prasan De Alwis
077-4747163
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Feign proxy server support

2018-03-21 Thread Madawa Soysa
Hi Madhawa,

Method [3] is used to generate the feign client in the APIM integration
client which publishes the APIs. Can we try to modify this method as
follows to support proxy capabilities? I believe this method is better than
forking the feign repo.

public static Client getSSLClient() {
boolean isIgnoreHostnameVerification =
Boolean.parseBoolean(System.getProperty("org.wso2.ignoreHostnameVerification"));
OkHttpClient okHttpClient;
String proxyHost = System.getProperty("http.proxyHost");
String proxyPort = System.getProperty("http.proxyPort");

Proxy proxy = new Proxy(Proxy.Type.HTTP, new
InetSocketAddress(proxyHost, Integer.parseInt(proxyPort)));
if(isIgnoreHostnameVerification) {
 okHttpClient = new OkHttpClient.Builder()
.sslSocketFactory(getSimpleTrustedSSLSocketFactory())
.hostnameVerifier(new HostnameVerifier() {
@Override
public boolean verify(String s, SSLSession sslSession) {
return true;
}
}).proxy(proxy).build();
return okHttpClient;
}else {
okHttpClient = new
OkHttpClient.Builder().sslSocketFactory(getTrustedSSLSocketFactory()).proxy(proxy).build();
return okHttpClient;
}
}


[3] -
https://github.com/wso2/carbon-device-mgt/blob/master/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/util/Utils.java#L76

Thanks,
Madawa


On Wed, Mar 21, 2018 at 11:31 AM, Madhawa Perera  wrote:

> Hi Thusitha,
>
> I saw this GitHub issue and did the fix on Feign client instead of using
> okhttp client. Fix worked as in my previous comment.
> But we will try OkHttpClient.Builder() as well.
>
> Thank you
> Best Regards,
> Madhawa
>
> On Wed, Mar 21, 2018 at 2:11 AM, Thusitha Thilina Dayaratne <
> thusithathil...@gmail.com> wrote:
>
>> Hi Madhawa,
>>
>> I think you can refer to [1] and [2]. Basic idea is to use okhttp client
>> inside the feign instead of feign default client.
>>
>> [1] - https://github.com/OpenFeign/feign/issues/370
>> [2] - https://github.com/OpenFeign/feign/tree/master/okhttp
>>
>> Thanks
>> Thusitha
>>
>> On Tue, Mar 20, 2018 at 11:45 PM, Madhawa Perera 
>> wrote:
>>
>>> Hi Rasika,
>>>
>>> Yes, I tried this [2] with a slight modification. It seems working.
>>> Need to modify the nonProxyHost check to be compatible with multiple
>>> hostnames. That is nonProxyHost can hold multiple values like
>>> "localhost|127.0.0.1".
>>>
>>> [2] https://github.com/madhawap/feign/commit/4aebf954e730cbeb4fd
>>> 8c58b95c8d455ab857747
>>>
>>> Thank you
>>> Best Regards,
>>> Madhawa
>>>
>>> On Tue, Mar 20, 2018 at 6:07 PM, Rasika Perera  wrote:
>>>
 Hi Madhawa,

 Have you tried forking Feign client? Seems there's a fix[1] for the
 issue of HTTP Proxy. Can you try it as well?

 [1] https://github.com/rhudson/feign/commit/5d611d7bcb767a26
 c06bffdc396f256d02dca353

 On Tue, Mar 20, 2018 at 5:41 PM, Madhawa Perera 
 wrote:

> Hi Devs,
>
> It seems that Feign isn't routing traffic through a configured proxy.
> I'm using Feign version 9.3.1
> Is there any way to route Feign traffic through an HTTP proxy server?
>
> I set VM args: -Dhttp.proxyHost and -Dhttp.proxyPort yet Feign seems
> not using these configurations. From looking at Feign.Client [1] there is
> no option to pass through a Proxy.
>
> Is there any way that we can overcome this restriction?
>
> [1] https://github.com/OpenFeign/feign/blob/9.3.1/core/src/m
> ain/java/feign/Client.java#L77
>
> Thank you
> Best Regards,
> Madhawa
>
> --
> Madhawa Perera | Software Engineer
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> 
> Mobile: +94 (0)77 365 5496 <+94%2077%20365%205496> | Work: +94 11 214
> 5345
> Email: madha...@wso2.com | Web: www.wso2.com
>
>


 --
 With Regards,

 *Rasika Perera*
 Senior Software Engineer
 Blogs: medium.com/@rasikaperera, tiriboy.blogspot.com
 PGP Key: 56E03A48
 LinkedIn: http://lk.linkedin.com/in/rasika90

 

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware

>>>
>>>
>>>
>>> --
>>> Madhawa Perera | Software Engineer
>>> WSO2, Inc | lean. enterprise. middleware.
>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>> 
>>> Mobile: +94 (0)77 365 5496 <077%20365%205496> | Work: +94 11 214 5345
>>> Email: madha...@wso2.com | Web: www.wso2.com
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> 

Re: [Dev] Feign proxy server support

2018-03-21 Thread Madhawa Perera
Hi Thusitha,

I saw this GitHub issue and did the fix on Feign client instead of using
okhttp client. Fix worked as in my previous comment.
But we will try OkHttpClient.Builder() as well.

Thank you
Best Regards,
Madhawa

On Wed, Mar 21, 2018 at 2:11 AM, Thusitha Thilina Dayaratne <
thusithathil...@gmail.com> wrote:

> Hi Madhawa,
>
> I think you can refer to [1] and [2]. Basic idea is to use okhttp client
> inside the feign instead of feign default client.
>
> [1] - https://github.com/OpenFeign/feign/issues/370
> [2] - https://github.com/OpenFeign/feign/tree/master/okhttp
>
> Thanks
> Thusitha
>
> On Tue, Mar 20, 2018 at 11:45 PM, Madhawa Perera 
> wrote:
>
>> Hi Rasika,
>>
>> Yes, I tried this [2] with a slight modification. It seems working.
>> Need to modify the nonProxyHost check to be compatible with multiple
>> hostnames. That is nonProxyHost can hold multiple values like
>> "localhost|127.0.0.1".
>>
>> [2] https://github.com/madhawap/feign/commit/4aebf954e730cbeb4fd
>> 8c58b95c8d455ab857747
>>
>> Thank you
>> Best Regards,
>> Madhawa
>>
>> On Tue, Mar 20, 2018 at 6:07 PM, Rasika Perera  wrote:
>>
>>> Hi Madhawa,
>>>
>>> Have you tried forking Feign client? Seems there's a fix[1] for the
>>> issue of HTTP Proxy. Can you try it as well?
>>>
>>> [1] https://github.com/rhudson/feign/commit/5d611d7bcb767a26
>>> c06bffdc396f256d02dca353
>>>
>>> On Tue, Mar 20, 2018 at 5:41 PM, Madhawa Perera 
>>> wrote:
>>>
 Hi Devs,

 It seems that Feign isn't routing traffic through a configured proxy.
 I'm using Feign version 9.3.1
 Is there any way to route Feign traffic through an HTTP proxy server?

 I set VM args: -Dhttp.proxyHost and -Dhttp.proxyPort yet Feign seems
 not using these configurations. From looking at Feign.Client [1] there is
 no option to pass through a Proxy.

 Is there any way that we can overcome this restriction?

 [1] https://github.com/OpenFeign/feign/blob/9.3.1/core/src/m
 ain/java/feign/Client.java#L77

 Thank you
 Best Regards,
 Madhawa

 --
 Madhawa Perera | Software Engineer
 WSO2, Inc | lean. enterprise. middleware.
 #20, Palm Grove, Colombo 03, Sri Lanka
 
 Mobile: +94 (0)77 365 5496 <+94%2077%20365%205496> | Work: +94 11 214
 5345
 Email: madha...@wso2.com | Web: www.wso2.com


>>>
>>>
>>> --
>>> With Regards,
>>>
>>> *Rasika Perera*
>>> Senior Software Engineer
>>> Blogs: medium.com/@rasikaperera, tiriboy.blogspot.com
>>> PGP Key: 56E03A48
>>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>>
>>> 
>>>
>>> WSO2 Inc. www.wso2.com
>>> lean.enterprise.middleware
>>>
>>
>>
>>
>> --
>> Madhawa Perera | Software Engineer
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> 
>> Mobile: +94 (0)77 365 5496 <077%20365%205496> | Work: +94 11 214 5345
>> Email: madha...@wso2.com | Web: www.wso2.com
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Thusitha Thilina Dayaratne*
> PhD Student - Cybersecurity Lab
> Monash University
>
>


-- 
Madhawa Perera | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 (0)77 365 5496 | Work: +94 11 214 5345
Email: madha...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev