Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

consuming a webservice with cxf-client and NTLM authentication

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

i am new at the coderanch and i have a question about groovy on grails consuming a webservice with cxf-client and NTLM authentication.

I have an test-project witch is consuming a webservice without any authentication and all works fine. If i have to consume a webservice with NTLM password authentication, i am getting an "jcifs.smb.SmbException" that says "The parameter is incorrect.", but no information witch parameter is incorrect. Is there somewhere a configuration example for jcifs? On the grails website i only can find, that i have to use "jcifs" for NTLM authentication but there isnt a good configuration sample. I dont know, what i have to do in the configuration to fix the error with the incorrect parameter. I am using the grails plugin "ntlm-auth:0.6" for this authentication.

Here is my configuration sample:

http.domainController = 'xxx.xxx.xxx.xxx' // ... or use jcifs.netbios.wins
smb.netbios.wins = 'xxx.xxx.xxx.xxx'
smb.client.domain = 'DOMAIN NAME' //for www.example.de its EXAMPLE correct?
smb.client.username = 'username'
smb.client.password = 'password'

Do i have to set the Domain-Address "xxx.xxx.xxx.xxx" twice?

Someone knows a good example to test NTLM authentication? Please help me.

System:
JDK 6
Grails 2.2.2
ntlm-auth 0.6
cxf-client:2.0.1

best regards henry
 
Saloon Keeper
Posts: 24330
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Henry!

I'm presuming that this app is for strictly in-house use, since NTLM doesn't work very well over the general Internet.

You might want to raise the logging level for "jcifs.smb" to DEBUG in your applications log settings and see what gets reported.
 
Henry Beier
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

first of all, thank you for your answer!

here is my log-config:

log4j = {
// Example of changing the log pattern for the default console appender:
//
//appenders {
// console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
//}

error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework',
'org.hibernate',
'net.sf.ehcache.hibernate'

info 'org.apache.cxf' //debug, etc

debug 'jcifs.smb'
}

debug 'jcifs.smb' is allready in it.

But i just see only this infos in the console:

Error 2015-05-20 18:18:00,157 [http-bio-8080-exec-3] ERROR [/GrailsWebserviceTest].[default] - Servlet.service() for servlet [default] in context with path [/GrailsWebserviceTest] threw exception
Message: The parameter is incorrect.
Line | Method
->> 539 | checkStatus in jcifs.smb.SmbTransport
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 641 | send in ''
| 296 | sessionSetup in jcifs.smb.SmbSession
| 217 | send in ''
| 161 | treeConnect in jcifs.smb.SmbTree
| 153 | logon in jcifs.smb.SmbSession
| 146 | logon . . . in ''
| 189 | negotiate in jcifs.http.NtlmHttpFilter
| 121 | doFilter . . in ''
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
 
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic