[JBossWS] - Cannot find endpoint meta data for
by tpawankumar
Hi,
I am trying to deploy sample webservice by using Jax-ws.
I am using JBOSS 4.2.1GA application server and Jbossws 2.0.1GA.
The code for Remote interface is
package com.covad.Inter;
import java.rmi.Remote;
import java.rmi.RemoteException;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@WebService(name="Hello",targetNamespace = "http://Inter.covad.com/")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface Hello extends Remote {
String echo(String value) throws RemoteException;
}
and this is my [B]implementation[/B] class
package com.covad.impl;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@WebService(endpointInterface = "com.covad.Inter.Hello", name="Hello")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class HelloImpl {
public String echo(String value)
{
return "Hello"+value;
}
}
and this my [B]WSDL[/B] file which i generated by wsprovide tool
<?xml version="1.0" encoding="UTF-8"?>
<definitions name='HelloService' targetNamespace='http://Inter.covad.com/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://Inter.covad.com/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
<soap:operation soapAction=''/>
<soap:body namespace='http://Inter.covad.com/' use='literal'/>
<soap:body namespace='http://Inter.covad.com/' use='literal'/>
<soap:address location='REPLACE_WITH_ACTUAL_URL'/>
and this is my [B]Web.xml[/B] file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<servlet-name>JWeb</servlet-name>
<servlet-class>com.covad.impl.HelloImpl</servlet-class>
<servlet-mapping>
<servlet-name>JWeb</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
then i created war file with following directory
warfilename/WEB-INF/classes
warfilename/WEB-INF/lib
warfilename/WEB-INF/web.xml
warfilename/META-INF/wsdl/HelloService.wsdl
and tried to deploy and following is the exception i am getting
16:06:34,537 ERROR [MainDeployer] Could not start deployment: file:/D:/jboss-4.2
.1.GA/server/default/deploy/JbossWebService.war
java.lang.IllegalStateException: Cannot find endpoint meta data for: JWeb
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.getEndpointM
etaData(UnifiedMetaDataDeploymentAspect.java:117)
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(Unifi
edMetaDataDeploymentAspect.java:86)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy
(DeploymentAspectManagerImpl.java:115)
at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDep
loyerHook.java:97)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInt
erceptor.java:90)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
ptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy45.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
run(AbstractDeploymentScanner.java:225)
Please let me if i am missing something?
Please help me.
Thanks in Advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098773#4098773
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098773
18Â years, 6Â months
[JBoss jBPM] - How to set the timer duedate dynamicly
by abdelak01
hello,
I've just started to use JBPM, and I'd like to set the timer duedate dinamicly (using process variable). but it doesn't work;
here is my process :
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.1" name="rec_facture">
| <event type="process-start">
| <script>
| executionContext.setVariable("action_delay", "6 seconds");
| </script>
| </event>
| <start-state name="create_reclamation">
| <transition name="to_action1" to="action_"></transition>
| </start-state>
| <end-state name="end1"></end-state>
| <state name="action_">
| <timer name="actionTimer" duedate="#{action_delay}" transition="action_time_out">
| <action name="action_t" class="com.sample.action.ActionTimeOutActionHandler">
| <action_name>action_test</action_name>
| </action>
| </timer>
| <transition name="action_time_out" to="end1"></transition>
| <transition name="new_action" to="action_"></transition>
| </state>
| </process-definition>
|
when I run my test application I got this message
| ERROR GraphElement : action threw exception: improper format of duration '#{action_delay}'
|
thanks for help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098771#4098771
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098771
18Â years, 6Â months
[Security & JAAS/JBoss] - Accessing Roles from Custom LoginModule return NULL
by ejb3workshop
I have implemented my own login module and configure the login-config.xml file. I am able to authenticate users. However when I try to access the principal's roles it always returns null. Tomcat requires the developer to configure different classes for users and roles and uses the class to differentiate. However in JBoss I have not found the configuration for this. I am trying to use this LoginModule to secure web servers and ejb's.
I am guessing that this is my problem.
| import java.io.IOException;
| import java.security.acl.Group;
| import java.util.Map;
| import javax.security.auth.Subject;
| import javax.security.auth.callback.Callback;
| import javax.security.auth.callback.CallbackHandler;
| import javax.security.auth.callback.NameCallback;
| import javax.security.auth.callback.PasswordCallback;
| import javax.security.auth.callback.UnsupportedCallbackException;
| import javax.security.auth.login.LoginException;
| import javax.security.auth.spi.LoginModule;
| import org.apache.log4j.Logger;
|
| public class SimpleLoginModule implements LoginModule {
| private Logger logger = Logger.getLogger(SimpleLoginModule.class);
| private Subject subject;
| private CallbackHandler callbackHandler;
|
| public SimpleLoginModule() {
| logger.info("Constructed new CIELogingModule");
| }
|
| public boolean abort() throws LoginException {
| logger.info("Aborted");
| return true;
| }
|
| public boolean commit() throws LoginException {
| logger.info("Granted Permissions");
| return true;
| }
|
| public void initialize(Subject subject, CallbackHandler callbackHandler, Map state, Map options) {
| logger.info("Initialise : "+options);
| this.subject = subject;
| this.callbackHandler=callbackHandler;
| }
|
| public boolean login() throws LoginException {
| logger.info("Login");
| NameCallback nameCallback = new NameCallback("User Name");
| PasswordCallback passwordCallback = new PasswordCallback("User Password", false);
| Callback[] callbacks = new Callback[2];
| callbacks[0] = nameCallback;
| callbacks[1] = passwordCallback;
| logger.info("Configured callbacks");
| try {
| logger.info("Handling callbacks");
| callbackHandler.handle(callbacks);
| logger.info("Handled callbacks");
| } catch (UnsupportedCallbackException ex) {
| ex.printStackTrace();
| } catch (IOException ex) {
| ex.printStackTrace();
| }
| String userid = "default";
| String password = "default";
| try {
| if (nameCallback.getName() != null) {
| userid = nameCallback.getName();
| }
| if (passwordCallback.getPassword() != null) {
| password = new String(passwordCallback.getPassword());
| }
| logger.info("Processed callbacks");
| passwordCallback.clearPassword();
| logger.info("Attempt to login with :"+userid+" and "+password);
| } catch (Exception e) {
| e.printStackTrace();
| }
| JAASUser user = new JAASUser(1,userid);
| JAASRole role = new JAASRole("friends");
| subject.getPrincipals().add(user);
| subject.getPrincipals().add(role);
| return true;
| }
|
| public boolean logout() throws LoginException {
| logger.info("Logout");
| subject.getPrincipals().clear();
| return true;
| }
| }
|
I tried adding the getRoleSets method as shown below which I got from an example in this forum, but this did not make any difference.
| public Group[] getRoleSets() throws LoginException {
| Group grp = new JAASGroup("Roles");
| grp.addMember(new JAASRole("friend"));
| grp.addMember(new JAASRole("friends"));
| return new Group[]{grp};
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098752#4098752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098752
18Â years, 6Â months