[EJB3] - CLIENT-CERT enabled EJB3 in JBoss5.1
by Administrator Administrator
Administrator Administrator [http://community.jboss.org/people/admin] modified the document:
"CLIENT-CERT enabled EJB3 in JBoss5.1"
To view the document, visit: http://community.jboss.org/docs/DOC-15734
--------------------------------------------------------------
After have struggled a bit to setup this stuff, learning a lot of interesting things, so here I am writing a clean, pure description of how set up a CLIENT-CERT enable EJB3 application in JBoss5.1 which uses a DatabaseCertLoginModule. The goal of this document is more a cookbook, than a reference one so please forgive lacks of explaination.
h4. The EJB class
Skipping the details of the implementaiton lets see only the top part of the class
import org.jboss.security.annotation.SecurityDomain;
import org.jboss.wsf.spi.annotation.WebContext;
import javax.annotation.security.RolesAllowed;
import javax.ejb.Stateless;
import javax.jws.WebService;
@WebService
@Stateless(name="dpws")
@SecurityDomain("discoveryDomain")
@RolesAllowed("OPERATOR")
@WebContext(contextRoot="/discovery", urlPattern="/dpws" ,authMethod="CLIENT-CERT", transportGuarantee="CONFIDENTIAL", secureWSDLAccess=false)
public class MyDiscovery implements MyDiscoveryRemote, MyDiscoveryLocal{
@WebMethod(operationName="getNames")
public String[] getNames() {
return {"Fabio", "Marco"};
}
}
Few notes:
** the authMethod (CLIENT-CERT) requires the client to send a certificate for the authentication
** the transportGuarantee (CONFIDENTIAL) requires JBoss to open an SSL connection
** the secureWSDLAccess (false) allow anyone to see the WSDL
For other options see the annotations documentation
* When packaging the EJB do not forget to add to the META-INF directory the jboss.xml file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC -//JBoss//DTD JBOSS 3.2//EN http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd>
<jboss>
<security-domain>java:/jaas/discoveryDomain</security-domain>
</jboss>
Note that the +security-domain+ defers to the previous EJB's @SecurityDomains.
h4. Client's and Server's Certificates
Open a terminal windows, create a temporary folder, say "Certificates", and executes the following commands
Create the server keystore
keytool -genkey -alias serverkeys -keyalg RSA -keystore server.keystore -storepass psw1 -keypass psw2
Export the server certificate
keytool -export -alias serverkeys -keystore server.keystore -storepass psw1 -file server.cer
Create the client keystore
keytool -genkey -alias clientkeys -keyalg RSA -keystore client.keystore -storepass pswA -keypass pswB
Export the client certificate
keytool -export -alias clientkeys -keystore client.keystore -storepass pswA -file client.cer
Import the client certificate in the server.truststore
keytool -import -v -keystore server.truststore -storepass psw1 -file client.cer
Import the serevr certificate in the server.truststore
keytool -import -v -keystore client.truststore -storepass pswA -file server.cer
Anyway in a real world you just need only two steps:
1. a certify signed by a trusted Certification Authority (CA) for your client
2. import the CA certificate into your server.truststore
3. import the server certificate in your client.truststore
h4.
h4. JBoss setup
As should be known, ${jboss.server.home.dir} indicates the $JBOSS_HOME/server/YourInstance directory.
* Copy the *server.keystore* and *server.truststore* files in ${jboss.server.home.dir}/conf
* Enable the JBoss's SSL connector editing the ${jboss.server.home.dir}/deploy/jbossweb.sar/server.xml and adding the following configuration
<!-- SSL/TLS Connector configuration using the admin devl guide keystore-->
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="8443" address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}/conf/server.keystore"
keystorePass="psw1"
truststoreFile="${jboss.server.home.dir}/conf/server.truststore"
truststorePass="psw2"
sslProtocol = "TLS" />
* In the ${jboss.server.home.dir}/deploy folder create a *discovery-service.xml* file (or eventually edit one *-service.xml file you already use) and add
<!-- Configures the Discovery SecurityDomain -->
<mbean code="org.jboss.security.plugins.JaasSecurityDomain" name="jboss.security:service=SecurityDomain">
<constructor>
<arg type="java.lang.String" value="discoveryDomain" />
</constructor>
<attribute name="KeyStoreURL">file:${jboss.server.home.dir}/conf/server.keystore</attribute>
<attribute name="KeyStorePass">pws1</attribute>
<attribute name="TrustStoreURL">file:${jboss.server.home.dir}/conf/server.truststore</attribute>
<attribute name="TrustStorePass">pws2</attribute>
<depends>jboss.security:service=JaasSecurityManager</depends>
</mbean>
<mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="jboss:service=DynamicLoginConfig">
<attribute name="AuthConfig">
file:${jboss.server.home.dir}/deploy/discovery-security-config.xml
</attribute>
<depends optional-attribute-name="LoginConfigService">
jboss.security:service=XMLLoginConfig
</depends>
<depends optional-attribute-name="SecurityManagerService"> jboss.security:service=JaasSecurityManager
</depends>
</mbean>
Notice that
** the first MBean defines the domain name (discoveryDomain) and the location of the key/truststore
** the second MBean defines the location of a specific policy configuraration file (so do not have to touch the ${jboss.server.home.dir}/conf/login-config.xml)
* creates ${jboss.server.home.dir}/deploy/discovery-security-config.xml file
<?xml version="1.0" encoding="UTF-8"?>
<policy>
<application-policy name="discoveryDomain">
<authentication>
<login-module code="org.jboss.security.auth.spi.DatabaseCertLoginModule" flag = "required">
<module-option name="password-stacking">useFirstPass</module-option>
<module-option name="securityDomain">java:/jaas/discoveryDomain</module-option>
<module-option name="dsJndiName">jdbc/securityDS</module-option>
<module-option name="rolesQuery">select role, role_group from roles where principal_id=?</module-option>
<module-option name="verifier">ndg.common.jboss.security.CertVerifier</module-option>
</login-module>
</authentication>
</application-policy>
</policy>
Notice that the policy defines a custom verifier, CertVerifier, which allow the application to customize the authenticationl; an empty, always trusting implementation, looks like
import java.security.KeyStore;
import java.security.cert.X509Certificate;
import org.jboss.security.auth.certs.X509CertificateVerifier;
public class CertVerifier implements X509CertificateVerifier {
public boolean verify(X509Certificate arg0, String arg1, KeyStore arg2, KeyStore arg3) {
System.out.println("CIAO!!!!!");
return true;
}
}
Notes that this clas should be packed in a separate jar file and deployed possibly in creates ${jboss.server.home.dir}/lib
* As should be clear the policy uses a DatabaseCertLoginModule class so we have to define a table in a given database using the roleTable.sql script
CREATE TABLE roles( role_group character varying NOT NULL DEFAULT 'Roles'::character varying,
"role" character varying NOT NULL,
principal_id character varying NOT NULL)
Notice that:
** The role_group column has 'Roles' as DEFAULT. This value MUST NOT be changed nor overrided.
** You need to insert *by hand* a row with your client role/PrincipalID. Such row will look like
"Roles";"OPERATOR";"CN=Maurizio Nagni, OU=BADC, O=STFC, L=Harwell, ST=Oxfordshire, C=UK"
* At the end you need a configuration file for the datasource similar to a *discovery-ds.xml*
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/securityDS</jndi-name>
[.......]
<local-tx-datasource>
<datasources>
h4. The Client setup
Once you deploy all the necessary machinery in JBoss you should verify that your WSDL is visible but none of the services is available. Now you can generate a WebService Client using any tool you like most (I used the Eclipse) to write a quick and dirty test like
import java.rmi.RemoteException;
import javax.security.auth.login.LoginContext;
import javax.xml.rpc.ServiceException;
public class Client {
/**
* @param args
*/
public static void main(String[] args) {
MyDiscoveryService svc = new MyDiscoveryServiceLocator();
MyDiscovery ws;
try {
ws = svc.getMyDiscoveryPort();
String[] listNames = ws.getNames(); //my webService method
for (String name : listNames)
System.out.println(name);
} catch (ServiceException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}
}
}
Now you can run the Client class passing to the JVM the appropriate parameters, that is
-Djavax.net.ssl.keyStore=/myPathTo/client.keystore
-Djavax.net.ssl.keyStorePassword=pswA-Djavax.net.ssl.trustStore=/myPathTo/client.truststore
-Djavax.net.ssl.trustStorePassword=pswB
and verify that the client has been authenticated using its certificate and that the client name has been correctly associated to the role specified in the Roles table.
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-15734]
Create a new document in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
13 years, 9 months
[jBPM] - jbpm flows stop executing
by Morten Hauch
Morten Hauch [http://community.jboss.org/people/hauch] created the discussion
"jbpm flows stop executing"
To view the discussion, visit: http://community.jboss.org/message/582136#582136
--------------------------------------------------------------
Hi
I will start to apologize for a vague error description - this is all I have....
Running JBoss ESB 4.4 with the included jBPM 3.2.2 I have experienced "frozen" flows:
All flows stop executing and the log is silence.
The flows are started from ESB services. New flows hang in the start node. I can see that on-leave events are executed but the state is never changed to the following node.
The flows use webservices through ESB services using the EsbActionHandler.
I managed to get new flows to process by redeploying unchanged versions.
I guess this indicates that threads for the "old" instances are in some sort of bad standing - however even a restart of JBoss did not help.
Are there some symptoms I should be aware of - are there some causes that might be revealed by looking in the right places in the jmx-console?
Are there some log4j categories that should be set to trace/debug?
I will be very thankful if anybody could provide me with hints of what the reason to this can be?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582136#582136]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 9 months
[Datasource Configuration] - database table cannot be created but no error
by lily liang
lily liang [http://community.jboss.org/people/lilyliang] created the discussion
"database table cannot be created but no error"
To view the discussion, visit: http://community.jboss.org/message/582009#582009
--------------------------------------------------------------
I use mySQL as jboss datasource, I have 5 entity class that need be created as database table after my application is deployed. But when I start up jboss, everything seems well but no table is created in database. Can someone help? the log as below:
[ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
[ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MySqlDS' to JNDI name 'java:MySqlDS'
[TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
[EARDeployer] Init J2EE application: file:/C:/jboss-4.2.3.GA/server/default/deploy/contentmanager-ear-0.1.ear
[JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.entity.PersistenceUnitDeployment
[JmxKernelAbstraction] installing MBean: persistence.units:ear=contentmanager-ear-0.1.ear,jar=contentmanager-ejb-0.1.jar,unitName=ContentManagerDm with dependencies:
[JmxKernelAbstraction] jboss.jca:name=MySqlDS,service=DataSourceBinding
[PersistenceUnitDeployment] Starting persistence unit persistence.units:ear=contentmanager-ear-0.1.ear,jar=contentmanager-ejb-0.1.jar,unitName=ContentManagerDm
[Version] Hibernate EntityManager 3.2.1.GA
[Version] Hibernate Annotations 3.2.1.GA
[Environment] Hibernate 3.2.4.sp1
[Environment] hibernate.properties not found
[Environment] Bytecode provider name : javassist
[Environment] using JDK 1.4 java.sql.Timestamp handling
[Ejb3Configuration] found EJB3 Entity bean: com.contentmanager.db.CategoryEntity
[Ejb3Configuration] found EJB3 Entity bean: com.contentmanager.db.ChannelEntity
[Ejb3Configuration] found EJB3 Entity bean: com.contentmanager.db.MovieEntity
[Ejb3Configuration] found EJB3 Entity bean: com.contentmanager.db.PackageEntity
[Ejb3Configuration] found EJB3 Entity bean: com.contentmanager.db.PhyChannelEntity
[Ejb3Configuration] found EJB3 Entity bean: com.contentmanager.db.ProgramEntity
[Ejb3Configuration] found EJB3 Entity bean: com.contentmanager.db.ScheduleEntity
[Configuration] Reading mappings from resource : META-INF/orm.xml
[Ejb3Configuration] [PersistenceUnit: ContentManagerDm] no META-INF/orm.xml found
[ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
[InjectedDataSourceConnectionProvider] Using provided datasource
[SettingsFactory] RDBMS: MySQL, version: 5.1.54-community
[SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.14 ( Revision: ${bzr.revision-id} )
[Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
[TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
[TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
[TransactionManagerLookupFactory] instantiated TransactionManagerLookup
[SettingsFactory] Automatic flush during beforeCompletion(): disabled
[SettingsFactory] Automatic session close at end of transaction: disabled
[SettingsFactory] JDBC batch size: 15
[SettingsFactory] JDBC batch updates for versioned data: disabled
[SettingsFactory] Scrollable result sets: enabled
[SettingsFactory] JDBC3 getGeneratedKeys(): enabled
[SettingsFactory] Connection release mode: auto
[SettingsFactory] Maximum outer join fetch depth: 2
[SettingsFactory] Default batch fetch size: 1
[SettingsFactory] Generate SQL with comments: disabled
[SettingsFactory] Order SQL updates by primary key: disabled
[SettingsFactory] Order SQL inserts for batching: disabled
[SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
[SettingsFactory] Query language substitutions: {}
[SettingsFactory] JPA-QL strict compliance: enabled
[SettingsFactory] Second-level cache: enabled
[SettingsFactory] Query cache: enabled
[SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
[SettingsFactory] Optimize cache for minimal puts: disabled
[SettingsFactory] Cache region prefix: contentmanager-ear-0_1_ear,contentmanager-ejb-0_1_jar,ContentManagerDm
[SettingsFactory] Structured second-level cache entries: enabled
[SettingsFactory] Query cache factory: org.hibernate.cache.StandardQueryCacheFactory
[SettingsFactory] Statistics: disabled
[SettingsFactory] Deleted entity synthetic identifier rollback: disabled
[SettingsFactory] Default entity-mode: pojo
[SettingsFactory] Named query checking : enabled
[SessionFactoryImpl] building session factory
[SessionFactoryObjectFactory] Factory name: persistence.units:ear=contentmanager-ear-0.1.ear,jar=contentmanager-ejb-0.1.jar,unitName=ContentManagerDm
[NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
[SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.units:ear=contentmanager-ear-0.1.ear,jar=contentmanager-ejb-0.1.jar,unitName=ContentManagerDm
[SessionFactoryObjectFactory] InitialContext did not implement EventContext
[SchemaUpdate] Running hbm2ddl schema update
[SchemaUpdate] fetching database metadata
[SchemaUpdate] updating schema
[SchemaUpdate] schema update complete
[NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582009#582009]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 9 months
[Datasource Configuration] - my JDBC Datasource marked as unvailable
by Antoine Brun
Antoine Brun [http://community.jboss.org/people/abr] created the discussion
"my JDBC Datasource marked as unvailable"
To view the discussion, visit: http://community.jboss.org/message/581634#581634
--------------------------------------------------------------
Hi,
I'm still stuck with this strange behavior with my deployed JDBC datasource.
My datasource is declare like shoown below:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/customerDS</jndi-name>
<connection-url>jdbc:oracle:thin:@127.0.0.1:1521:CUSTOMER</connection-url>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<user-name>ncgest</user-name>
<password>ncgest</password>
</local-tx-datasource>
</datasources>
when jboss starts (nothing else is deployed)
I get this in the console log (see below, I've added more log4j logs):
no exception, but still in the jboss admin console I still get:
*Status:* http://knoc:9080/admin-console/images/iconStatusUnavailable.gif http://knoc:9080/admin-console/images/iconStatusUnavailable.gif Unavailable
and
*Run State:* UNKNOWN
The strange thing with this is that my application runs well, for some time, then it looses the database connection and has to be restarted.
I know that there is something wrong with my jboss 5 configuration, it derived from the default profile, but how can I troubleshoot this?
What log4j setting can I use?
Antoine
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Creating jboss.jca:service=ManagedConnectionFactory,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Created jboss.jca:service=ManagedConnectionFactory,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Starting jboss.jca:service=ManagedConnectionFactory,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'NewConnectionSQL'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'ValidConnectionCheckerClassName'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'ValidateOnMatch'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'Password'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'QueryTimeout'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'CheckValidConnectionSQL'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'ConnectionProperties'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'ExceptionSorterClassName'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'TrackStatements'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'TransactionIsolation'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'UrlSelectorStrategyClassName'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'StaleConnectionCheckerClassName'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'DriverClass'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'ConnectionURL'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'UseTryLock'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'TransactionQueryTimeout'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'PreparedStatementCacheSize'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'UserName'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'SharePreparedStatements'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'URLDelimiter'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] setting property: UserName to value ncgest
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] set property UserName to value ncgest
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] setting property: Password to value ncgest
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] set property Password to value ncgest
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] setting property: PreparedStatementCacheSize to value 0
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] set property PreparedStatementCacheSize to value 0
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] setting property: SharePreparedStatements to value false
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] set property SharePreparedStatements to value false
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] setting property: QueryTimeout to value 0
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] set property QueryTimeout to value 0
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] setting property: UseTryLock to value 0
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] setting property: TransactionQueryTimeout to value false
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] set property TransactionQueryTimeout to value false
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] setting property: ValidateOnMatch to value true
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] set property ValidateOnMatch to value true
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] setting property: ConnectionURL to value jdbc:oracle:thin:@127.0.0.1:1521:CUSTOMER
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] set property ConnectionURL to value jdbc:oracle:thin:@127.0.0.1:1521:CUSTOMER
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] setting property: DriverClass to value oracle.jdbc.OracleDriver
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] set property DriverClass to value oracle.jdbc.OracleDriver
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Not setting config property 'ConnectionProperties'
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ManagedConnectionFactoryDeployment] Started jboss.jca:service=ManagedConnectionFactory,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.JBossManagedConnectionPool] Creating jboss.jca:service=ManagedConnectionPool,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.JBossManagedConnectionPool] Created jboss.jca:service=ManagedConnectionPool,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.JBossManagedConnectionPool] Starting jboss.jca:service=ManagedConnectionPool,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.JBossManagedConnectionPool] Started jboss.jca:service=ManagedConnectionPool,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.TxConnectionManager] Creating jboss.jca:service=LocalTxCM,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.TxConnectionManager] Created jboss.jca:service=LocalTxCM,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.TxConnectionManager] Starting jboss.jca:service=LocalTxCM,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.TxConnectionManager] Started jboss.jca:service=LocalTxCM,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [remote.WrapperDataSourceService] Creating jboss.jca:service=DataSourceBinding,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [remote.WrapperDataSourceService] Created jboss.jca:service=DataSourceBinding,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [remote.WrapperDataSourceService] Starting jboss.jca:service=DataSourceBinding,name=jdbc/customerDS
18/Jan/2011 18:25:52 DEBUG [connectionmanager.ConnectionFactoryBindingService] Binding object 'org.jboss.resource.adapter.jdbc.WrapperDataSource@1034f8d' into JNDI at 'java:jdbc/customerDS'
18/Jan/2011 18:25:52 INFO [connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/customerDS' to JNDI name 'java:jdbc/customerDS'
18/Jan/2011 18:25:52 DEBUG [remote.WrapperDataSourceService] Started jboss.jca:service=DataSourceBinding,name=jdbc/customerDS
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/581634#581634]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 9 months
[JBoss Web Services] - Re: missing <wsse:Security> tag in WS-Security
by Himaja Thovi
Himaja Thovi [http://community.jboss.org/people/t.himaja] created the discussion
"Re: missing <wsse:Security> tag in WS-Security"
To view the discussion, visit: http://community.jboss.org/message/580453#580453
--------------------------------------------------------------
Hi,
Later i added few jars like jbossws-client.jar, jboss-common.jar, log4j.jar then i got some debug log at client side as follows:
DEBUG [main] (JAXWSClientMetaDataBuilder.java:77) - START buildMetaData: [service={http://com/}ServerService]
DEBUG [main] (WSDLDefinitionsFactory.java:102) - parse: http://127.0.0.1:9898/JbossWS/Server?wsdl
DEBUG [main] (JavaToXSD.java:175) - Load schema: http://com/=file:/tmp/JBossWS_com_5071302848578309750.xsd
DEBUG [main] (JBossWSEntityResolver.java:64) - resolveEntity: [pub=null,sysid=file:/tmp/JBossWS_com_5071302848578309750.xsd]
DEBUG [main] (JBossWSEntityResolver.java:64) - resolveEntity: [pub=http://schemas.xmlsoap.org/soap/encoding/,sysid=null]
DEBUG [main] (EndpointMetaData.java:311) - Using default parameter style: WRAPPED
DEBUG [main] (JAXWSClientMetaDataBuilder.java:102) - END buildMetaData:
UnifiedMetaData:
implementation: jbossws-3.0.1-native-2.0.4.GA (build=200803312044)
deploymentName: null
securityDomain: null
ServiceMetaData:
qname={http://com/}ServerService
refName=null
wsdName=null
wsdlFile=null
wsdlLocation=http://127.0.0.1:9898/JbossWS/Server?wsdl
jaxrpcMapping=null
publishLocation=null
securityConfig=null
properties=null
TypesMetaData:
<schema targetNamespace='http://com/' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://com/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<complexType name='message'/>
<complexType name='messageResponse'>
<sequence>
<element maxOccurs='1' minOccurs='0' name='return' type='string'/>
</sequence>
</complexType>
<element name='message' type='tns:message'/>
<element name='messageResponse' type='tns:messageResponse'/>
</schema>
ClientEndpointMetaData:
type=JAXWS
qname={http://com/}ServerPort
address=http://127.0.0.1:9898/JbossWS/Server
binding=http://schemas.xmlsoap.org/wsdl/soap/http
seiName=null
configFile=META-INF/standard-jaxws-client-config.xml
configName=Standard Client(Doubt At This Point)
authMethod=null
properties={}
OperationMetaData:
qname={http://com/}message
javaName={http://com/}message
style=document/literal/WRAPPED
oneWay=false
soapAction=
DEBUG [main] (JAXWSClientMetaDataBuilder.java:276) - START: rebuildMetaData
DEBUG [main] (EndpointMetaData.java:321) - setParameterStyle: null
DEBUG [main] (EndpointMetaData.java:812) - Create new config [name=Standard Client,file=META-INF/standard-jaxws-client-config.xml]
DEBUG [main] (JBossWSConfigFactory.java:125) - getConfig: [name=Standard Client,url=META-INF/standard-jaxws-client-config.xml]
DEBUG [main] (JBossWSConfigFactory.java:71) - parse: jar:file:/home/himaja/NetBeansProjects/JbossWSClient/lib/jbossws-client.jar!/META-INF/standard-jaxws-client-config.xml
DEBUG [main] (SaxJBossXBParser.java:241) - Created parser: org.apache.xerces.jaxp.SAXParserImpl@15aed57, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
DEBUG [main] (SaxJBossXBParser.java:157) - http://xml.org/sax/features/validation set to: true
DEBUG [main] (SaxJBossXBParser.java:157) - http://xml.org/sax/features/namespaces set to: true
DEBUG [main] (SaxJBossXBParser.java:157) - http://apache.org/xml/features/validation/dynamic set to: true
DEBUG [main] (SaxJBossXBParser.java:157) - http://xml.org/sax/features/validation set to: true
DEBUG [main] (SaxJBossXBParser.java:157) - http://apache.org/xml/features/validation/schema set to: true
DEBUG [main] (SaxJBossXBParser.java:241) - Created parser: org.apache.xerces.jaxp.SAXParserImpl@15aed57, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
DEBUG [main] (EndpointMetaData.java:867) - Configure EndpointMetaData
DEBUG [main] (EndpointMetaData.java:879) - Added 0 PRE handlers
DEBUG [main] (EndpointMetaData.java:880) - Added 0 ENDPOINT handlers
DEBUG [main] (EndpointMetaData.java:881) - Added 0 POST handlers
DEBUG [main] (EndpointMetaData.java:321) - setParameterStyle: WRAPPED
DEBUG [main] (JAXWSMetaDataBuilder.java:938) - JAXBContext [types=[class com.Message, class com.MessageResponse],tns=http://com/]
DEBUG [main] (OperationMetaData.java:208) - Found best matching java method: public abstract java.lang.String com.Server.message()
DEBUG [main] (JAXWSClientMetaDataBuilder.java:322) - END: rebuildMetaData
ServiceMetaData:
qname={http://com/}ServerService
refName=null
wsdName=null
wsdlFile=null
wsdlLocation=http://127.0.0.1:9898/JbossWS/Server?wsdl
jaxrpcMapping=null
publishLocation=null
securityConfig=null
properties=null
TypesMetaData:
[complexType={http://com/}message,javaType=com.Message]
[complexType={http://com/}messageResponse,javaType=com.MessageResponse]
<schema targetNamespace='http://com/' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://com/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<complexType name='message'/>
<complexType name='messageResponse'>
<sequence>
<element maxOccurs='1' minOccurs='0' name='return' type='string'/>
</sequence>
</complexType>
<element name='message' type='tns:message'/>
<element name='messageResponse' type='tns:messageResponse'/>
</schema>
ClientEndpointMetaData:
type=JAXWS
qname={http://com/}ServerPort
address=http://127.0.0.1:9898/JbossWS/Server
binding=http://schemas.xmlsoap.org/wsdl/soap/http
seiName=com.Server
configFile=META-INF/standard-jaxws-client-config.xml
configName=Standard Client
authMethod=null
properties={}
OperationMetaData:
qname={http://com/}message
javaName=message
style=document/literal/WRAPPED
oneWay=false
soapAction=
ParameterMetaData:
xmlName={http://com/}message
partName=message
xmlType={http://com/}message
javaType=com.Message
mode=IN
inHeader=false
index=0
wrappedParameters=[]
ReturnMetaData:
xmlName={http://com/}messageResponse
partName=messageResponse
xmlType={http://com/}messageResponse
javaType=com.MessageResponse
mode=OUT
inHeader=false
index=-1
wrappedParameters=[[name = return, type = java.lang.String, typeArgs = null, variable = return, index = -1]]
DEBUG [main] (EndpointMetaData.java:732) - Configure SOAPBinding
DEBUG [main] (HandlerResolverImpl.java:125) - initHandlerChain: PRE
DEBUG [main] (HandlerResolverImpl.java:125) - initHandlerChain: ENDPOINT
DEBUG [main] (HandlerResolverImpl.java:125) - initHandlerChain: POST
DEBUG [main] (HandlerResolverImpl.java:99) - getHandlerChain: [type=PRE,info=[service={http://com/}ServerService,port={http://com/}Serve...]
DEBUG [main] (HandlerResolverImpl.java:99) - getHandlerChain: [type=POST,info=[service={http://com/}ServerService,port={http://com/}Serv...]
DEBUG [main] (HandlerResolverImpl.java:99) - getHandlerChain: [type=ENDPOINT,info=[service={http://com/}ServerService,port={http://com/}...]
DEBUG [main] (BindingImpl.java:94) - setHandlerChain: []
DEBUG [main] (ServiceDelegateImpl.java:434) - No port configuration for: {http://com/}ServerPort
DEBUG [main] (MessageContextAssociation.java:46) - pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@afae4a (Thread main)
DEBUG [main] (ParameterWrapping.java:109) - wrapRequestParameters: com.Message
DEBUG [main] (EndpointInvocation.java:103) - setRequestParamValue: [name={http://com/}message,value=com.Message]
DEBUG [main] (CommonSOAPBinding.java:144) - bindRequestMessage: {http://com/}message
DEBUG [main] (EndpointInvocation.java:110) - getRequestParamValue: {http://com/}message
DEBUG [main] (EndpointInvocation.java:268) - transformPayloadValue: com.Message -> com.Message
DEBUG [main] (HandlerChainExecutor.java:84) - Create a handler executor: []
DEBUG [main] (HandlerChainExecutor.java:84) - Create a handler executor: []
DEBUG [main] (HandlerChainExecutor.java:84) - Create a handler executor: []
DEBUG [main] (HTTPRemotingConnection.java:176) - Get locator for: [addr=http://127.0.0.1:9898/JbossWS/Server,props={javax.xml.ws.service.endpoint.address=http://127.0.0.1:9898/JbossWS/Server}]
DEBUG [main] (MicroRemoteClientInvoker.java:298) - org.jboss.remoting.transport.http.HTTPClientInvoker@15b0e2c connecting
DEBUG [main] (MicroRemoteClientInvoker.java:312) - org.jboss.remoting.transport.http.HTTPClientInvoker@15b0e2c connected
DEBUG [main] (HTTPRemotingConnection.java:220) - Remoting metadata: {NoThrowOnError=true, HEADER={SOAPAction="", Content-Type=text/xml; charset=UTF-8}}
DEBUG [main] (HTTPClientInvoker.java:313) - Setting request header with SOAPAction : ""
DEBUG [main] (HTTPClientInvoker.java:313) - Setting request header with Content-Type : text/xml; charset=UTF-8
DEBUG [main] (SOAPContentElement.java:137) - -----------------------------------
DEBUG [main] (SOAPContentElement.java:138) - Transitioning from OBJECT_VALID to XML_VALID
DEBUG [main] (ObjectContent.java:135) - getXMLFragment from Object [xmlType={http://com/}message,javaType=class com.Message]
DEBUG [main] (JAXBSerializer.java:61) - serialize: [xmlName={http://com/}message,xmlType={http://com/}message]
DEBUG [main] (JAXBSerializer.java:83) - serialized: <ns1:message xmlns:ns1="http://com/"/>
DEBUG [main] (ObjectContent.java:162) - xmlFragment: [source=<ns1:message xmlns:ns1="http://com/"/>]
DEBUG [main] (SOAPContentElement.java:144) - -----------------------------------
DEBUG [main] (SOAPMessageUnMarshallerHTTP.java:123) - getMimeHeaders from: {Date=[Thu, 13 Jan 2011 05:18:34 GMT], Transfer-Encoding=[chunked], NoThrowOnError=true, HEADER={SOAPAction="", Content-Type=text/xml; charset=UTF-8}, ResponseCode=500, ResponseCodeMessage=Internal Server Error, ResponseHeaders={null=[HTTP/1.1 500 Internal Server Error], Transfer-Encoding=[chunked], Date=[Thu, 13 Jan 2011 05:18:34 GMT], Content-Type=[text/xml;charset=UTF-8], Connection=[close], Server=[Apache-Coyote/1.1], X-Powered-By=[Servlet 2.5; JBoss-5.0/JBossWeb-2.1]}, Connection=[close], Content-Type=[text/xml;charset=UTF-8], X-Powered-By=[Servlet 2.5; JBoss-5.0/JBossWeb-2.1], Server=[Apache-Coyote/1.1]}
DEBUG [main] (MessageFactoryImpl.java:215) - createMessage: [contentType=text/xml; charset=UTF-8]
DEBUG [main] (InvokerRegistry.java:631) - removed org.jboss.remoting.transport.http.HTTPClientInvoker@15b0e2c from registry
DEBUG [main] (MessageContextJAXWS.java:105) - Begin response processing
DEBUG [main] (MessageContextAssociation.java:75) - popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@afae4a (Thread main)
DEBUG [main] (MessageContextAssociation.java:46) - pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@61cd2 (Thread main)
DEBUG [main] (CommonSOAPBinding.java:542) - unbindResponseMessage: {http://com/}message
DEBUG [main] (SOAPContentElement.java:137) - -----------------------------------
DEBUG [main] (SOAPContentElement.java:138) - Transitioning from XML_VALID to DOM_VALID
DEBUG [main] (SOAPContentElement.java:144) - -----------------------------------
DEBUG [main] (HandlerChainExecutor.java:96) - close
DEBUG [main] (HandlerChainExecutor.java:96) - close
DEBUG [main] (HandlerChainExecutor.java:96) - close
DEBUG [main] (MessageContextAssociation.java:75) - popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@61cd2 (Thread main)
javax.xml.ws.soap.SOAPFaultException: This service requires <wsse:Security>, which is missing.
at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:72)
at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:109)
at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:579)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:380)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
at $Proxy15.message(Unknown Source)
at jbosswsclient.Main.main(Main.java:16)
BUILD SUCCESSFUL (total time: 2 seconds)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580453#580453]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 9 months