Guest User

Untitled

a guest
Oct 4th, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. router.post("/register", upload.single('image'), function (req, res, next)
  2. {
  3. var url = 'http://smeapps.mobitel.lk:8585/EnterpriseSMSV2/EnterpriseSMSWS?wsdl';
  4.  
  5. var session = {username: 'username', password: 'password'}
  6.  
  7. soap.createClient(url, function(err, client)
  8. {
  9. if(err)
  10. console.log(err)
  11. client.createSession(session, function(err, result)
  12. {
  13. console.log(result);
  14. });
  15.  
  16. })
  17. })
  18.  
  19. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.esms.mobitel.lk/">
  20. <soapenv:Header/>
  21. <soapenv:Body>
  22. <ws:createSession>
  23. <!--Optional:-->
  24. <arg0>
  25. <!--Optional:-->
  26. <customer>12</customer>
  27. <!--Optional:-->
  28. <id>12</id>
  29. <!--Optional:-->
  30. <password>password</password>
  31. <!--Optional:-->
  32. <username>username</username>
  33. </arg0>
  34. </ws:createSession>
  35. </soapenv:Body>
  36. </soapenv:Envelope>
  37.  
  38. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws.esms.mobitel.lk/">
  39. <SOAP-ENV:Body>
  40. <ns1:createSessionResponse>
  41. <return>
  42. <expiryDate>2018-10-04T06:24:25+05:30</expiryDate>
  43. <isActive>true</isActive>
  44. <sessionId>761033662786</sessionId>
  45. <user>0</user>
  46. </return>
  47. </ns1:createSessionResponse>
  48. </SOAP-ENV:Body>
  49. </SOAP-ENV:Envelope>
  50.  
  51. console.log(JSON.stringify(result))
Add Comment
Please, Sign In to add comment