Forum Discussion

plieu's avatar
plieu
Occasional Contributor
10 years ago

WsdlImporter.importWsdl() fails against Basic Auth protected WSDL in SoapUI API 4.6.4/5.0.0

 

Hi,

 

When I have a basic authentication protected WSDL url, the call of WsdlImporter.importWsdl() fails with com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException.  I tried System.setProperty("soapui.loader.username", user) and System.setProperty("soapui.loader.password", password) and it still does not work.

 

Is this a bug or is there a correct way to pass the username/password programmatically?

 

Thanks in advance.

 

-Peter

 

14 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Is the wsdl an offline file or hosted on a server? Have you tried accessing the wsdl file using browser? What happens then?
    • plieu's avatar
      plieu
      Occasional Contributor

      Hi Rao,

       

      Thank you for your response. 

      The WSDL is hosted on a remote server.  When accessing it from the browser or the SoapUI GUI, it prompts for the User and password appropriately and I am able to enter them and succeed in reading the WSDL.  It's just not working programmatically.

       

      Thank you.

       

      -Peter

      • nmrao's avatar
        nmrao
        Champion Level 3
        Will you please post the code excerpt so that it would help someone to reproduce the issue?