EspDiff.bat 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. @echo off
  2. rem /*##############################################################################
  3. rem
  4. rem HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  5. rem
  6. rem Licensed under the Apache License, Version 2.0 (the "License");
  7. rem you may not use this file except in compliance with the License.
  8. rem You may obtain a copy of the License at
  9. rem
  10. rem http://www.apache.org/licenses/LICENSE-2.0
  11. rem
  12. rem Unless required by applicable law or agreed to in writing, software
  13. rem distributed under the License is distributed on an "AS IS" BASIS,
  14. rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. rem See the License for the specific language governing permissions and
  16. rem limitations under the License.
  17. rem ############################################################################## */
  18. if "%1" == "-h" (
  19. echo usage: EspDiff queryName example: EspDiff AssetReport
  20. echo EspDiff -h
  21. echo ----------------------------------------------------------
  22. echo coding instructions:
  23. echo 1. change the path to include soapplus.exe and examxml.lnk
  24. echo ^(shortcut to examxml^).
  25. echo 2. define esp1 and esp2 as http[s]://userid:password@url:port/
  26. echo 3. define ver1 and ver2
  27. echo 4. define param1 and param2 to include any extra params
  28. echo escaping out ^& character as shown below
  29. echo 5. put SOAP test files in EspDiff.Requests
  30. echo 6. define dir1 and dir2 as output dirs for esp1 and esp2 tests
  31. echo --------------------------------------------------------------
  32. exit /b 0
  33. )
  34. set query=%1
  35. setlocal enabledelayedexpansion
  36. set path=%cd%\binaries;%path%;C:\Program Files\ExamXML;
  37. set esp1=http://userid:password@url:port/
  38. set esp2=%esp1%
  39. set ver1=1.20
  40. set ver2=9.99
  41. rem set param1=
  42. rem set param2=^^^&internal
  43. set requestDir=EspDiff.Requests
  44. set dir1=EspDiff.Responses\esp1
  45. set dir2=EspDiff.Responses\esp2
  46. set service=WsAccurint
  47. set validate=-v
  48. echo Running requests in %dir1% url: %esp1%/%service%?ver_=%ver1%%param1%
  49. mkdir %dir1% 2> nul
  50. soapplus -c -d 0 -url %esp1%/%service%/?ver_=%ver1%%param1% -i %requestDir%\%query%.xml -o %dir1% -w
  51. echo Running requests in %dir2% ...
  52. mkdir %dir2% 2> nul
  53. soapplus -c -d 0 -url %esp2%/%service%/?ver_=%ver2%%param2% -i %requestDir%\%query%.xml -o %dir2% -w
  54. for %%i in (%requestDir%\%query%.xml) do (
  55. set file=response_content\%%~nxi
  56. echo %file%
  57. examxml.exe %dir1%\!file! %dir2%\!file!
  58. )