Unable to authenticate over NTLM to consume WebService

Hello Folks,

I am trying to consume a soap ws hosted on IIS with NTLM authentication from my localhost Integration Server (IS)
From the same machine which my IS (windows) I can set soap UI and call it with no errors. However, I m still not sure how to do the same with Integration Server, using designer and its generated consumer based on WSDL.
I am not running IS as service on my windows so, not sure if WmWin32 and ntlm:rg are useful for development purpose.

What I am getting so far is :

HTTP 401 (not authorized) with the stacktrace below:

com.wm.app.b2b.server.ServiceException: org.apache.axis2.AxisFault: Could not initialize class com.wm.net.NTLMAuthListener
at pub.clientimpl.wssClient(clientimpl.java:2670)
at pub.clientimpl.soapClient(clientimpl.java:1293)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:404)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:646)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:49)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:299)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:34)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:377)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:545)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:382)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:215)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:257)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:520)
at com.wm.lang.flow.FlowState.step(FlowState.java:389)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:360)
at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1123)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:646)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:49)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:299)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:34)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:377)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:545)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:382)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:156)
at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:173)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:397)
at com.wm.util.pool.PooledThread.run(PooledThread.java:127)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.axis2.AxisFault: Could not initialize class com.wm.net.NTLMAuthListener
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at com.wm.app.b2b.server.wss.HTTPTransportSender.makeFault(HTTPTransportSender.java:1148)
at com.wm.app.b2b.server.wss.HTTPTransportSender.writeMessageWithWebM(HTTPTransportSender.java:609)
at com.wm.app.b2b.server.wss.HTTPTransportSender.invoke(HTTPTransportSender.java:202)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:484)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:263)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at com.softwareag.wsstack.client.impl.WSOperationClientImpl.execute(WSOperationClientImpl.java:65)
at com.wm.app.b2b.server.wss.wssClientImpl.invokeWebService(wssClientImpl.java:215)
at pub.clientimpl.wssClient(clientimpl.java:2623)
… 42 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.wm.net.NTLMAuthListener
at com.wm.net.NTLMAuthHandlerFactory.create(NTLMAuthHandlerFactory.java:23)
at com.wm.net.HttpAuthManager.getAuthHandler(HttpAuthManager.java:105)
at com.wm.net.NetURLConnection._getInputStream(NetURLConnection.java:565)
at com.wm.net.NetURLConnection.getInputStream(NetURLConnection.java:320)
at com.wm.net.HttpContext.getFinalInputStream(HttpContext.java:864)
at com.wm.app.b2b.server.wss.HTTPTransportSender.sendRequest(HTTPTransportSender.java:670)
at com.wm.app.b2b.server.wss.HTTPTransportSender.writeMessageWithWebM(HTTPTransportSender.java:591)

Of course as a Java Developer, I understand what “java.lang.NoClassDefFoundError” means, but have no Idea how to fix it. I wonder if you guys can support me.

Regards

Your wM version? Create a flow service wrapper and inovke the consumer WSD connector in it.

AFAIK you must activate the Integrated Windows Authentication via WmWin32 package. Refer IS Administration Guide “Using NTLM Authentication and Integrated Windows Authentication with Integration Server”

In addition to this, go to \integrationserver\instances\default\packages\wmwin32\code\libs\

Ntlm.dll

Ntlm64.dll

Wmeventlog.dll

Wmeventlog64.dll

Copying the Ntlm dlls to the Microsoft Windows system directory, e.g.

C:\Windows\System32\

Restart IS
Call ntml:reg service in the WmWin32 package

And if you still have the same error try the below setting:
Change wrapper.conf to include path to DLLs
wrapper.java.library.path.4=<INSTALL_DIR>\IntegrationServer\instances\default\packages\WmWin32\code\libs

1 Like

Hello M@he$h

Well done, it works ! Thank you so much.

I am evaluating the trial 9.12 IS version, just in case!

Thank you!

Marlus

Hi Mahesh,

I have an interface calling from v9.5 IS to target using SOAP HTTP url and the providers asked us to use NTLM credentials while calling their system.

  1. I tried from soap ui by calling their wsdl directly with the provided credentials (domain name, username & password). It is working
  2. I tried from my code and pass the credentials at
    webservice connector → auth → user(domainname\username)
    webservice connector → auth → transport → pass(password)
    Here I’m getting " Authorization error"
  3. I gone through the empower forums and somewhere mentioned as IS_9.5_SP1_Win32_Fix1 needs to be installed to resolve Authorization error and I have installed this fix but issue remains same
  4. I tried as per your suggestion mentioned above
  • wrapper.java.library.path.5=<INSTALL_DIR>\IntegrationServer\instances\default\packages\WmWin32\code\libs
  • Enabled WmWin32 package and called ntml:reg service in the WmWin32 package
    but still I’m getting same authorization error.

Any further suggestions will be a great help…

Thanks,
Venkat .

If the above resolution steps does not fix your issue I would suggest you to contact SAG with details. Kindly update if you hear a fix from them.

Hi,
Now Authorization error resolved by adding the Authorization type as NTLM at connector “transportHeaders” level but getting the below error.

com.wm.app.b2b.server.ServiceException: org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ‘"’ (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
at [row,col {unknown-source}]: [1,50]

Please let me know if you have any clue on this