[JBossWS] - jaxrpc Array problem
by odin69
Hello,
I have created a web service which returns a non-standard value type to the invoking app. I used the wsconsume tool to create the client side files from the wsdl.
My Problem right now is that my value type named customerData contains an int_array which causes problems on the client side. In the class CustomerData the in_array is defined as follows:
private int[] products; + setters and getters
on the client-side the wsconsume tool generates the follwoing:
public List<Integer> getProducts() {
| if (products == null) {
| products = new ArrayList<Integer>();
| }
| return this.products;
| }
the web service is invoked with:
CustomerData cdCell = ND_CELLPHONE_STUB.getCustomerData(phoneNumber);
when I use the generated customerData file I get an error, but when I am using the orig. CustomerData file from the service everything is ok. I am a little bit stuck right now. Am I doing something wrong generating the client-side classes?
thx
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131859#4131859
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131859
16 years, 8 months
[JNDI/Naming/Network] - JNDI - javax.ejb.EJBException
by MARCOS GOMES
Hi,
I have a problem finding out a session bean:
javax.servlet.ServletException: javax.ejb.EJBException: javax.naming.NameNotFoundException: travel not bound
org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:126)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
--------------------------------------------------------
I'm trying to access the bean like this:
TravelAgentLocal travelag = null;
try {
javax.naming.InitialContext ctx = new InitialContext( );
travelag = (TravelAgentLocal)ctx.lookup("travel");
}
catch (javax.naming.NamingException ne) {
throw new EJBException(ne);
}
--------------------------------------------------------
This is my session bean:
package com.travelagent;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.jboss.seam.annotations.Name;
import com.entitybean.Empresa;
@Stateless
@Name("travel")
public class TravelAgentBean implements TravelAgentRemote, TravelAgentLocal{
@PersistenceContext(unitName="system") private EntityManager manager;
public void createEmpresa(Empresa emp){
manager.persist(emp);
}
public Empresa findEmpresa(int pKey){
return manager.find(Empresa.class, pKey);
}
}
The question is: using this session bean inside a war file it doesn't work, but when I deploy it using a jar file, deleting "@Name("travel")" it works well.
Could someone help me, please ?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131855#4131855
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131855
16 years, 8 months
[JBossCache] - Relogin after 30 minutes
by typsy
Hi,
I am using JBoss 4.0.5 GA.
Class [Custom]JaasSecurityManager has a function called isValid which contains this part of code:
public boolean isValid(Principal principal, Object credential,
| Subject activeSubject) {
| [...]
| boolean isValid = false;
| if (cacheInfo != null) {
| isValid = validateCache(cacheInfo, credential, activeSubject);
|
| //Q1 if (cacheInfo != null)
| cacheInfo.release();
| }
|
| if (isValid == false)
| isValid = authenticate(principal, credential, activeSubject);
|
| [...]
|
The first question is: line with comment //Q1 - is something changed meanwhile, e.g cacheInfo that it's needed a new check for cacheInfo?
------
In my application I get always relogin at every 30 miuntes.
I am already authenticated when at every 30 minutes it relogins.
JBoss is let to do its job to destroy everything it needs when the timeout appears.
I called a dumpStack to see who's calling the logout every 30 minutes and I got this:
16:37:08,204 INFO [STDOUT] **************AMJBossLoginModule --- logout
java.lang.Thread.dumpStack(Thread.java:1158)
[packageName].AmJBossLoginModule.logout(AmJBossLoginModule.java:151)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
java.security.AccessController.doPrivileged(Native Method)
[packageName].LoginContext.invokePriv(LoginContext.java:680)
[packageName].LoginContext.logout(LoginContext.java:629)
[packageName]CustomJaasSecurityManager$DomainInfo.logout(CustomJaasSecurityManager.java:143)
[packageName].CustomJaasSecurityManager$DomainInfo.destroy(CustomJaasSecurityManager.java:176)
org.jboss.util.TimedCachePolicy.get(TimedCachePolicy.java:183)
[packageName].CustomJaasSecurityManager.getCacheInfo(CustomJaasSecurityManager.java:749)
[packageName].CustomJaasSecurityManager.isValid(CustomJaasSecurityManager.java:370)
org.jboss.aspects.security.AuthenticationInterceptor.authenticate(AuthenticationInterceptor.java:123)
[...]
16:37:08,392 INFO [STDOUT] **************AMJBossLoginModule --- login
So isvalid() calls logout. Then
isValid = validateCache(cacheInfo, credential, activeSubject);
does not set isValid to true ['cause otherwise it wouldn't had authenticate(principal, credential, activeSubject) again.].
It validates the cache, cacheInfo is released and then it autheticates again although I've been already authenticated 30 minutes ago, and I've been making operation with the application meanwhile.
I was thinking it's just the cache mechanism and there is nothing to be done..
The 2nd question is: Can there be done something to get rid of the relogin every 30 minutes?
Please advice, thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131850#4131850
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131850
16 years, 8 months