title: Getting error: "Unexpected wrapper element found" when trying to call a webservice function where webservice uses WSSecurityCert
body: <p>I am using meteor.js. I am trying to call a function of a webservice that uses WSSecurityCert.
  I created a signed key pair using openssl and sent the public key to the sever administrator so that they include it in their keystore, which they say they did. They also sent me their public key but I don't know where to include it in my code or application.</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>if (Meteor.isServer) {
  Meteor.methods({
      getVouchers: function(){
  
          var fs = Npm.require('fs');
          var soap = Npm.require('soap');
          Npm.require('ursa');
          var base = process.env.PWD;
  
          var publicKey = fs.readFileSync(base + "/cert.pem", "utf8");
          var privateKey = fs.readFileSync(base + "/key.pem", "utf8");
          var password = "myPassPhrase";
  
          var url = 'http://www.smartcallesb.co.za:8091/SmartcallServices2/SmartloadService?wsdl';
  
          try
          {
              var wsSecurity = new soap.WSSecurityCert(privateKey, publicKey, password, 'utf8');
              var client = Soap.createClient(url);
              client.setSecurity(wsSecurity);
              //var result = client.SmartloadService.SmartloadServicePort.getDealerBalance(); //getAllNetworks
              var result = client.getDealerBalance();
              console.log(result)
          }
          catch (err)
          {
              console.log(err)
          }
          console.log("reached end")
  
      }
  });}
  </code></pre>
  
  <p>When it is run I get the following error:</p>
  
  <pre><code>{ [Error: Soap method call failed [soap-method]]
  error: 'soap-method',
  reason: 'Soap method call failed',
  reason: 'Soap method call failed',
  details:
  { [Error: soap:Client: Unexpected wrapper element getDealerBalance found. 
  Expected {http://www.smartcall.co.za/2010/12/service}getDealerBalance.]
  {http://docs.oasis-open.org/ws-sx/ws-securitypolicy requirement
  /200702}AsymmetricBinding: The transform algorithms do not match the
  requirement.....
  </code></pre>
  
  <p>Could this be because the host public key that the server admin sent to me is not included in my application, and if so where do I include it? Or otherwise, how do I fix/correct this?</p>