[
http://jira.codehaus.org/browse/XFIRE-832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_89422
]
Andreas Baumann commented on XFIRE-832:
---------------------------------------
Pretty much I had the same problem, but I trie 1.1.2 and 1.2.4:
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245)
at java.net.URL.openStream(URL.java:1009)
at org.codehaus.xfire.util.Resolver.tryFileSystem(Resolver.java:84)
at org.codehaus.xfire.util.Resolver.<init>(Resolver.java:48)
at org.codehaus.xfire.util.Resolver.<init>(Resolver.java:35)
at
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.makeClient(XFireClientFactoryBean.java:496)
at
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.createClient(XFireClientFactoryBean.java:412)
at
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.afterPropertiesSet(XFireClientFactoryBean.java:119)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1118)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429)
My problem is the following piece of code in XFireClientFactoryBean.java
(trunk, revision 1898):
private Object createClient()
throws Exception
{
Object serviceClient = makeClient();
...
Client client = Client.getInstance(serviceClient);
String username = getUsername();
if (username != null)
{
client.setProperty(Channel.USERNAME, username);
String password = getPassword();
client.setProperty(Channel.PASSWORD, password);
if (LOG.isDebugEnabled())
{
LOG.debug("Enabled HTTP basic authentication for: " + interf +
" with username: "
+ username);
}
}
Then in makeClient():
URI uri = resolver.getURI();
if (uri == null)
{
throw new XFireRuntimeException("Could not resolve uri " + uri);
}
serviceModel = getServiceFactory().create(getServiceInterface(),
name,
uri.toURL(),
_properties);
Can somebody explain me that code? I read it as "read the WSDL first without
authentification, then set authentification for normal RPC calls".
Maybe this is the intention of SOAP: always publish your WDSL?
If this password/username method via setters is scaresly used, is there a
better way (Acegi in the client)?
> XFire throws exception when working with secure WSDL's
> ------------------------------------------------------
>
> Key: XFIRE-832
> URL: http://jira.codehaus.org/browse/XFIRE-832
> Project: XFire
> Issue Type: Bug
> Affects Versions: 1.2.3
> Reporter: Andres Bernasconi
> Assigned To: Dan Diephouse
> Priority: Critical
>
> While trying to upgrade from 1.1.2 to 1.2.3 I encountered the following
> error. Notice that I'm using spring to configure XFire, so I'm creating an
> XFireClientFactoryBean.
> My WSDL is secured (http username / password), and I get the following
> exception:
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creati
> ng bean with name 'elementManagerService' defined in class path resource
> [servic
> es-context.xml]: Cannot resolve reference to bean 'elementManagerTarget'
> while s
> etting bean property 'target'; nested exception is
> org.springframework.beans.fac
> tory.BeanCreationException: Error creating bean with name
> 'elementManagerTarget'
> defined in class path resource [services-context.xml]: Initialization of
> bean f
> ailed; nested exception is java.io.FileNotFoundException: Response: '401:
> Unauth
> orized xxx' for url: '
> http://localhost:8001/ElementManager/ElementManagerService
> ?WSDL'
> I tracked down the problem to the Resolver class, where in line 74 it tries
> to:
> is = relative.toURL().openStream();
> I have an outHandler configured to add security to my outgoing messages, but,
> obviously it is not being called.
> This works well with 1.1.2 (don't know if in such version XFire tried to get
> a hold of the WSDL doc). This basically prevents from moving on the new
> versions of the stack.
> Thanks a lot
> Andres Bernasconi.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email