- Ionic-Angular app that displays data about countries from a SOAP API
- Data fetched using the SOAP web services, instead of Representational State Transfer (REST), over HTTP
- Tutorial Code from Simon Grimm - see ๐ Inspiration below
- Note: to open web links in a new window use: ctrl+click on link
![GitHub last commit](https://camo.githubusercontent.com/5ce427e24aaefa9755bb73cc5f18b0f667630814620fe8cda7616e9b5083ff5b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f416e647265774a426174656d616e2f696f6e69632d616e67756c61722d736f61703f7374796c653d706c6173746963)
- SOAP uses eXtensible Markup Language (XML)
- The SOAP API data is from the DataFlex Web Service - no API key needed
- ngx-soap requires a list of dependencies, including browser buffer module, concat-stream to collect all the data from a stream into a single buffer, core-js modular standard library, crypto-js library of crypto standards, events event emitter, lodash library, sax sax-style parser for XML and HTML, stream for Node.js streams in the browser & uuid for creation of RFC4122 UUIDs. This creates a huge vendor build bundle (5.29MB) - see source-map image
- source-map-explorer installed globally and used to generate Source-map
- Postman List of SOAP APIs
- This file was copied into
assets/CountryInfoServices.xml
as the WSDL document
- SOAP does not have to be used with HTTP although in this app it is
![Ionic page](./img/map.png)
- Run
npm i
to install dependencies
- Run
ionic serve
to start the server on localhost://8100
- Run
npm run lint
to lint entire app. No linting errors
- Run
npm run build
to create a build file
- Run
npm run build --prod
to create a build file with named chunks and a source map
- Run
source-map-explorer www/main*.js
to view source map
data.service.ts
creating a SOAP client
constructor(private soap: NgxSoapService) {
this.soap.createClient('./assets/CountryInfoService.xml').then((client) => {
this.client = client;
this.clientReady.next(true);
});
}
- SOAP is highly standardized, allows for automation in certain cases, and is more secure
- ACID stands for Atomicity, Consistency, Isolation, and Durability, an enterprise-grade transaction quality and one of the reasons why SOAP is still used when exchanging sensitive information in enterprise architectures.
- SOAP APIs almost always use a WSDL document.
- SOAP supports stateful and stateless operations.
- XML response messages can include an error code and its explanation.
- Status: Working
- To-do: Nothing.