Expand my Community achievements bar.

SOLVED

How Can I get data from another Website

Avatar

Level 4

Hi Team

     How can get data from  another site (Suppose in my site i want to display product price and i will get price from xyz.com site. So how can i inject it into my website )

Thanks for your suggestions 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

It entirely depends on how that data is exposed to you to consume. It could be a restful service or an XML or any format the other site and your client agrees upon ? Totally depends on how the other website is exposing its data. You have to talk to them and agree upon how the data should be exposed for your client. Most of the time secure data wont be publicly available and there could be some kind of authentication like Oauth in place.

View solution in original post

5 Replies

Avatar

Level 6

If the requirement is to capture from HTML of the third party site XYZ.com you can use using JSOUP API. 

there is community article on how to use JSOUP API

Adobe Experience Manager Help | Creating a HTML Parser Service for Adobe Experience Manager

If you are planning to capture from using HTTP operations then you can use Apache HTTP APIs

there is community article on how perform HTTP operations

Adobe Experience Manager Help | Invoking Adobe Experience Manager Sling Servlets using Apache HTTP A...

Adobe Experience Manager Help | Creating Adobe Experience Manager bundles that invoke third party Re...

Avatar

Correct answer by
Community Advisor

It entirely depends on how that data is exposed to you to consume. It could be a restful service or an XML or any format the other site and your client agrees upon ? Totally depends on how the other website is exposing its data. You have to talk to them and agree upon how the data should be exposed for your client. Most of the time secure data wont be publicly available and there could be some kind of authentication like Oauth in place.

Avatar

Level 6

Agreed!  either way above articles should help you to read  values restful services

for more check  org.apache.commons.httpclient (HttpClient 3.1 API)

Avatar

Level 10

Many ways - if the other site exposes a Restful service  - write an AEM component that can consume a Restful service and display in a component - see Scott's Digital Community: Creating an AEM HTML Template Language Component that displays data from ... .

Avatar

Level 10

If the other site exposes a SOAP Stack - once again - you can write an AEM component that can consume the SOAP Stack and display data  -- Scott's Digital Community: Creating an AEM HTML Template Language Component that displays data from ...