HTTP-401 Error When Accessing JSRP Webservice Using Java Client (Doc ID 2249012.1)

Last updated on MARCH 31, 2017

Applies to:

Oracle Communications ASAP - Version 7.3.0.0.0 and later
Information in this document applies to any platform.

Symptoms

On : 7.3.0.0.0 version, Web Server

ACTUAL BEHAVIOR
---------------
There is a problem Accessing the JSRP Webservice using the Java Client

The customer has generated web service stubs using the following ant task (the referenced  WSDL is saved from the WebLogic server):

  

    wsdl="JSRP_WS-ASAP730.wsdl"
  destDir="${clientclass-dir}" >


The customer is calling the web service as follows and is getting a 401 Unauthorized message from the server.

Code Snippet:

MslvAsapWs service = new MslvAsapWs();

MslvAsapWsServicePortType serviceHTTPPort = service.getHttpSessionPort();

Binding binding = ((BindingProvider)serviceHTTPPort).getBinding();

@SuppressWarnings("rawtypes")
  List handlerChain = new ArrayList();
  handlerChain.add(new WSSecurityHeaderSOAPHandler(/*"weblogic", "password123"*/));
  binding.setHandlerChain(handlerChain);
  service.setHandlerResolver(new HeaderHandlerResolver());
  
CreateOrderByValueResponse response = serviceHTTPPort.createOrderByValue(request);

We have also followed this similar to:  
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=389365994982601&id=1458735.1&displayIndex=2&_afrWindowMode=0&_adf.ctrl-state=136dlbq03t_195#PURPOSE   



Changes

 

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