thuongnht / PriceAPI

A demo to integrate to Price API, using Javascript-SOAP-Servlet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PriceAPI

A demo to integrate to Price API, using Javascript-SOAP-Servlet




  • Tomcat 7.x, JDK 1.8.x on Windows (Opensdk-8 on Ubuntu)
  • Original Source: folders src/, web/
  • Deployed Source: folders deployment/
  • Test Images: folder blob/
  • External library: folder libs/




  • clone resource and copy file 'PriceAPI.war' in folder 'deployment' to 'tomcat/webapps/'
  • in tomcat/conf/context.xml, tag 'context', add this tag


- turn on tomcat server (I use xampp/tomcat) - open localhost:[port]/PriceAPI/index.html and do some tests




  • In case to deploy from original source again, the extenal lib need to be added to project




  • client sends soap message to servlet using httpRequest
  • servlet parses eanID and do a request to priceapi through BulkRequest class
  • the result is mapped to List< Price>
  • class Message is used to make soap message response from the List< Price> and is responsed to client
  • client parse xml response and show the details in table

About

A demo to integrate to Price API, using Javascript-SOAP-Servlet


Languages

Language:Java 65.6%Language:JavaScript 29.3%Language:HTML 3.9%Language:CSS 1.3%