Advertisement
KeeJayBe

soap

Feb 16th, 2021
782
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const soap = require('soap');
  2. var wstCrabUrl= 'http://crab.agiv.be/WST/CRAB_WST.svc?wsdl';
  3.  
  4. var options = {
  5.         forceSoap12Headers: true,
  6.         timeout: 5000
  7.     };
  8.  
  9.     var args = {
  10.         spatialObjectRequest: {
  11.             Criteria: {
  12.                 RequestType: 'AllFields',
  13.                 ObjectType: '',
  14.                 ClauseElement: {
  15.                     ClauseFieldInstance: {
  16.                         Name:'id',
  17.                         Value: 0,
  18.                     },
  19.                     ClauseOperator: 'GreaterThan'
  20.                 },
  21.                 JoinElement: null,
  22.                 OrderField: { name: 'id'},
  23.                 OrderDirection: 'ascending',
  24.                 ActualOnly: false
  25.             },
  26.             IncludeListText: false,
  27.             MaxObjects: 50,
  28.             ResultType: 'results',
  29.             ShapeFilterOperation: 'Contains',
  30.             ShapeFilterWKT: 'POLYGON((3.7482349514993896 51.065633080370645,3.7484602570566405 51.06582017936511,3.7487365245851745 51.06582355051122,3.748977923396515 51.06569039005288,3.748875999453949 51.065523517545316,3.7487070202860107 51.065360015616015,3.7484307527574767 51.065381928279216,3.748277866843628 51.06548812026939,3.7482349514993896 51.065633080370645))'
  31.         }
  32.     };
  33.  
  34.     soap.createClient(wstCrabUrl, options, (err, client) => {
  35.         client.getCRABSpatialObjectsAsync(args, (err, result) => {
  36.             console.log(result)
  37.             console.log(err)
  38.         });
  39.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement