title: Salseforce Apex classes support Apache axis Stub authentication
body: <p>We have converted a WSDL file of a Web serivice into the salesforce apex classes. The Web Service is receiving the authentication credentials in Apache axis Stub authentication username and password format. </p>
  
  <p><strong>Below is the sample Apache axis Stub authentication username and password code.</strong></p>
  
  <pre><code>Service service = new  XYZServiceLocator();
  URL endpointURL = new URL("https://urllink");
  XYZServiceSoapBindingStub stub = new XYZServiceSoapBindingStub(endpointURL, service);
  stub.setUsername("username");// void org.apache.axis.client.Stub.setUsername(String username)
  stub.setPassword("password");// void org.apache.axis.client.Stub.setPassword(String Password)
  QueryResponse qresp = stub.webServiceCall(qr);
  </code></pre>
  
  <p>My question is. Can we get the Apache axis Stub authentication username and password functionality in the salesforce Apex classes. </p>
  
  <p>As the Apex Stub support the HTTP Headers authentication does it also support the  Apache axis Stub authentication? </p>
  
  <p><strong>Below is the Salesforce Apex stub HTTP Headers authentication code</strong></p>
  
  <pre><code>String myData = 'username:password';
  Blob hash = Crypto.generateDigest('SHA1',Blob.valueOf(myData));
  encodedusernameandpassword = EncodingUtil.base64Encode(hash);
  XYZBillingStub.inputHttpHeaders_x.put('Authorization','Basic ' + encodedusernameandpassword );// SALESFORCE STUB
  XYZBilling.query(queryReq )// Web Service call
  </code></pre>
  
  <p>Please help me in resolving this issue.</p>