I was trying to get list of user's using web service .But I am getting error
while accessing the web service
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not
invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: No
write method for property {http://model.sample.org}accountNonExpired in class
org.sample.model.User
org.codehaus.xfire.fault.XFireFault: No write method for property
{http://model.sample.org}accountNonExpired in class org.sample.model.User
at
org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
at
org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
at
org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
at
org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
at
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy16.getUsers(Unknown Source)
at org.sample.service.TestEchoService.userService(TestEchoService.java:41)
at org.sample.service.TestEchoService.main(TestEchoService.java:16)
I am getting the same issue with all acegi related method such as
getAuthorities ,isAcccountNonExpired etc . I gave temp solution by adding
setter methods for these methods.
Please let me know if there is any better solution than above mentioned one ?
Why do we have 2 interfaces UserService and UserManager ,while we can
accomplish the same task with one interface .Please let me know thinking behind
2 interfaces ?
Currently I am accessing xfire web service using the following code in spring
based web application
/**
* Fetch all users from database and put into local "users" variable for
* retrieval in the UI.
*
* @return "success" if no exceptions thrown
*/
public String list() {
// users = userManager.getUsers(new User());
Service serviceModel = new AnnotationServiceFactory()
.create(UserService.class);
try {
UserService service = (UserService) new XFireProxyFactory().create(
serviceModel, "http://localhost:8080/services/UserService");
users = service.getUsers(new User());
Iterator<User> userIterator = users.iterator();
while (userIterator.hasNext()) {
System.out.println(userIterator.next().getFullName());
}
} catch (MalformedURLException e) {
e.printStackTrace();
}
return SUCCESS;
}
Is there any better way of accessing the web service ?
Thanks & Regards
_______________________________
Khaliq
________________________________
From: Rene Guenther [mailto:[EMAIL PROTECTED]
Sent: Thu 12/20/2007 7:31 PM
To: [email protected]
Subject: [appfuse-user] Acegi update 0.8.2 -> 1.0.5
I also posted this in the acegi forum, but maybe it is appfuse related. I
updated a lot of libraries of an appfuse 1.8 application so the problem
might be caused indirectly by another library.
Everything seems to work so far. But I got the following problem with
httpSessionContextIntegrationFilter:
Definition is:
<bean id="httpSessionContextIntegrationFilter"
class="org.acegisecurity.context.HttpSessionContex tIntegrationFilter">
<property name="allowSessionCreation" value="true"/>
</bean>
This results in cryptic symbols instead of html code. The response is
something like:
??M40????E?$J??&?Rr8???V??????????????w??Z?b? zP?X?a?&%C??
/?^?^????k7?m???b?????B?P0?t??6M?t?????u???? x????s?{z ?(O?+ ??7?
~??{?k?;^??SG?G???c?Bf?sQ??????UM{??vxXW?Oi ??
???_9x?/!?J????????p????? S?p?Yeu=?????? [EMAIL PROTECTED]>?|7t?6??s???
???Sm?y?$pm?$;??d??#?\ ?? ?]?n???????????~????i?=??a?S???O
Any idea what the reason could be?
Do I actually need this filter? Everything seems to be ok w/o ;-)
Chain is:
/**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,securityContextHolderAwareRequestFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
Thanks
René
--
View this message in context:
http://www.nabble.com/Acegi-update-0.8.2--%3E-1.0.5-tp14437057s2369p14437057.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Confidentiality Statement:
This message is intended only for the individual or entity to which it is
addressed. It may contain privileged, confidential information which is exempt
from disclosure under applicable laws. If you are not the intended recipient,
please note that you are strictly prohibited from disseminating or distributing
this information (other than to the intended recipient) or copying this
information. If you have received this communication in error, please notify us
immediately by return email.
-----------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]