RE: WSIF Authentication Proxy
"Harshal Mulherkar" <harshal-aDUQ/[email protected]> Tue, 23 May 2006 11:06:54 -0400
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <2A5EB5171962E44F84756823FD322495A93B9A@exchange.interactivesys.com> |
Hi Alek,
Per your suggestion, I built WSDL 1.5.2 and then ran my code.
Here is an extract from my source code:
==============================================
System.out.println("wsdlLocation: " + wsdlLocation);
PasswordAuthentication pa = new
PasswordAuthentication("abcd","abc123".toCharArray());
AuthenticatingProxyWSDLLocatorImpl locator = new
AuthenticatingProxyWSDLLocatorImpl(wsdlLocation, pa);
if(locator == null)
System.out.println("-------------------- locator is
null---------------");
if(locator.getBaseInputSource() == null)
System.out.println("------ locator.getBaseInputSource() is
null--------");
Definition def = WSIFUtils.readWSDL(locator);
================================================
This is the output:
========================
wsdlLocation: http://server1:11021/tsllc2/services/GenericAPI?wsdl
-------------------- locator.getBaseInputSource() is null---------------
May 23, 2006 10:58:46 AM org.apache.wsif.logging.MessageLogger logIt
SEVERE: WSIF0002E: A failure occurred in loading WSDL from
'http://server1:11021/tsllc2/services/GenericAPI?wsdl'
Exception in thread "main" WSDLException: faultCode=OTHER_ERROR: Unable
to locate document at
'http://server1:11021/tsllc2/services/GenericAPI?wsdl'.:
at
com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2186)
at org.apache.wsif.util.WSIFUtils.readWSDL(WSIFUtils.java:444)
at DynamicInvoker.invokeMethod(DynamicInvoker.java:213)
at DynamicInvoker.main(DynamicInvoker.java:151)
========================
So the problem lies in AuthenticatingProxyWSDLLocatorImpl. I have tried
pointing to several other URL endpoints that expose a WSDL. But each
time, I get the same error.
-- Harshal
-----Original Message-----
From: Aleksander Slominski [mailto:[email protected]]
Sent: Monday, May 22, 2006 6:23 PM
To: Harshal Mulherkar
Cc: [email protected]
Subject: Re: WSIF Authentication Proxy
Harshal Mulherkar wrote:
> I am now using WSIF2.1_RC. I have an Axis Web Service running on
Tomcat
> with authentication required. When I point to the WSDL endpoint using
a
> web browser, the browser aptly brings up a login dialog to capture
> username/password and is able to retrieve and display the WSDL.
>
> Now I want to read the same WSDL using WSIF. Here is what I do:
>
> AuthenticatingProxyWSDLLocatorImpl locator = new
> AuthenticatingProxyWSDLLocatorImpl (wsdlLocation, username, password);
>
> Definition def = WSIFUtils.readWSDL(locator);
>
> At this point I get a NullPointerException and I do not see the
supplied
> username/password being sent to the server for authentication.
>
> Exception in thread "main" java.lang.NullPointerException
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at org.apache.wsif.util.WSIFUtils.readWSDL(WSIFUtils.java:444)
> at DynamicInvoker.invokeMethod(DynamicInvoker.java:220)
> at DynamicInvoker.main(DynamicInvoker.java:151)
>
could you try to use different version or compile WSDL4J from the source
- the problem seems to be in WSDL4J but there is no source line number
(WSDLReaderImpl.readWSDL(Unknown Source)).
> Any help will be appreciated.
>
if it does not help send us what is needed to reproduce the problem
(such as WSDL you use and command line or any other source files)
HTH,
alek
>
> -----Original Message-----
> From: Aleksander Slominski [mailto:[email protected]]
> Sent: Monday, May 22, 2006 4:15 PM
> To: [email protected]
> Cc: Harshal Mulherkar
> Subject: Re: WSIF status
>
> hi Harshal,
>
> you can find the latest WSIF build as a pre-release at this temporary
> location http://people.apache.org/dist/ws/wsif/
> and hopefully in near future we have a maintenance release 2.1 - if
> there are any improvements or bugs please post to wsif-dev and submit
an
> issue to apache WSIF jira.
>
> thanks,
>
> alek
>
> Nirmal Mukhi wrote:
>
>> WSIF is being maintained at Apache; there is an active user community
>>
> that
>
>> posts to the mailing lists with bugs, fixes, questions, etc. Re. your
>> question about accessing remote WSDLs, WSIF 2.0 is quite out of date,
>>
> you
>
>> are better of downloading a recent build to get new functions and bug
>>
> fixes
>
>> that have been added since then. We need to consolidate this inot a
>>
> new
>
>> release, but for now you'll have to do with a nightly build.
>>
>> Take a look at http://ws.apache.org/wsif for instructions on how to
>> subscribe to the mailing list, access mail archives, etc.
>>
>> Thanks,
>> Nirmal.
>>
>>
>>
>>
>
>
>> "Harshal
>>
>
>
>> Mulherkar"
>>
>
>
>> <[email protected]
>>
> To
>
>> om> Nirmal Mukhi/Watson/IBM@IBMUS
>>
>
>
> cc
>
>> 05/22/2006 11:37
>>
>
>
>> AM
>>
> Subject
>
>> WSIF status
>>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>>
>>
>> Dear Mr. Mukhi,
>>
>> With reference to your article on WSIF, Sep 1, 2001
>> http://www-128.ibm.com/developerworks/library/ws-wsif.html#resources
>> I would like to ask about the status of the WSIF project. Is this
>>
> abandoned
>
>> by IBM? Is this being maintained at all by Apache?
>>
>> I encountered a discrepancy in the documentation and I could not find
>>
> any
>
>> conclusive answer about the following API functions:
>>
>> org.apache.wsif.util
>> Class WSIFUtils
>>
>>
>>
>>
>
|-----------------+-----------------------------------------------------
> --|
>
>> | static|readWSDL(javax.wsdl.xml.WSDLLocator loc)
>>
> |
>
>> |javax.wsdl.Defini|
>>
> |
>
>> | tion|
>>
> |
>
>
|-----------------+-----------------------------------------------------
> --|
>
>> | static|readWSDLThroughAuthProxy(java.lang.String wsdlLoc,
>>
> |
>
>> |javax.wsdl.Defini|java.net.PasswordAuthentication pa)
>>
> |
>
>> | tion|
>>
> |
>
>
|-----------------+-----------------------------------------------------
> --|
>
>>
>> Source:
>>
>>
>
http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=
>
/com.ibm.wasee.doc/info/ee/javadoc/wsi/org/apache/wsif/util/WSIFUtils.ht
> ml
>
>> These 2 methods in WSIFUtils class are apparently the only 2 methods
>>
> to
>
>> access a WSDL on a web server that requires user authentication.
>>
> However
>
>> these methods are not available in the WSIF-2.0 distribution of
>>
> Apache's
>
>> WSIF. This raises the question whether WSIF is production ready or
>>
> not.
>
>> I would greatly appreciate any pointers from you
>>
>> Many thanks,
>> Harshal Mulherkar
>> Multimodal Technologies, Inc
>> 319 South Craig Street
>> Pittsburgh 15213
>>
>>
>>
>
>
>
--
The best way to predict the future is to invent it - Alan Kay