"HTTP response code: 401" When Registering WSDL In OEG On A Basic Authenticated Web Service Hosted On OSB (Doc ID 1933019.1)

Last updated on OCTOBER 25, 2016

Applies to:

Oracle API Gateway - Version 11.1.1.6.0 and later
Information in this document applies to any platform.

Symptoms

On : 11.1.1.6.0 version, OAG (Oracle API Gateway) Policy Studio

On Policy Studio when attempting to register  a service proxy protected by basic authentication on OSB (Oracle Service Bus), the following error occurs:

ERROR

javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Problem loading WSDL: java.io.IOException: Server returned HTTP response code: 401 for URL: http://mhernand-us.us.oracle.com:8011/loan/gateway1?wsdl
at com.vordel.wsdl.emf.EMFModelProvider.read(EMFModelProvider.java:87)
at com.vordel.wsdl.emf.EMFModelProvider.read(EMFModelProvider.java:109)
at com.vordel.wsdl.WSDLDocument.(WSDLDocument.java:114)
at com.vordel.client.swt.wsdl.SelectWSDLOperationsPage.loadWSDL(SelectWSDLOperationsPage.java:253)
at com.vordel.client.swt.wsdl.WSDLWizardDialog.nextPressed(WSDLWizardDialog.java:31)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at com.vordel.client.manager.actions.services.AddWebServiceGUIProcessor.addWebService(AddWebServiceGUIProcessor.java:121)
at com.vordel.client.manager.actions.services.AddWebServiceAction.runAction(AddWebServiceAction.java:26)
at com.vordel.client.manager.actions.ManagerEntityAction.run(ManagerEntityAction.java:34)
at com.vordel.client.gui.policystudio.editor.reusable.ReusableEditor$MasterDetailsPage$3.linkActivated(ReusableEditor.java:371)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:228)
at org.eclipse.ui.forms.widgets.ImageHyperlink.handleActivate(ImageHyperlink.java:177)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:316)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:300)
at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:119)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.vordel.client.gui.policystudio.Application.start(Application.java:42)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://mhernand-us.us.oracle.com:8011/loan/gateway1?wsdl
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createURLInputStream(URIConverterImpl.java:688)
at org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createInputStream(URIConverterImpl.java:546)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1152)
at com.vordel.wsdl.emf.EMFModelProvider.read(EMFModelProvider.java:85)
... 47 more



STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. create a service proxy on OSB
2. protect this service proxy with basic authentication on OSB
3. from Policy Studio try to register the proxy service located in OSB and you will get this error:

javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Problem loading WSDL: java.io.IOException: Server returned HTTP response code: 401 for URL: http://mhernand-us.us.oracle.com:8011/loan/gateway1?wsdl
at com.vordel.wsdl.emf.EMFModelProvider.read(EMFModelProvider.java:87)
at com.vordel.wsdl.emf.EMFModelProvider.read(EMFModelProvider.java:109)
at com.vordel.wsdl.WSDLDocument.(WSDLDocument.java:114)
at com.vordel.client.swt.wsdl.SelectWSDLOperationsPage.loadWSDL(SelectWSDLOperationsPage.java:253)
at com.vordel.client.swt.wsdl.WSDLWizardDialog.nextPressed(WSDLWizardDialog.java:31)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at com.vordel.client.manager.actions.services.AddWebServiceGUIProcessor.addWebService(AddWebServiceGUIProcessor.java:121)
at com.vordel.client.manager.actions.services.AddWebServiceAction.runAction(AddWebServiceAction.java:26)
at com.vordel.client.manager.actions.ManagerEntityAction.run(ManagerEntityAction.java:34)
at com.vordel.client.gui.policystudio.editor.reusable.ReusableEditor$MasterDetailsPage$3.linkActivated(ReusableEditor.java:371)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:228)
at org.eclipse.ui.forms.widgets.ImageHyperlink.handleActivate(ImageHyperlink.java:177)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:316)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:300)
at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:119)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.vordel.client.gui.policystudio.Application.start(Application.java:42)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://mhernand-us.us.oracle.com:8011/loan/gateway1?wsdl
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createURLInputStream(URIConverterImpl.java:688)
at org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createInputStream(URIConverterImpl.java:546)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1152)
at com.vordel.wsdl.emf.EMFModelProvider.read(EMFModelProvider.java:85)
... 47 more

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms