chen
14 years agoOccasional Contributor
Update wsdl definition via API (Basic Authentication)
Hello,
I'm using the following code in my project in order to update wsdl definitions:
When my url is behind http Basic Authentication I can't access it and complete the operation above.
it terminates with the following exception:
Is there a way to provide it the credentials through the api?
I got the same results when tried to update definitions with a url in the following format: https://[user]:[pass]@[path]?WSDL
Thanks,
Chen.
I'm using the following code in my project in order to update wsdl definitions:
List<Interface> ifaces = wsdlProjectPro.getInterfaceList();
for (Interface iface : ifaces) {
if (iface instanceof WsdlInterface) {
WsdlInterface wsdlInterface = (WsdlInterface) iface;
wsdlInterface.updateDefinition(url, false);
}
}
When my url is behind http Basic Authentication I can't access it and complete the operation above.
it terminates with the following exception:
ERROR [HttpMethodDirector]
java.lang.NullPointerException
at com.eviware.x.form.XFormFactory.createDialogBuilder(XFormFactory.java:19)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$WsdlCredentialsProvider.buildBasicDialog(UrlWsdlLoader.java:329)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$WsdlCredentialsProvider.access$400(UrlWsdlLoader.java:246)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$WsdlCredentialsProvider$ShowDialog.run(UrlWsdlLoader.java:360)
at com.eviware.soapui.support.swing.SwingUtils.runInUIThreadIfSWT(SwingUtils.java:37)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$WsdlCredentialsProvider.getCredentials(UrlWsdlLoader.java:306)
at org.apache.commons.httpclient.HttpMethodDirector.promptForCredentials(HttpMethodDirector.java:867)
at org.apache.commons.httpclient.HttpMethodDirector.processWWWAuthChallenge(HttpMethodDirector.java:732)
at org.apache.commons.httpclient.HttpMethodDirector.processAuthenticationResponse(HttpMethodDirector.java:668)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:193)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$LoaderWorker.construct(UrlWsdlLoader.java:210)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader.load(UrlWsdlLoader.java:124)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:108)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:470)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:460)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:94)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:219)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:45)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:111)
at java.lang.Thread.run(Unknown Source)
Is there a way to provide it the credentials through the api?
I got the same results when tried to update definitions with a url in the following format: https://[user]:[pass]@[path]?WSDL
Thanks,
Chen.