Contributions
How to pass Basic Authentication User/Password to the SoapUI API on loading WSDL
Hi, I would like to know how to pass basic authentication user/password to the SoapUI API when loading WSDL (not when sending SOAP request), for example when calling WsdlImporter.importWsdl(). Thank you.701Views0likes0CommentsRe: WsdlImporter.importWsdl() fails against Basic Auth protected WSDL in SoapUI API 4.6.4/5.0.0
Hi Rao, My intention is to be able to retrieve a remote WSDL (Basic Auth protected) programmatically. From the SoapUI GUI, I'm able to enter the User/Password prompt value, so there must be a way via the SoapUI API to pass the same User/Password, but I haven't been able to find it. Today I tried to modify the SoapUI code by setting the default Authenticator in the LoaderWorker.construct(), but it still does not work. Due to sensitive information, may I contact you privatelyso that I can forwardyou the password-protected WSDL url?3.6KViews0likes2CommentsRe: WsdlImporter.importWsdl() fails against Basic Auth protected WSDL in SoapUI API 4.6.4/5.0.0
Hi Rao, Sorry about the confusion, I meant that the WSDL does not reference any external schemas. I saw the WSDL correctly in the browser after providing the credentials. I then tried the SoapUI GUI and saw the WSDL correctly as well with providing the same credentials. The problem only exists when accessing the WSDL from the code. When I saved the WSDL locally and ran the same code against the local WSDL it works fine.2.2KViews0likes6CommentsRe: WsdlImporter.importWsdl() fails against Basic Auth protected WSDL in SoapUI API 4.6.4/5.0.0
Hi Rao, Just a small correction to my code, this is how it looks: System.setProperty("soapui.loader.username", userid); System.setProperty("soapui.loader.password", password); WsdlProject project = new WsdlProject(); WsdlInterface [] wsdls = WsdlImporter.importWsdl(project, wsdlUrl); /* It throws an exception here */ Thank you. -Peter2.2KViews0likes8CommentsRe: WsdlImporter.importWsdl() fails against Basic Auth protected WSDL in SoapUI API 4.6.4/5.0.0
Hi Rao, The WSDL in question does not have inline schemas or referencing any external schemas. The code is quite simple: WsdlProject project = new WsdlProject(); WsdlInterface [] wsdls = WsdlImporter.importWsdl(project, wsdlUrl); /* It throws an exception here */ -Peter2.2KViews0likes9CommentsRe: WsdlImporter.importWsdl() fails against Basic Auth protected WSDL in SoapUI API 4.6.4/5.0.0
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. -Peter2.2KViews0likes12CommentsWsdlImporter.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 triedSystem.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. -Peter2.5KViews0likes14CommentsStandalone java program using SoapUI API won't terminate
Hi, I'm writing a small sample standalone java program that uses the SoapUI WsdlProject, WsdlInterface, and WsdlOperation classes to generate a SOAP request from a given WSDL. When I run the program, it generates the SOAP request successfully, but the program won't terminate by itself. Looking at the output, I see that it internally uses SoapUIMultithreadedHttpConnectionManager to handle the WSDL in separate thread and remain running. How do I code it to terminate the program? is there some settings that I can set in the java command system properties or soapui-settings.xml to do this? Thanks in advance.1.3KViews0likes0Comments