Re: [Dev] Fwd: Possible Bug Reports
Hi Chiranga! Waiting for a response Sagar On Jul 21, 2017 10:07 PM, "Sagar Kapadia" wrote: > Hi Chiranga!, > Use this source. I fixed the osgi version to be compatible with WSO2 DAS, > and now the messages do show up in the console. [Please see the screenshot] > https://drive.google.com/file/d/0BwqZCw5oc2rwc2YxRkwyRWJnQnc/ > view?usp=sharing > Thanks, > Sagar > > > On Fri, Jul 21, 2017 at 3:19 PM, Sagar Kapadia wrote: > >> Hi Chiranga, >> please find the link to source of the custom event publisher project. >> >> https://drive.google.com/file/d/0BwqZCw5oc2rwb013Q2hwRTdEY0U >> /view?usp=sharing >> >> >> I can run it in Eclipse and it shows the desired output [ >> Hello World Before!! >> Registered Factory >> Registered Service >> Hello World AFter!! >> 3 is the id I get when I do ss in the osgi console >> However, when I deploy it to WSO2 DAS in the dropins folder, it shows no >> messages . When I do "start 3" ,it prints the following error message >> gogo: BundleException: The bundle "CustomEventPublisher_1.0.0.201707211505 >> [3]" could not be resolved. Reason: Missing Constraint: Import-Package: >> org.osgi.service.component; version="1.2.2" >> >> This problem did not occur earlier and I seem to have messed up the >> configuration of the project somehow. Previously, I used to get a listing >> of registered services, on doing "b 3" >> I will try to fix this issue , but am sending the code in the mean time >> Sincerely, >> Sagar >> >> >> On Fri, Jul 21, 2017 at 1:53 PM, Sagar Kapadia >> wrote: >> >>> Hi Chiranga, >>> I am using wso2das-3.1.0 >>> Sagar >>> >>> >>> On Fri, Jul 21, 2017 at 10:36 AM, Chiranga Alwis >>> wrote: >>> >>>> Hi Sagar, >>>> >>>> can you please specify the WSO2 Data Analytics Server version you are >>>> using, as well? >>>> >>>> On Thu, Jul 20, 2017 at 11:00 PM, Chiranga Alwis >>>> wrote: >>>> >>>>> Hi Sagar, >>>>> >>>>> it would be helpful if you could share the code mentioned in part a. >>>>> of your question. >>>>> >>>>> On Thu, Jul 20, 2017 at 1:02 PM, Chandana Napagoda >>>>> wrote: >>>>> >>>>>> +Chiranga >>>>>> >>>>>> On Thu, Jul 20, 2017 at 11:39 AM, Sagar Kapadia >>>>>> wrote: >>>>>> >>>>>>> >>>>>>> -- Forwarded message -- >>>>>>> From: Sagar Kapadia >>>>>>> Date: Wed, Jul 19, 2017 at 5:05 PM >>>>>>> Subject: Possible Bug Reports >>>>>>> To: dev-requ...@wso2.org, ash...@avinashi.com, >>>>>>> sa...@cloudnineconsulting.in >>>>>>> >>>>>>> >>>>>>> Hi, >>>>>>> a. Custom OSGI components are not recognized. >>>>>>> I created a custom event publisher and copied the jar to dropins >>>>>>> folder. The start method of the Activator class was called. But the >>>>>>> activate method was never called. I can share the code if required >>>>>>> This issue has been reported by someone else previously. >>>>>>> https://wso2.org/jira/browse/CARBON-12728 >>>>>>> >>>>>>> I have updated to latest version using WUM. >>>>>>> >>>>>>> b. The documentation of sample to create a custom event publisher is >>>>>>> out of date. The classes have been replaced by interfaces and vice >>>>>>> versa in >>>>>>> the present version of the library >>>>>>> >>>>>>> c. Console doesnt show up in windows 7 , similar to this question on >>>>>>> SO, which hasnt been >>>>>>> answered yet >>>>>>> >>>>>>> https://stackoverflow.com/questions/43608516/new-with-wso2-das >>>>>>> d. The Http Publisher writes events to the Trace, but does not >>>>>>> actually do a POST. The configuration is as below >>>>>>> >>>>>>> >>>>>> trace="enable" xmlns="http://wso2.org/carbon/eventpublisher";> >>>>>>>
Re: [Dev] Where is the create publishers, streams and receivers page in wso2das-4.0.0-M6
Thanks Grainier. I will check it out Regards, Sagar On Mon, Aug 21, 2017 at 7:13 AM, Grainier Perera wrote: > Hi Sagar, > > From SP 4.0.0-MX [1] (formerly DASw-4.0.0-MX) <, we don't have a > management console page (localhost:9443/carbon). Instead, we have the > editor. Also, there are some changes to key concepts such as receivers > and publishers. Instead of receivers and publishers, we have a new > concept called event source[2] and event sink[3], which can be defined > within the Siddhi App (execution plan) it self. Therefore, you don't have > to create streams, receivers, and publishers separately as you did in DAS > 3.1.0. > > Note: You can find the latest milestone release at [4] with further > improvements. > > [1] https://docs.wso2.com/display/SP400/ > [2] https://docs.wso2.com/display/SP400/Receiving+Events > [3] https://docs.wso2.com/display/SP400/Publishing+Events > [4] https://github.com/wso2/product-sp/releases/download/v4. > 0.0-M9/wso2sp-4.0.0-M9.zip > > Regards, > Grainier. > > On Sat, Jul 22, 2017 at 11:04 AM, Sagar Kapadia > wrote: > >> Hi, >> I installed wso2das-4.0.0-M6, and ran it using the "editor.bat" command. >> However, I cant figure out where is the localhost:9443/carbon page which >> was present in wso2das-3.1.0. I need that to create >> streams, publishers and receivers. The composer in wso2das-4.0.0-M6 >> allows me to handle events by linking streams. But where do I create the >> steams, receivers and publishers themselves? >> Sagar >> >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Grainier Perera > Senior Software Engineer > Mobile : +94716122384 > WSO2 Inc. | http://wso2.com > lean.enterprise.middleware > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Passing Parameters to the Implementation [Production and Sandbox] urls
Right thats what happened. It is necessary to pass the complete url to test, otherwise there is a 404 error. However, while saving, it is necessary to remove the duplicated parts of the url. I figured this out by checking the logs of the implementing web service sagar On Thu, Aug 3, 2017 at 2:03 PM, Rasika Perera wrote: > By the way, I had to give http://192.168.11.65:8000/BizBrainTally/api >> <http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/%7Bcompany%7D> >> as >> the end point and not http://192.168.11.65:8000/ >> BizBrainTally/api/ledgers/customers/ >> >> <http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/%7Bcompany%7D>This >> allowed the call to succeed but the clicking the test button showed failed > > Glad to hear it worked! Yes, as I mentioned earlier it depends on how you > allow clients to call the API. In your case you might call the API with > https://:8280/ > BizBrainTally/api/ > 1.0/ > ledgers/ > customers/Test". > > This allowed the call to succeed but the clicking the test button showed >> failed > > AFAIK, Test button simply checks the endpoint with a GET call. > http://192.168.11.65:8000/BizBrainTally/api/ > > > <http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/%7Bcompany%7D> > > would have sent a 404 in this case. > > On Thu, Aug 3, 2017 at 1:34 PM, Sagar Kapadia wrote: > >> By the way, I had to give http://192.168.11.65:8000/BizBrainTally/api >> <http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/%7Bcompany%7D> >> as >> the end point and not http://192.168.11.65:8000/ >> BizBrainTally/api/ledgers/customers/ >> <http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/%7Bcompany%7D> >> This allowed the call to succeed but the clicking the test button showed >> failed >> >> >> On Thu, Aug 3, 2017 at 1:29 PM, Sagar Kapadia wrote: >> >>> Thanks Rasika, >>> Thanks, I got it working. >>> >>> On Thu, Aug 3, 2017 at 1:18 PM, Rasika Perera wrote: >>> >>>> Hi Sagara, >>>> >>>> I think you are confused with API endpoint and the resource paths. >>>> Please refer [1] as an example. Path parameters are not allowed for the >>>> "Production EndPoint". >>>> >>>> *Your resource path should be:* >>>> /{Company} >>>> >>>> *Your endpoint should be : * >>>> http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/ >>>> <http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/%7Bcompany%7D> >>>> >>>> You can also try "/customers/{Company}" as resource path and " >>>> http://192.168.11.65:8000/BizBrainTally/api/ledgers/"; as the endpoint >>>> too. This depends on the granularity and resource paths of the API >>>> that you are hoping to expose through WSO2 API Manager. >>>> >>>> [1] https://docs.wso2.com/display/AM210/Create+and+Publish+an+API >>>> >>>> On Thu, Aug 3, 2017 at 1:05 PM, Sagar Kapadia >>>> wrote: >>>> >>>>> Hi Rasika and Abimaran, >>>>> >>>>> I am accepting a parameter on the front end rest api. Now I need to >>>>> pass this parameter to the implementing api. How do I do that. >>>>> >>>>> The following is the implementing api >>>>> >>>>> http://192.168.11.65:8000/BizBrainTally/api/ledgers/customer >>>>> s/{company} >>>>> >>>>> But adding {company} causes the test to fail with invalid message, and >>>>> if I remove {company}, I get a 404 Error from the implementing server. >>>>> >>>>> The test succeeds if I put the following url >>>>> http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/Test >>>>> where "Test" is the parameter >>>>> >>>>> I am attaching screen shots to show what I mean. >>>>> >>>>> Sagar >>>>> >>>>> On Thu, Aug 3, 2017 at 12:37 PM, Sagar Kapadia >>>>> wrote: >>>>> >>>>>> Hi Rasika! >>>>>> Thanks for your reply. I checked via ipconfig and its my IP. sorry >>>>>> for the confusion. I have two ips. Now the next question is how to pass >>>>>> parameters to the implementation endpoint. Or at least, if I can log the >>>>>> request being made to the end point it would be
Re: [Dev] How to create a websocket implementation of an end point
Hi Arshardh, Thanks for your reply Sagar On Thu, Aug 3, 2017 at 2:28 PM, Arshardh Ifthikar < arshardhifthi...@gmail.com> wrote: > Hi Sagar, > Currently (WSO2 API manager 2.1) it isn't possible to add a websocket > endpoint to a REST api. This is because currently synapse support > websockets through inbound endpoints. A websocket endpoint can only be > added to a Websocket API. > > Thank You. > > On Thu, Aug 3, 2017 at 12:57 PM, Sagar Kapadia wrote: > >> Hi Abimaran, >> I got that , thanks. My specific need is a front end REST API with a back >> end [implementation endpoint] being a web socket. >> i see options for REST and SOAP and Dynamic Endpoints, but none for a >> websocket endpoint. Is this possible? >> If I want to set the production or sandbox url to >> ws://localhost:1880/api, I cant figure out a way to do this. I entered the >> url for the websocket in the text field, but then in the store, the api >> console tab is missing. >> Sagar >> >> >> On Wed, Aug 2, 2017 at 6:27 PM, Abimaran Kugathasan >> wrote: >> >>> Hi Sagar, >>> >>> WebSocket APIs are introduced in 2.1, it's in 'Design' tab as below. >>> >>> >>> >>> >>> >>> On Wed, Aug 2, 2017 at 4:20 PM, Sagar Kapadia >>> wrote: >>> >>>> Hi, >>>> I cant see a way to create a web socket endpoint implementation .Please >>>> let me know how to do this >>>> Sagar >>>> >>>> ___ >>>> 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 <+94%2077%20392%202820> >>> >>> <http://stackoverflow.com/users/515034> >>> <http://lk.linkedin.com/in/abimaran> >>> <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> >>> <https://twitter.com/abimaran> >>> >>> >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Passing Parameters to the Implementation [Production and Sandbox] urls
By the way, I had to give http://192.168.11.65:8000/BizBrainTally/api <http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/%7Bcompany%7D> as the end point and not http://192.168.11.65:8000/BizB rainTally/api/ledgers/customers/ <http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/%7Bcompany%7D> This allowed the call to succeed but the clicking the test button showed failed On Thu, Aug 3, 2017 at 1:29 PM, Sagar Kapadia wrote: > Thanks Rasika, > Thanks, I got it working. > > On Thu, Aug 3, 2017 at 1:18 PM, Rasika Perera wrote: > >> Hi Sagara, >> >> I think you are confused with API endpoint and the resource paths. Please >> refer [1] as an example. Path parameters are not allowed for the >> "Production EndPoint". >> >> *Your resource path should be:* >> /{Company} >> >> *Your endpoint should be : * >> http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/ >> <http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/%7Bcompany%7D> >> >> You can also try "/customers/{Company}" as resource path and " >> http://192.168.11.65:8000/BizBrainTally/api/ledgers/"; as the endpoint >> too. This depends on the granularity and resource paths of the API that >> you are hoping to expose through WSO2 API Manager. >> >> [1] https://docs.wso2.com/display/AM210/Create+and+Publish+an+API >> >> On Thu, Aug 3, 2017 at 1:05 PM, Sagar Kapadia wrote: >> >>> Hi Rasika and Abimaran, >>> >>> I am accepting a parameter on the front end rest api. Now I need to pass >>> this parameter to the implementing api. How do I do that. >>> >>> The following is the implementing api >>> >>> http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/{company} >>> >>> But adding {company} causes the test to fail with invalid message, and >>> if I remove {company}, I get a 404 Error from the implementing server. >>> >>> The test succeeds if I put the following url >>> http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/Test >>> where "Test" is the parameter >>> >>> I am attaching screen shots to show what I mean. >>> >>> Sagar >>> >>> On Thu, Aug 3, 2017 at 12:37 PM, Sagar Kapadia >>> wrote: >>> >>>> Hi Rasika! >>>> Thanks for your reply. I checked via ipconfig and its my IP. sorry for >>>> the confusion. I have two ips. Now the next question is how to pass >>>> parameters to the implementation endpoint. Or at least, if I can log the >>>> request being made to the end point it would be very helpful, since I am >>>> not getting any response from the server, but if I call the end point from >>>> the browser, I get a valid response >>>> Sagar >>>> >>>> On Thu, Aug 3, 2017 at 11:59 AM, Rasika Perera >>>> wrote: >>>> >>>>> Hi Sagar, >>>>> >>>>> Are you using VMware or virtualbox? Please check your network >>>>> interfaces. Sometimes WSO2 Server could have binded into a wrong network >>>>> interface when there are multiple network interfaces in the host machine. >>>>> >>>>> You can check this with ifconfig(in linux) or ipconfig(in windows). >>>>> >>>>> Best Regards, >>>>> Rasika >>>>> >>>>> On Wed, Aug 2, 2017 at 8:28 PM, Sagar Kapadia >>>>> wrote: >>>>> >>>>>> Abimaran, >>>>>> Actually, API manager is running on 192.168.11.68 and not 192.168.144.2. >>>>>> I am making a call to API manager via the swagger definition in the api >>>>>> store. However, the end point doesnt get hit because it is pointing to >>>>>> the >>>>>> wrong url [192.168.144.2.] instead of 192.168.11.65 >>>>>> Sagar >>>>>> >>>>>> On Wed, Aug 2, 2017 at 6:15 PM, Abimaran Kugathasan < >>>>>> abima...@wso2.com> wrote: >>>>>> >>>>>>> Hi Sagar, >>>>>>> >>>>>>> API Manager runs on 192.168.144.2 and this IP is shown in Store UI. >>>>>>> If you want to hit the backend directly from your client, then there >>>>>>> isn't >>>>>>> any reason for using API Manager. I don't understand why you are >>>>>>> expecting >>&g
Re: [Dev] Passing Parameters to the Implementation [Production and Sandbox] urls
Thanks Rasika, Thanks, I got it working. On Thu, Aug 3, 2017 at 1:18 PM, Rasika Perera wrote: > Hi Sagara, > > I think you are confused with API endpoint and the resource paths. Please > refer [1] as an example. Path parameters are not allowed for the > "Production EndPoint". > > *Your resource path should be:* > /{Company} > > *Your endpoint should be : * > http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/ > <http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/%7Bcompany%7D> > > You can also try "/customers/{Company}" as resource path and " > http://192.168.11.65:8000/BizBrainTally/api/ledgers/"; as the endpoint > too. This depends on the granularity and resource paths of the API that > you are hoping to expose through WSO2 API Manager. > > [1] https://docs.wso2.com/display/AM210/Create+and+Publish+an+API > > On Thu, Aug 3, 2017 at 1:05 PM, Sagar Kapadia wrote: > >> Hi Rasika and Abimaran, >> >> I am accepting a parameter on the front end rest api. Now I need to pass >> this parameter to the implementing api. How do I do that. >> >> The following is the implementing api >> >> http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/{company} >> >> But adding {company} causes the test to fail with invalid message, and if >> I remove {company}, I get a 404 Error from the implementing server. >> >> The test succeeds if I put the following url >> http://192.168.11.65:8000/BizBrainTally/api/ledgers/customers/Test >> where "Test" is the parameter >> >> I am attaching screen shots to show what I mean. >> >> Sagar >> >> On Thu, Aug 3, 2017 at 12:37 PM, Sagar Kapadia >> wrote: >> >>> Hi Rasika! >>> Thanks for your reply. I checked via ipconfig and its my IP. sorry for >>> the confusion. I have two ips. Now the next question is how to pass >>> parameters to the implementation endpoint. Or at least, if I can log the >>> request being made to the end point it would be very helpful, since I am >>> not getting any response from the server, but if I call the end point from >>> the browser, I get a valid response >>> Sagar >>> >>> On Thu, Aug 3, 2017 at 11:59 AM, Rasika Perera wrote: >>> >>>> Hi Sagar, >>>> >>>> Are you using VMware or virtualbox? Please check your network >>>> interfaces. Sometimes WSO2 Server could have binded into a wrong network >>>> interface when there are multiple network interfaces in the host machine. >>>> >>>> You can check this with ifconfig(in linux) or ipconfig(in windows). >>>> >>>> Best Regards, >>>> Rasika >>>> >>>> On Wed, Aug 2, 2017 at 8:28 PM, Sagar Kapadia >>>> wrote: >>>> >>>>> Abimaran, >>>>> Actually, API manager is running on 192.168.11.68 and not 192.168.144.2. >>>>> I am making a call to API manager via the swagger definition in the api >>>>> store. However, the end point doesnt get hit because it is pointing to the >>>>> wrong url [192.168.144.2.] instead of 192.168.11.65 >>>>> Sagar >>>>> >>>>> On Wed, Aug 2, 2017 at 6:15 PM, Abimaran Kugathasan >>>> > wrote: >>>>> >>>>>> Hi Sagar, >>>>>> >>>>>> API Manager runs on 192.168.144.2 and this IP is shown in Store UI. >>>>>> If you want to hit the backend directly from your client, then there >>>>>> isn't >>>>>> any reason for using API Manager. I don't understand why you are >>>>>> expecting >>>>>> to hit backend URL directly. API Manager function as a proxy to route the >>>>>> request to the backend which runs on 192.168.11.65. >>>>>> >>>>>> There can be many reasons not receiving a response, this might help >>>>>> you on this [1]. Also, You can try using cURL. >>>>>> >>>>>> [1]: http://blog.lakmali.com/2014/11/troubleshooting-issues- >>>>>> with-swagger-in.html >>>>>> >>>>>> On Wed, Aug 2, 2017 at 5:15 PM, Sagar Kapadia >>>>>> wrote: >>>>>> >>>>>>> Hi Thuistha, >>>>>>> Thanks for your quick response. I had followed the tutorial below. >>>>>>> My problem is my pc has ip 192.168.11.68 and not 192.168.144.2. >>>>>&g
Re: [Dev] Why does WSO2 API Manager change the endpoint ip and port addresses to 192.168.144.2:8280
The API manager is on my local machine. I am calling the api manager [on the local host] via the swagger definition in the api store. The implementation [production] url is on a remote machine http:/*/192.168.11.65 <http://192.168.11.65>:* 8000/BizBrainTally/api/ledgers/customers/{company} I can call the above url from the browser, and it gives the correct response as can be seen from the screen shot On Thu, Aug 3, 2017 at 1:05 PM, Rasika Perera wrote: > Hi Sagara, > > Please find inline comments; > > Thanks for your reply. I checked via ipconfig and its my IP. sorry for the >> confusion. I have two ips. > > You are most welcome! It is a valid requirement to have two network > interfaces but you might need to configure with [1]. Can you share with us > the output of the ipconfig command. > > Or at least, if I can log the request being made to the end point it would >> be very helpful, since I am not getting any response from the server, but >> if I call the end point from the browser, I get a valid response > > Didn't get what you get by calling from the browser. > > Are you trying this API Manager in a remote host or in a local machine? > > > [1] https://docs.wso2.com/display/AM210/Customize+the+ > API+Store+and+Gateway+URLs > > > On Thu, Aug 3, 2017 at 12:37 PM, Sagar Kapadia wrote: > >> Hi Rasika! >> Thanks for your reply. I checked via ipconfig and its my IP. sorry for >> the confusion. I have two ips. Now the next question is how to pass >> parameters to the implementation endpoint. Or at least, if I can log the >> request being made to the end point it would be very helpful, since I am >> not getting any response from the server, but if I call the end point from >> the browser, I get a valid response >> Sagar >> >> On Thu, Aug 3, 2017 at 11:59 AM, Rasika Perera wrote: >> >>> Hi Sagar, >>> >>> Are you using VMware or virtualbox? Please check your network >>> interfaces. Sometimes WSO2 Server could have binded into a wrong network >>> interface when there are multiple network interfaces in the host machine. >>> >>> You can check this with ifconfig(in linux) or ipconfig(in windows). >>> >>> Best Regards, >>> Rasika >>> >>> On Wed, Aug 2, 2017 at 8:28 PM, Sagar Kapadia >>> wrote: >>> >>>> Abimaran, >>>> Actually, API manager is running on 192.168.11.68 and not 192.168.144.2. >>>> I am making a call to API manager via the swagger definition in the api >>>> store. However, the end point doesnt get hit because it is pointing to the >>>> wrong url [192.168.144.2.] instead of 192.168.11.65 >>>> Sagar >>>> >>>> On Wed, Aug 2, 2017 at 6:15 PM, Abimaran Kugathasan >>>> wrote: >>>> >>>>> Hi Sagar, >>>>> >>>>> API Manager runs on 192.168.144.2 and this IP is shown in Store UI. If >>>>> you want to hit the backend directly from your client, then there isn't >>>>> any >>>>> reason for using API Manager. I don't understand why you are expecting to >>>>> hit backend URL directly. API Manager function as a proxy to route the >>>>> request to the backend which runs on 192.168.11.65. >>>>> >>>>> There can be many reasons not receiving a response, this might help >>>>> you on this [1]. Also, You can try using cURL. >>>>> >>>>> [1]: http://blog.lakmali.com/2014/11/troubleshooting-issues- >>>>> with-swagger-in.html >>>>> >>>>> On Wed, Aug 2, 2017 at 5:15 PM, Sagar Kapadia >>>>> wrote: >>>>> >>>>>> Hi Thuistha, >>>>>> Thanks for your quick response. I had followed the tutorial below. My >>>>>> problem is my pc has ip 192.168.11.68 and not 192.168.144.2. >>>>>> when I try to call the api from the api store page via it's swagger >>>>>> definition ,there is a call to my server but, i get no response from the >>>>>> server. I believe the reason is that the implementation url of the api >>>>>> points to an invalid ip (192.168.144.2), instead of the ip i >>>>>> specified in production and sandbox url. >>>>>> This is my confusion. >>>>>> Sagar >>>>>> >>>>>> On Aug 2, 2017 4:24 PM, "Thusitha Thilina Dayaratne" < >>>>>> thusit...@wso2.com> wrote: >>>>>>
Re: [Dev] How to create a websocket implementation of an end point
Hi Abimaran, I got that , thanks. My specific need is a front end REST API with a back end [implementation endpoint] being a web socket. i see options for REST and SOAP and Dynamic Endpoints, but none for a websocket endpoint. Is this possible? If I want to set the production or sandbox url to ws://localhost:1880/api, I cant figure out a way to do this. I entered the url for the websocket in the text field, but then in the store, the api console tab is missing. Sagar On Wed, Aug 2, 2017 at 6:27 PM, Abimaran Kugathasan wrote: > Hi Sagar, > > WebSocket APIs are introduced in 2.1, it's in 'Design' tab as below. > > > > > > On Wed, Aug 2, 2017 at 4:20 PM, Sagar Kapadia wrote: > >> Hi, >> I cant see a way to create a web socket endpoint implementation .Please >> let me know how to do this >> Sagar >> >> ___ >> 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 > > <http://stackoverflow.com/users/515034> > <http://lk.linkedin.com/in/abimaran> > <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> > <https://twitter.com/abimaran> > > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Why does WSO2 API Manager change the endpoint ip and port addresses to 192.168.144.2:8280
Hi Rasika! Thanks for your reply. I checked via ipconfig and its my IP. sorry for the confusion. I have two ips. Now the next question is how to pass parameters to the implementation endpoint. Or at least, if I can log the request being made to the end point it would be very helpful, since I am not getting any response from the server, but if I call the end point from the browser, I get a valid response Sagar On Thu, Aug 3, 2017 at 11:59 AM, Rasika Perera wrote: > Hi Sagar, > > Are you using VMware or virtualbox? Please check your network interfaces. > Sometimes WSO2 Server could have binded into a wrong network interface when > there are multiple network interfaces in the host machine. > > You can check this with ifconfig(in linux) or ipconfig(in windows). > > Best Regards, > Rasika > > On Wed, Aug 2, 2017 at 8:28 PM, Sagar Kapadia wrote: > >> Abimaran, >> Actually, API manager is running on 192.168.11.68 and not 192.168.144.2. >> I am making a call to API manager via the swagger definition in the api >> store. However, the end point doesnt get hit because it is pointing to the >> wrong url [192.168.144.2.] instead of 192.168.11.65 >> Sagar >> >> On Wed, Aug 2, 2017 at 6:15 PM, Abimaran Kugathasan >> wrote: >> >>> Hi Sagar, >>> >>> API Manager runs on 192.168.144.2 and this IP is shown in Store UI. If >>> you want to hit the backend directly from your client, then there isn't any >>> reason for using API Manager. I don't understand why you are expecting to >>> hit backend URL directly. API Manager function as a proxy to route the >>> request to the backend which runs on 192.168.11.65. >>> >>> There can be many reasons not receiving a response, this might help you >>> on this [1]. Also, You can try using cURL. >>> >>> [1]: http://blog.lakmali.com/2014/11/troubleshooting-issues- >>> with-swagger-in.html >>> >>> On Wed, Aug 2, 2017 at 5:15 PM, Sagar Kapadia >>> wrote: >>> >>>> Hi Thuistha, >>>> Thanks for your quick response. I had followed the tutorial below. My >>>> problem is my pc has ip 192.168.11.68 and not 192.168.144.2. >>>> when I try to call the api from the api store page via it's swagger >>>> definition ,there is a call to my server but, i get no response from the >>>> server. I believe the reason is that the implementation url of the api >>>> points to an invalid ip (192.168.144.2), instead of the ip i specified >>>> in production and sandbox url. >>>> This is my confusion. >>>> Sagar >>>> >>>> On Aug 2, 2017 4:24 PM, "Thusitha Thilina Dayaratne" < >>>> thusit...@wso2.com> wrote: >>>> >>>>> Hi Sagar, >>>>> >>>>> 192.168.144.2 is the IP address of your APIM running instance and 8280 >>>>> is the port which exposes your API through the API manager. When you >>>>> invoke >>>>> the http://192.168.144.2:8280/// it will be >>>>> sent to the production endpoint that you configured through the UI. >>>>> >>>>> You can refer to APIM Docs[1] for more details >>>>> >>>>> [1] - https://docs.wso2.com/display/AM210/Create+and+Publish+an+API >>>>> >>>>> Thanks >>>>> >>>>> >>>>> >>>>> On Wed, Aug 2, 2017 at 4:19 PM, Sagar Kapadia >>>>> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Wed, Aug 2, 2017 at 4:18 PM, Sagar Kapadia >>>>>> wrote: >>>>>> >>>>>>> Hi, >>>>>>> I tried to create an API in the API manager. Everything is ok, >>>>>>> except for the fact that the end point ip anddress and port in the >>>>>>> implementation page are ignored. I get the following ip address and port >>>>>>> 192.168.144.2:8280 >>>>>>> >>>>>>> The screen shots show the issue >>>>>>> Sagar >>>>>>> >>>>>> >>>>>> >>>>>> ___ >>>>>> Dev mailing list >>>>>> Dev@wso2.org >>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Thusitha Dayaratne >>>>>
Re: [Dev] How to create a websocket implementation of an end point
Thanks a lot abimaran On Wed, Aug 2, 2017 at 6:27 PM, Abimaran Kugathasan wrote: > Hi Sagar, > > WebSocket APIs are introduced in 2.1, it's in 'Design' tab as below. > > > > > > On Wed, Aug 2, 2017 at 4:20 PM, Sagar Kapadia wrote: > >> Hi, >> I cant see a way to create a web socket endpoint implementation .Please >> let me know how to do this >> Sagar >> >> ___ >> 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 > > <http://stackoverflow.com/users/515034> > <http://lk.linkedin.com/in/abimaran> > <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> > <https://twitter.com/abimaran> > > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Why does WSO2 API Manager change the endpoint ip and port addresses to 192.168.144.2:8280
Abimaran, Actually, API manager is running on 192.168.11.68 and not 192.168.144.2. I am making a call to API manager via the swagger definition in the api store. However, the end point doesnt get hit because it is pointing to the wrong url [192.168.144.2.] instead of 192.168.11.65 Sagar On Wed, Aug 2, 2017 at 6:15 PM, Abimaran Kugathasan wrote: > Hi Sagar, > > API Manager runs on 192.168.144.2 and this IP is shown in Store UI. If you > want to hit the backend directly from your client, then there isn't any > reason for using API Manager. I don't understand why you are expecting to > hit backend URL directly. API Manager function as a proxy to route the > request to the backend which runs on 192.168.11.65. > > There can be many reasons not receiving a response, this might help you on > this [1]. Also, You can try using cURL. > > [1]: http://blog.lakmali.com/2014/11/troubleshooting- > issues-with-swagger-in.html > > On Wed, Aug 2, 2017 at 5:15 PM, Sagar Kapadia wrote: > >> Hi Thuistha, >> Thanks for your quick response. I had followed the tutorial below. My >> problem is my pc has ip 192.168.11.68 and not 192.168.144.2. >> when I try to call the api from the api store page via it's swagger >> definition ,there is a call to my server but, i get no response from the >> server. I believe the reason is that the implementation url of the api >> points to an invalid ip (192.168.144.2), instead of the ip i specified >> in production and sandbox url. >> This is my confusion. >> Sagar >> >> On Aug 2, 2017 4:24 PM, "Thusitha Thilina Dayaratne" >> wrote: >> >>> Hi Sagar, >>> >>> 192.168.144.2 is the IP address of your APIM running instance and 8280 >>> is the port which exposes your API through the API manager. When you invoke >>> the http://192.168.144.2:8280/// it will be >>> sent to the production endpoint that you configured through the UI. >>> >>> You can refer to APIM Docs[1] for more details >>> >>> [1] - https://docs.wso2.com/display/AM210/Create+and+Publish+an+API >>> >>> Thanks >>> >>> >>> >>> On Wed, Aug 2, 2017 at 4:19 PM, Sagar Kapadia >>> wrote: >>> >>>> >>>> >>>> On Wed, Aug 2, 2017 at 4:18 PM, Sagar Kapadia >>>> wrote: >>>> >>>>> Hi, >>>>> I tried to create an API in the API manager. Everything is ok, except >>>>> for the fact that the end point ip anddress and port in the implementation >>>>> page are ignored. I get the following ip address and port >>>>> 192.168.144.2:8280 >>>>> >>>>> The screen shots show the issue >>>>> Sagar >>>>> >>>> >>>> >>>> ___ >>>> Dev mailing list >>>> Dev@wso2.org >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Thusitha Dayaratne >>> WSO2 Inc. - lean . enterprise . middleware | wso2.com >>> >>> Mobile +94712756809 <+94%2071%20275%206809> >>> Blog alokayasoya.blogspot.com >>> Abouthttp://about.me/thusithathilina >>> <http://wso2.com/signature> >>> >>> >> ___ >> 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 > > <http://stackoverflow.com/users/515034> > <http://lk.linkedin.com/in/abimaran> > <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> > <https://twitter.com/abimaran> > > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Why does WSO2 API Manager change the endpoint ip and port addresses to 192.168.144.2:8280
Hi Abimaran, Thanks for your reply. Does that mean that i can ignore the displayed url. But when i call the api through swagger definition in api store page, call goes through correctly, but actual end point is not hit. What could the reason be? Sagar On Aug 2, 2017 5:01 PM, "Abimaran Kugathasan" wrote: > Hi Sagar, > > Production URL shown in publisher UI is your real backend production URL > and Production and Sandbox URL shown in Store is Gateway's (or API Manager) > URL for that API, not the real backend URL. And you are supposed to use > that to invoke the API. > > On Wed, Aug 2, 2017 at 4:24 PM, Thusitha Thilina Dayaratne < > thusit...@wso2.com> wrote: > >> Hi Sagar, >> >> 192.168.144.2 is the IP address of your APIM running instance and 8280 is >> the port which exposes your API through the API manager. When you invoke >> the http://192.168.144.2:8280/// it will be sent >> to the production endpoint that you configured through the UI. >> >> You can refer to APIM Docs[1] for more details >> >> [1] - https://docs.wso2.com/display/AM210/Create+and+Publish+an+API >> >> Thanks >> >> >> >> On Wed, Aug 2, 2017 at 4:19 PM, Sagar Kapadia wrote: >> >>> >>> >>> On Wed, Aug 2, 2017 at 4:18 PM, Sagar Kapadia >>> wrote: >>> >>>> Hi, >>>> I tried to create an API in the API manager. Everything is ok, except >>>> for the fact that the end point ip anddress and port in the implementation >>>> page are ignored. I get the following ip address and port >>>> 192.168.144.2:8280 >>>> >>>> The screen shots show the issue >>>> Sagar >>>> >>> >>> >>> ___ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Thusitha Dayaratne >> WSO2 Inc. - lean . enterprise . middleware | wso2.com >> >> Mobile +94712756809 <+94%2071%20275%206809> >> Blog alokayasoya.blogspot.com >> Abouthttp://about.me/thusithathilina >> <http://wso2.com/signature> >> >> >> ___ >> 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 > > <http://stackoverflow.com/users/515034> > <http://lk.linkedin.com/in/abimaran> > <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> > <https://twitter.com/abimaran> > > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Why does WSO2 API Manager change the endpoint ip and port addresses to 192.168.144.2:8280
Hi Thuistha, Thanks for your quick response. I had followed the tutorial below. My problem is my pc has ip 192.168.11.68 and not 192.168.144.2. when I try to call the api from the api store page via it's swagger definition ,there is a call to my server but, i get no response from the server. I believe the reason is that the implementation url of the api points to an invalid ip (192.168.144.2), instead of the ip i specified in production and sandbox url. This is my confusion. Sagar On Aug 2, 2017 4:24 PM, "Thusitha Thilina Dayaratne" wrote: > Hi Sagar, > > 192.168.144.2 is the IP address of your APIM running instance and 8280 is > the port which exposes your API through the API manager. When you invoke > the http://192.168.144.2:8280/// it will be sent > to the production endpoint that you configured through the UI. > > You can refer to APIM Docs[1] for more details > > [1] - https://docs.wso2.com/display/AM210/Create+and+Publish+an+API > > Thanks > > > > On Wed, Aug 2, 2017 at 4:19 PM, Sagar Kapadia wrote: > >> >> >> On Wed, Aug 2, 2017 at 4:18 PM, Sagar Kapadia wrote: >> >>> Hi, >>> I tried to create an API in the API manager. Everything is ok, except >>> for the fact that the end point ip anddress and port in the implementation >>> page are ignored. I get the following ip address and port >>> 192.168.144.2:8280 >>> >>> The screen shots show the issue >>> Sagar >>> >> >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Thusitha Dayaratne > WSO2 Inc. - lean . enterprise . middleware | wso2.com > > Mobile +94712756809 > Blog alokayasoya.blogspot.com > Abouthttp://about.me/thusithathilina > <http://wso2.com/signature> > > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] How to create a websocket implementation of an end point
Hi, I cant see a way to create a web socket endpoint implementation .Please let me know how to do this Sagar ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Why does WSO2 API Manager change the endpoint ip and port addresses to 192.168.144.2:8280
On Wed, Aug 2, 2017 at 4:18 PM, Sagar Kapadia wrote: > Hi, > I tried to create an API in the API manager. Everything is ok, except for > the fact that the end point ip anddress and port in the implementation page > are ignored. I get the following ip address and port > 192.168.144.2:8280 > > The screen shots show the issue > Sagar > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Issues in the Admin API WSDL Files
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&type=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 >>> <http://www.soapui.org/> (4.5.1 or later) or wsdl2java. >>> >>> The wsdl2java tool, which comes with WSO2 pro
Re: [Dev] Problems with EventStreamAdminService
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.h
Re: [Dev] Problems with EventStreamAdminService
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 >>
Re: [Dev] Problems with EventStreamAdminService
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 &q
Re: [Dev] Problems with EventStreamAdminService
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 Authe
[Dev] Problems with EventStreamAdminService
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
Re: [Dev] Issues in the Admin API WSDL Files
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 <http://www.soapui.org/> (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 <https://svn.wso2.org/repos/wso2/people/asela/user-mgt/remote-user-api/4.2.X/> 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
[Dev] Output Mapping of JSON : missing type Object or should be properly escaped JSON
Hi, I have created a WebSocketReceiver, A Stream and a Kafka Publisher with the following configuration *Receiver* http://wso2.org/carbon/eventreceiver";> ws://localhost:1880/node-red/twitterStream false *Stream * { "streamId": "TweetStream:1.0.0", "name": "TweetStream", "version": "1.0.0", "nickName": "TweetStream", "description": "TweetStream", "metaData": [], "correlationData": [], "payloadData": [ { "name": "twitterMessage", "type": "STRING" } ] } http://wso2.org/carbon/eventpublisher";> SmartCity localhost:9092 My issue is that there is not type for JSON object. I am forced to use string. And this causes the json object to be enclosed in quotes, as can be seen from the following json snippet. The field "twitterMessage" [marked in bold has its contents wrapped in quotes, which should not be the case. If there were a type json object, or object, these quotes would be avoided. I tried to parse it into an object, which obviously did not work, since it was a string. But for some reason, the jackson json library also cant parse the string, because it is not escaped properly The following post explains the issue. [https://developer.salesforce.com/forums/?id=906F000B3pnIAC] *There are two solutions* a. Escape the json string properly b. Add an object type to the list of types so that the JSON object is not enclosed in quotes and passed as is. The following is the json produced by the publisher. Please note the quotes immediately after *"twitterMessage":* This forces me to access each field from the tweet individually, leading to duplication of effort in generating the json. { "event":{ "payloadData":{ * "twitterMessage":"{"* payload":"RT @ipfconline1: The Internet Of Things Changing Our Life\n#IoT #IoE #M2M #SmartCity #Sensors #HealthCare\n#makeyourownlane #defstar5\u2026 ", "topic":"tweets\/techbhullar", "location":{ "place":"Amritsar, India" }, "tweet":{ "in_reply_to_status_id_str":null, "in_reply_to_status_id":null, "created_at":"Sat Jul 22 06:14:51 + 2017", "in_reply_to_user_id_str":null, "source":"Twitter Web Client<\/a>", "retweeted_status":{ "extended_tweet":{ "extended_entities":{ "media":[ { "display_url":"pic.twitter.com\/N1uVdV9zLv", "indices":[ 136, 159 ], "sizes":{ "small":{ "w":650, "h":242, "resize":"fit" }, "large":{ "w":650, "h":242, "resize":"fit" }, "thumb":{ "w":150, "h":150, "resize":"crop" }, "medium":{ "w":650, "h":242, "resize":"fit" } }, "id_str":"888383385558802436", "expanded_url":"https:\/\/twitter.com \/ipfconline1\/status\/888383389883150336\/photo\/1", "media_url_https":"https:\/\/pbs.twimg.com \/media\/DFQr-3iXYAQ_JM3.jpg", "id":888383385558802400, "type":"photo", "media_url":"http:\/\/pbs.twimg.com \/media\/DFQr-3iXYAQ_JM3.jpg", "url":"https:\/\/t.co\/N1uVdV9zLv" } ] }, "entities":{ "urls":[ ], "hashtags":[ { "indices":[ 41, 45 ], "text":"IoT" }, { "indices":[ 46, 50 ], "text":"IoE" }, { "indices":[ 51, 55 ],
[Dev] Where is the create publishers, streams and receivers page in wso2das-4.0.0-M6
Hi, I installed wso2das-4.0.0-M6, and ran it using the "editor.bat" command. However, I cant figure out where is the localhost:9443/carbon page which was present in wso2das-3.1.0. I need that to create streams, publishers and receivers. The composer in wso2das-4.0.0-M6 allows me to handle events by linking streams. But where do I create the steams, receivers and publishers themselves? Sagar ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Fwd: Possible Bug Reports
Hi Chiranga, please find the link to source of the custom event publisher project. https://drive.google.com/file/d/0BwqZCw5oc2rwb013Q2hwRTdEY0U/view?usp=sharing I can run it in Eclipse and it shows the desired output [ Hello World Before!! Registered Factory Registered Service Hello World AFter!! 3 is the id I get when I do ss in the osgi console However, when I deploy it to WSO2 DAS in the dropins folder, it shows no messages . When I do "start 3" ,it prints the following error message gogo: BundleException: The bundle "CustomEventPublisher_1.0.0.201707211505 [3]" could not be resolved. Reason: Missing Constraint: Import-Package: org.osgi.service.component; version="1.2.2" This problem did not occur earlier and I seem to have messed up the configuration of the project somehow. Previously, I used to get a listing of registered services, on doing "b 3" I will try to fix this issue , but am sending the code in the mean time Sincerely, Sagar On Fri, Jul 21, 2017 at 1:53 PM, Sagar Kapadia wrote: > Hi Chiranga, > I am using wso2das-3.1.0 > Sagar > > > On Fri, Jul 21, 2017 at 10:36 AM, Chiranga Alwis > wrote: > >> Hi Sagar, >> >> can you please specify the WSO2 Data Analytics Server version you are >> using, as well? >> >> On Thu, Jul 20, 2017 at 11:00 PM, Chiranga Alwis >> wrote: >> >>> Hi Sagar, >>> >>> it would be helpful if you could share the code mentioned in part a. of >>> your question. >>> >>> On Thu, Jul 20, 2017 at 1:02 PM, Chandana Napagoda >>> wrote: >>> >>>> +Chiranga >>>> >>>> On Thu, Jul 20, 2017 at 11:39 AM, Sagar Kapadia >>>> wrote: >>>> >>>>> >>>>> -- Forwarded message -- >>>>> From: Sagar Kapadia >>>>> Date: Wed, Jul 19, 2017 at 5:05 PM >>>>> Subject: Possible Bug Reports >>>>> To: dev-requ...@wso2.org, ash...@avinashi.com, >>>>> sa...@cloudnineconsulting.in >>>>> >>>>> >>>>> Hi, >>>>> a. Custom OSGI components are not recognized. >>>>> I created a custom event publisher and copied the jar to dropins >>>>> folder. The start method of the Activator class was called. But the >>>>> activate method was never called. I can share the code if required >>>>> This issue has been reported by someone else previously. >>>>> https://wso2.org/jira/browse/CARBON-12728 >>>>> >>>>> I have updated to latest version using WUM. >>>>> >>>>> b. The documentation of sample to create a custom event publisher is >>>>> out of date. The classes have been replaced by interfaces and vice versa >>>>> in >>>>> the present version of the library >>>>> >>>>> c. Console doesnt show up in windows 7 , similar to this question on >>>>> SO, which hasnt been >>>>> answered yet >>>>> >>>>> https://stackoverflow.com/questions/43608516/new-with-wso2-das >>>>> d. The Http Publisher writes events to the Trace, but does not >>>>> actually do a POST. The configuration is as below >>>>> >>>>> >>>> trace="enable" xmlns="http://wso2.org/carbon/eventpublisher";> >>>>> >>>>> >>>>> >>>>> >>>>> HttpPost >>>>> https://requestb.in/1atd4211 >>>>> >>>>> >>>>> and traces are >>>>> 16:51:26,157 [-] [Grizzly(2)] INFO EVENT_TRACE_LOGGER TenantId : >>>>> -1234, Event Publisher : RequestBinPublihser2, after processing >>>>> {"event":{"metaData":{"payload":"RT @WernWatt: Net terug van >>>>> #bzacongres The future of firefighting #SmartCity #WearableTechnology >>>>> #verdomdInteressant https://t.co/6AqhU6r3…","topic >>>>> ":"tweets/gesucfator1978"},"payloadData":{"id":887633471555993600,"text":"RT >>>>> @WernWatt: Net terug van #bzacongres The future of firefighting #SmartCity >>>>> #WearableTechnology #verdomdInteressant https://t.co/6AqhU6r3…","creat >>>>> ed_on":null}}} >>>>> >>>>> >>>>> >>>>> I would have filed a bug report, but have forgotten my password and am >>>>> unable to login.
Re: [Dev] Fwd: Possible Bug Reports
Hi Chiranga, I am using wso2das-3.1.0 Sagar On Fri, Jul 21, 2017 at 10:36 AM, Chiranga Alwis wrote: > Hi Sagar, > > can you please specify the WSO2 Data Analytics Server version you are > using, as well? > > On Thu, Jul 20, 2017 at 11:00 PM, Chiranga Alwis > wrote: > >> Hi Sagar, >> >> it would be helpful if you could share the code mentioned in part a. of >> your question. >> >> On Thu, Jul 20, 2017 at 1:02 PM, Chandana Napagoda >> wrote: >> >>> +Chiranga >>> >>> On Thu, Jul 20, 2017 at 11:39 AM, Sagar Kapadia >>> wrote: >>> >>>> >>>> -- Forwarded message -- >>>> From: Sagar Kapadia >>>> Date: Wed, Jul 19, 2017 at 5:05 PM >>>> Subject: Possible Bug Reports >>>> To: dev-requ...@wso2.org, ash...@avinashi.com, >>>> sa...@cloudnineconsulting.in >>>> >>>> >>>> Hi, >>>> a. Custom OSGI components are not recognized. >>>> I created a custom event publisher and copied the jar to dropins >>>> folder. The start method of the Activator class was called. But the >>>> activate method was never called. I can share the code if required >>>> This issue has been reported by someone else previously. >>>> https://wso2.org/jira/browse/CARBON-12728 >>>> >>>> I have updated to latest version using WUM. >>>> >>>> b. The documentation of sample to create a custom event publisher is >>>> out of date. The classes have been replaced by interfaces and vice versa in >>>> the present version of the library >>>> >>>> c. Console doesnt show up in windows 7 , similar to this question on >>>> SO, which hasnt been >>>> answered yet >>>> >>>> https://stackoverflow.com/questions/43608516/new-with-wso2-das >>>> d. The Http Publisher writes events to the Trace, but does not actually >>>> do a POST. The configuration is as below >>>> >>>> >>> trace="enable" xmlns="http://wso2.org/carbon/eventpublisher";> >>>> >>>> >>>> >>>> >>>> HttpPost >>>> https://requestb.in/1atd4211 >>>> >>>> >>>> and traces are >>>> 16:51:26,157 [-] [Grizzly(2)] INFO EVENT_TRACE_LOGGER TenantId : >>>> -1234, Event Publisher : RequestBinPublihser2, after processing >>>> {"event":{"metaData":{"payload":"RT @WernWatt: Net terug van >>>> #bzacongres The future of firefighting #SmartCity #WearableTechnology >>>> #verdomdInteressant https://t.co/6AqhU6r3…","topic >>>> ":"tweets/gesucfator1978"},"payloadData":{"id":887633471555993600,"text":"RT >>>> @WernWatt: Net terug van #bzacongres The future of firefighting #SmartCity >>>> #WearableTechnology #verdomdInteressant https://t.co/6AqhU6r3…","creat >>>> ed_on":null}}} >>>> >>>> >>>> >>>> I would have filed a bug report, but have forgotten my password and am >>>> unable to login. >>>> I sent a mail regarding this, but have not received any reply yet. >>>> Please confirm whether this bug exists. >>>> >>>> We are evaluating WSO2 Data Analytics Server, and need to know if >>>> there is a bug, or we should be doing something differently. >>>> Sincerely, >>>> Sagar R. Kapadia >>>> >>>> >>>> ___ >>>> Dev mailing list >>>> Dev@wso2.org >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> *Chandana Napagoda* >>> Associate Technical Lead >>> WSO2 Inc. - http://wso2.org >>> >>> *Email : chand...@wso2.com **Mobile : +94718169299 >>> <+94%2071%20816%209299>* >>> >>> *Blog :http://cnapagoda.blogspot.com >>> <http://cnapagoda.blogspot.com> | http://chandana.napagoda.com >>> <http://chandana.napagoda.com>* >>> >>> *Linkedin : http://www.linkedin.com/in/chandananapagoda >>> <http://www.linkedin.com/in/chandananapagoda>* >>> >>> >> >> >> -- >> Yours sincerely, >> >> *Chiranga Alwis* >> Software Engineer | WSO2 >> >> *Mobile : *+94775930497 <+94%2077%20593%200497> >> *Email: *chirangaal...@gmail.com >> *LinkedIn: *https://lk.linkedin.com/in/chiranga-alwis-391342a9 >> >> <http://wso2.com/signature> >> > > > > -- > Yours sincerely, > > *Chiranga Alwis* > Software Engineer | WSO2 > > *Mobile : *+94775930497 > *Email: *chirangaal...@gmail.com > *LinkedIn: *https://lk.linkedin.com/in/chiranga-alwis-391342a9 > > <http://wso2.com/signature> > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Possible Bug in generation of JSON payload from Kafka Publisher
Hi, I am trying to read from a stream and wrtie json to a kafka pubisher. I have selected json There is an extra set of quotes at the beginning of twitterMessage, which prevents the parsing library [jackson] from treating it as a either valid string or valid object *Note the quote after the : following twitterMessage [In bold] * {"twitterMessage*":"*{"payload":" Unexpected character ('p' (code 112)): was expecting comma to separate Object entries at [Source: {"event":{"payloadData":{"twitterMessage*":"*{"payload":"@romainmazon @lagazettefr .@romainmazon Développer la #smartcity, un levier important de collaboration entre\u2026 https:\/\/t.co \/NPxYLRVLJ3","topic":"tweets\/EDF_Entreprises","tweet":{"extended_tweet":{"entities":{"urls":[{"display_url":" po.st\/8gjOk3","indices":[137,160],"expanded_url":"http:\/\/po.st \/8gjOk3","url":"https:\/\/t.co\/JXyw5qeiDT"}],"hashtags":[{"indices":[54,64],"text":"smartcity"},{"indices":[109,118],"text":"CollTerr"},{"indices":[122,134],"text":"entreprises"}],"user_mentions":[{"indices":[0,12],"screen_name":"romainmazon","id_str":"170391427","name":"romain mazon","id":170391427}, 2:33 PM The following is the configuration of the Event Publisher http://wso2.org/carbon/eventpublisher";> SmartCity localhost:9092 The following is the configuration of the Event Reciever http://wso2.org/carbon/eventreceiver";> ws://localhost:1880/node-red/twitterStream false Sincerely, Sagar R. Kapadia ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Fwd: Possible Bug Reports
-- Forwarded message -- From: Sagar Kapadia Date: Wed, Jul 19, 2017 at 5:05 PM Subject: Possible Bug Reports To: dev-requ...@wso2.org, ash...@avinashi.com, sa...@cloudnineconsulting.in Hi, a. Custom OSGI components are not recognized. I created a custom event publisher and copied the jar to dropins folder. The start method of the Activator class was called. But the activate method was never called. I can share the code if required This issue has been reported by someone else previously. https://wso2.org/jira/browse/CARBON-12728 I have updated to latest version using WUM. b. The documentation of sample to create a custom event publisher is out of date. The classes have been replaced by interfaces and vice versa in the present version of the library c. Console doesnt show up in windows 7 , similar to this question on SO, which hasnt been answered yet https://stackoverflow.com/questions/43608516/new-with-wso2-das d. The Http Publisher writes events to the Trace, but does not actually do a POST. The configuration is as below http://wso2.org/carbon/eventpublisher";> HttpPost https://requestb.in/1atd4211 and traces are 16:51:26,157 [-] [Grizzly(2)] INFO EVENT_TRACE_LOGGER TenantId : -1234, Event Publisher : RequestBinPublihser2, after processing {"event":{"metaData":{"payload":"RT @WernWatt: Net terug van #bzacongres The future of firefighting #SmartCity #WearableTechnology #verdomdInteressant https://t.co/6AqhU6r3…","topic":"tweets/gesucfator1978"; },"payloadData":{"id":887633471555993600,"text":"RT @WernWatt: Net terug van #bzacongres The future of firefighting #SmartCity #WearableTechnology #verdomdInteressant https://t.co/6AqhU6r3…","created_on":null}}} I would have filed a bug report, but have forgotten my password and am unable to login. I sent a mail regarding this, but have not received any reply yet. Please confirm whether this bug exists. We are evaluating WSO2 Data Analytics Server, and need to know if there is a bug, or we should be doing something differently. Sincerely, Sagar R. Kapadia ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev