title: Error while consuming wcf web service using Java + Metro client in Netbeans 7.1
body: <p>I am trying to consume a <code>https secure wcf web service using username and password</code> credentials same work is able to do in <code>.Net client</code>.</p>
  
  <p>What I have, I am Using Netbeans 7.1, Metro 2 and Glassfish3</p>
  
  <p>I have a wsdl, and By using that wsdl I am able to <code>generate the Java stubs</code>, But when I run the client it throws a below given <code>exception</code></p>
  
  <pre><code>com.sun.xml.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: An error occurred when verifying security for the message. Please see the server log to find more detail regarding exact cuase of the failure.
  </code></pre>
  
  <p>This is <strong>policy part</strong> from wsdl</p>
  
  <pre><code>&lt;wsp:Policy wsu:Id="CustomBinding_IStandardApi_policy"&gt;
          &lt;wsp:ExactlyOne&gt;
              &lt;wsp:All&gt;
                  &lt;sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"&gt;
                      &lt;wsp:Policy&gt;
                          &lt;sp:TransportToken&gt;
                              &lt;wsp:Policy&gt;
                                  &lt;sp:HttpsToken RequireClientCertificate="false"/&gt;
                              &lt;/wsp:Policy&gt;
                          &lt;/sp:TransportToken&gt;
                          &lt;sp:AlgorithmSuite&gt;
                              &lt;wsp:Policy&gt;
                                  &lt;sp:Basic256/&gt;
                              &lt;/wsp:Policy&gt;
                          &lt;/sp:AlgorithmSuite&gt;
                          &lt;sp:Layout&gt;
                              &lt;wsp:Policy&gt;
                                  &lt;sp:Strict/&gt;
                              &lt;/wsp:Policy&gt;
                          &lt;/sp:Layout&gt;
                          &lt;sp:IncludeTimestamp/&gt;
                      &lt;/wsp:Policy&gt;
                  &lt;/sp:TransportBinding&gt;
                  &lt;sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"&gt;
                      &lt;wsp:Policy&gt;
                          &lt;sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"&gt;
                              &lt;wsp:Policy&gt;
                                  &lt;sp:WssUsernameToken10/&gt;
                              &lt;/wsp:Policy&gt;
                          &lt;/sp:UsernameToken&gt;
                      &lt;/wsp:Policy&gt;
                  &lt;/sp:SignedSupportingTokens&gt;
                  &lt;sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"&gt;
                      &lt;wsp:Policy/&gt;
                  &lt;/sp:Wss11&gt;
                  &lt;sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"&gt;
                      &lt;wsp:Policy&gt;
                          &lt;sp:MustSupportIssuedTokens/&gt;
                          &lt;sp:RequireClientEntropy/&gt;
                          &lt;sp:RequireServerEntropy/&gt;
                      &lt;/wsp:Policy&gt;
                  &lt;/sp:Trust10&gt;
              &lt;/wsp:All&gt;
          &lt;/wsp:ExactlyOne&gt;
      &lt;/wsp:Policy&gt;
  </code></pre>
  
  <p>I am passing username and password correctly as below given</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;wsdl:definitions name="StandardApi" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:i0="http://cdx.dealerbuilt.com/Api/0.97/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsp1="http://www.w3.org/ns/ws-policy" xmlns:sc="http://schemas.sun.com/2006/03/wss/client" xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"&gt;&lt;wsdl:import namespace="http://cdx.dealerbuilt.com/Api/0.97/" location="Api.svc.wsdl_wsdl0.xml"/&gt;&lt;wsdl:types/&gt;&lt;wsdl:binding name="CustomBinding_IStandardApi" type="i0:IStandardApi"&gt;&lt;wsp1:PolicyReference URI="#CustomBinding_IStandardApiPolicy"/&gt;
          &lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http"/&gt;&lt;wsdl:operation name="PullRepairOrders"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullRepairOrders" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullRepairOrderByNumber"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullRepairOrderByNumber" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushRepairOrders"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushRepairOrders" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullAppointments"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullAppointments" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushAppointments"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushAppointments" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="CancelAppointments"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/CancelAppointments" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="UncancelAppointments"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/UncancelAppointments" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullCustomers"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullCustomers" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullCustomerByKey"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullCustomerByKey" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="CloseRepairOrderPayType"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/CloseRepairOrderPayType" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushRepairOrdersFromAppointments"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushRepairOrdersFromAppointments" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushRepairOrderJobs"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushRepairOrderJobs" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushRepairOrderLaborItems"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushRepairOrderLaborItems" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushRepairOrderLaborOperationSublets"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushRepairOrderLaborOperationSublets" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushRepairOrderParts"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushRepairOrderParts" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullDealsByDealNumber"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullDealsByDealNumber" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="GetTechnicians"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/GetTechnicians" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushAppraisals"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushAppraisals" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullInventory"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullInventory" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullInventoryByVin"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullInventoryByVin" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullInventoryByStockNumber"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullInventoryByStockNumber" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushInventory"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushInventory" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushCustomers"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushCustomers" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushCustomerVehicles"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushCustomerVehicles" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullCustomerVehicles"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullCustomerVehicles" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullCustomerVehiclesByCustomerKey"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullCustomerVehiclesByCustomerKey" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushDeals"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushDeals" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullDeals"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullDeals" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="GetLenders"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/GetLenders" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushJournalEntries"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushJournalEntries" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullJournalEntries"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullJournalEntries" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullInventoryByVehicleKey"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullInventoryByVehicleKey" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullProspects"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullProspects" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PullProspectByDealNumber"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PullProspectByDealNumber" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="PushProspects"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/PushProspects" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="GetServiceAdvisors"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/GetServiceAdvisors" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;wsdl:operation name="GetRepairOrderJobCodes"&gt;&lt;soap:operation soapAction="http://cdx.dealerbuilt.com/Api/0.97/IStandardApi/GetRepairOrderJobCodes" style="document"/&gt;&lt;wsdl:input&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:input&gt;&lt;wsdl:output&gt;&lt;soap:body use="literal"/&gt;&lt;/wsdl:output&gt;&lt;/wsdl:operation&gt;&lt;/wsdl:binding&gt;&lt;wsdl:service name="StandardApi"&gt;&lt;wsdl:port name="CustomBinding_IStandardApi" binding="tns:CustomBinding_IStandardApi"&gt;&lt;soap:address location="https://cdx.dealerbuilt.com/0.97/Api.svc"/&gt;&lt;/wsdl:port&gt;&lt;/wsdl:service&gt;
          &lt;wsp1:Policy wsu:Id="CustomBinding_IStandardApiPolicy"&gt;
              &lt;wsp1:ExactlyOne&gt;
                  &lt;wsp1:All&gt;
                      &lt;sc:CallbackHandlerConfiguration wspp:visibility="private"&gt;
                          &lt;sc:CallbackHandler default="test" name="usernameHandler"/&gt;
                          &lt;sc:CallbackHandler default="test123" name="passwordHandler"/&gt;
                      &lt;/sc:CallbackHandlerConfiguration&gt;
                  &lt;/wsp1:All&gt;
              &lt;/wsp1:ExactlyOne&gt;
          &lt;/wsp1:Policy&gt;
      &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>I did a lot of search but not able to find out the solution..</p>
  
  <p><strong>This block of code is working fine in .Net</strong></p>
  
  <pre><code>        StandardApiClient api = new StandardApiClient();
  
          api.ClientCredentials.UserName.UserName = "test";
  
          api.ClientCredentials.UserName.Password = "test@123";
  
          Customer[] result = api.PullCustomers(125);
  </code></pre>
  
  <p>Please advise.</p>