A Forte Client calling an IIOP enabled EJB
Hi everybody,
I have a stateless session EJB that is to be accessed by a Forte client.
I have generated the IDL files of the EJB home and remote interfaces.
The method called on the EJB takes Strings as arguments and returns a String.
So i would like to know which are the stubs my Forte client need in order to call
the EJB method??
Are they the EJB home and remote stubs only or the stubs of all interfaces and
classes my EJB
home and remote interfaces extend and implement??
thank you very much.
Stan.
Andy Piper <[email protected]> wrote:
"Iakov" <[email protected]> writes:
I have a stateless session EJB that is to be accessed by a Forte client.
I have generated the IDL files of the EJB home and remote interfaces.
The method called on the EJB takes Strings as arguments and returnsa String.
So i would like to know which are the stubs my Forte client need inorder to call
the EJB method??
Are they the EJB home and remote stubs only or the stubs of all interfacesand
classes my EJB
home and remote interfaces extend and implement??You can't use the IDL with Java clients (we document this, so does Sun
and IBM). What kind of client is the forte client? It should have an
IDL compiler if it is a CORBA environment.
andyThank you Andy,
The Forte client needs the IDL files that I produce using the Weblogic tool.
But as you know this produces many IDL files perhaps useless to the Forte client.
So my question is;
Apart from the Home and the Remote EJB interfaces IDL files which are the other
IDL files
my client need to be compiled?
For example, does it need the EJBObject and the EJBHome interfaces IDL files????
Thank you.
Stan.
Similar Messages
-
5.1.0 JSP client calling 4.5.1 EJB
We are upgrading a suite of apps and we would like to migrate our JSP's in
phase one and then migrate the EJB framework in phase two. When I try to
create the JNDI initial context to connect to an EJB running in 4.5.1 from a
JSP running in 5.1.0 I get the following exception:
Problem resolving context javax.naming.CommunicationException [Root
exception is weblogic.socket.UnrecoverableConnectException: [Login failed:
'Incompatible version:Incompatible versions - this server:4.5.1
client:5.1.0]]
I am going to try and see if there is a way for the JSP to use the 4.5.1
classes for JNDI. While I am working on that, can anyone help with some
other suggestions.
Thanks, Doug SchnelzerIs there any plan to support backward compatibility in future ?
Due to above restriction we have to use lowest common BEA version.
I guess BEA must learn how real world application work. I guess compatability
should be like ORACLE RDBMS.
Thanks
Kumar Allamraju <[email protected]> wrote:
No.
As of 6.0 release, the client & server should be on the same version.
Kumar
Rakesh wrote:
Hello,
Can my client running on WLS 5.1.0.9 can connect/work with applicationdeployed
on WLS 6.0.0.1 ?
Thanks -
Example of client/servelt calling an Entity Bean(EJB 2.0)
Hi !!
Can somebody give any code of servlet or client calling an entity bean...please give any sample code... I am getting error while calling an entity bean in Servlet....
It says that the Jndi name not found
SERVLET CODE----------
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import sfms.mtk.*;
import sfms.sec.*;
import java.util.*;
public class TestServletExample extends HttpServlet
SecDbSecUserHome home;
public void init(ServletConfig config)throws ServletException{
//Look up home interface
try
Properties props = new Properties();
System.out.println("Looking for Jndi ----->>");
InitialContext ctx = new javax.naming.InitialContext();
home = (SecDbSecUserHome)javax.rmi.PortableRemoteObject.narrow(ctx.lookup("SecUserJndi"), SecDbSecUserHome.class);
System.out.println("Lookup is over ----->>");
catch (Exception NamingException)
NamingException.printStackTrace();
public void doGet (HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException
MTKDataObject objDataObject = null;
PrintWriter out;
response.setContentType("text/html");
String title = "EJB Example";
out = response.getWriter();
out.println("<HTML><HEAD><TITLE>");
out.println(title);
out.println("</TITLE></HEAD><BODY>");
try
System.out.println("*************STARTING NOW*************");
Collection coll = home.findAllUsers();
Iterator i =coll.iterator();
while(i.hasNext())
SecDbSecUserRemote remote = (SecDbSecUserRemote)i.next();
System.out.println("User ID "+remote.getUserId());
System.out.println("FirstName "+remote.getFirstName());
catch(Exception CreateException)
CreateException.printStackTrace();
out.close();
public void destroy()
System.out.println("Destroy");
javax.naming.NameNotFoundException: SecUserJndi not found
<<no stack trace available>>
*************STARTING NOW*************
java.lang.NullPointerException
at TestServletExample.doGet(TestServletExample.java:49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)
PLEASE DO REPLY ME BACK (ASAP)
BhumikaThere should be some error in looking up the Jndi..
In weblogic server I have been using the following code:
try
Context ctx = getContext.getInitialContext();
HelloHome home = (HelloHome)ctx.lookup("MyHello");
Hello hello = home.create();
System.out.println(hello.display());
catch(Exception e)
System.out.println("Error :");
e.printStackTrace();
static String user = null;
static String password = null;
static String url = "t3://localhost:7001";
* Gets an initial context.
* @return Context
* @exception java.lang.Exception if there is
* an error in getting a Context
static public Context getInitialContext() throws Exception
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL, url);
if (user != null)
System.out.println ("user: " + user);
p.put(Context.SECURITY_PRINCIPAL, user);
if (password == null)
password = "";
p.put(Context.SECURITY_CREDENTIALS, password);
return new InitialContext(p);
this works fine in weblogic..
also check if ur classpath is ok.. -
How do I run a JCA adapter when I am calling it from an EJB?
How do I run a JCA adapter when I am calling it from an EJB? Do I need to create an EJB client and place it in a Client container? If my EJB and JCA adapter are deployed is there a way to call my EJB from the command line?
MikeHi. When you look at the code I provided for you in other thread you will see that connecting to adapter is done through JNDI lookup. The creation of the adapter is done in your J2EE server. Here is some code for you where you can find mapping from code to ejb-jar and orion-ejb-jar.
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar 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/ejb-jar_2_1.xsd"
version="2.1">
<!--
This file declares the interface (needs/promises) of the message-driven bean.
The MDB requires:
- a JMS queue (to receive messages from the client),
- a JMS exception queue (to send undeliverable messages back to the source), and
- a connection factory (to communicate with a JMS resource provider).
Note that communication with the resource provider may be (and for this
application is) via a JMS Connector rather than direct.
-->
<display-name>JMS Consume MDB - opp-ifs</display-name>
<enterprise-beans>
<entity>
<description>Entity Bean ( BMP )</description>
<display-name>EBEjbMecomsIFS</display-name>
<ejb-name>EBEjbMecomsIFS</ejb-name>
<local-home>EBEjbMecomsIFSLocalHome</local-home>
<local>EBEjbMecomsIFSLocal</local>
<ejb-class>EBEjbMecomsIFSBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.Long</prim-key-class>
<reentrant>false</reentrant>
<service-ref>
<service-ref-name>service/interceptor</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/MHS5_Jms_In_RS.wsdl</wsdl-file>
<service-qname xmlns:ns="http://oracle.com/esb/namespaces/PilotOWSM_MustHavesScenario5">ns:ESB_MHS5_Jms_In_RS_Service</service-qname>
</service-ref>
</entity>
<message-driven>
<display-name>JMS Consume MDB - MDB</display-name>
<ejb-name>MDBEjbMecomsIFS</ejb-name>
<!-- name of bean in deployment descriptor (including orion-ejb-jar.xml file) -->
<ejb-class>MDBEjbMecomsIFSBean</ejb-class>
<!-- bean's fully qualified Java class name -->
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<!-- allow incoming messages to be included in transactions -->
<!-- The ejb requires a connection factory to access an external resource (JMS). -->
<ejb-local-ref>
<ejb-ref-name>ejb/local/EBEjbopp_ifs</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>EBEjbMecomsIFSLocalHome</local-home>
<local>EBEjbMecomsIFSLocal</local>
<ejb-link>EBEjbMecomsIFS</ejb-link>
</ejb-local-ref>
<resource-ref>
<!-- The resource's connection factory must be accessible at jndi location "java:comp/env/jms/QueueConnectionFactory". -->
<res-ref-name>jms/QueueConnectionFactory</res-ref-name>
<!-- The resource's connection factory must implement the "javax.jms.ConnectionFactory" interface. -->
<res-type>javax.jms.ConnectionFactory</res-type>
<!-- container managed authorization -->
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<!--
Declare that a global transaction is required when the onMessage method of the ejb named
"MDBEjbName" is called. This will cause the app server to automatically initiate a
global (XA) transaction before calling onMessage (actually, before even receiving the JMS
message that triggers onMessage) and end the transaction after onMessage returns. The
JMS Connector will automatically rollback the transaction if onMessage throws an
exception. onMessage may also set the transaction to be "rollback only".
Participating in global transactions requires that the connection factory provided in the
activation spec (see the ConnectionFactoryJndiName property earlier in this file) must be
XA-capable (it must implement the javax.jms.XAConnectionFactory interface).
If this declaration is ommitted, then onMethod will not be part of any global
transaction. In that case the connection factory provided in the activation spec must
implement the javax.jms.ConnectionFactory interface.
-->
<container-transaction>
<method>
<ejb-name>MDBEjbMecomsIFS</ejb-name>
<method-name>onMessage</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>EBEjbMecomsIFS</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
orion-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNameSpaceSchemaLocation="http://www.oracle.com/technology/oracleas/schema/orion-ejb-jar-10_0.xsd">
<enterprise-beans>
<entity-deployment name="EBEjbMecomsIFS">
<service-ref-mapping name="service/interceptor">
<wsdl-location>http://on-poc62.ontw.alfa.local:7777/event/PilotOWSM/MustHavesScenario5/MHS5_Jms_In_RS?wsdl</wsdl-location>
<service-qname localpart="ESB_MHS5_Jms_In_RS_Service" namespaceURI="http://oracle.com/esb/namespaces/PilotOWSM_MustHavesScenario5"/>
<port-info>
<wsdl-port namespaceURI="http://oracle.com/esb/namespaces/PilotOWSM_MustHavesScenario5"
localpart="__soap_MHS5_Jms_In_RS_execute_ppt"/>
<service-endpoint-interface>javax.xml.rpc.Service</service-endpoint-interface>
<call-property>
<name>javax.xml.rpc.service.endpoint.address</name>
<value>http://on-poc62.ontw.alfa.local:7777/event/PilotOWSM/MustHavesScenario5/MHS5_Jms_In_RS</value>
</call-property>
<call-property>
<name>javax.xml.rpc.soap.http.soapaction.uri</name>
<value>execute</value>
</call-property>
<call-property>
<name>javax.xml.rpc.soap.http.soapaction.use</name>
<value>true</value>
</call-property>
<call-property>
<name>javax.xml.rpc.soap.operation.style</name>
<value>document</value>
</call-property>
<runtime enabled="owsm">
<owsm init-home="/oracle/product/SoaAs/10.1.3/owsm/config/interceptors/C0003002"
init-file="confluent.properties"/>
</runtime>
</port-info>
</service-ref-mapping>
</entity-deployment>
<message-driven-deployment name="MDBEjbMecomsIFS"
resource-adapter="OEMSJMSDRAopp-ifs"
enabled="true" max-instances="10">
<!--
The ejb requires a connection factory implementing the "javax.jms.XAConnectionFactory"
interface to be accessible at jndi location "java:comp/env/jms/QueueConnectionFactory". (see ejb-jar.xml and ....)
A suitable connection factory is already accessible at jndi location "OEMSJMSDRASubcontext/MyXACF" (see oc4j-ra.xml)
-->
<resource-ref-mapping location="OEMSJMSDRASubopp-ifs/MyXACF"
name="jms/QueueConnectionFactory"/>
<!-- don't misspell this or you'll get an RP CF which doesn't work -->
<!-- Required activation-spec properties. -->
<!--
ConnectionFactoryJndiName (string, no default)
This should be the JNDI location of an RA connection factory.
The JMS Connector will use this connection factory to create the JMS
connection it uses to receive messages for this MDB's onMessage. If the
exception queue is enabled (see UseExceptionQueue), the JMS Connector will
also use a connection created from this connection factory for the production
of messages to the exception queue.
This connection factory must be compatible with the message domain(s). (For
example, if the MDB is receiving messages from a queue, the connection
factory should implement javax.jms.[XA]QueueConnectionFactory or
javx.jms.[XA]ConnectionFactory.)
For XA/non-XA considerations, see the <container-transaction> comments later
in this file.
-->
<config-property>
<config-property-name>ConnectionFactoryJndiName</config-property-name>
<config-property-value>OEMSJMSDRASubopp-ifs/MyXAQCF</config-property-value>
</config-property>
<!--
DestinationName (string, no default)
This is JNDI location of the queue or topic from which messages to be
delivered to the MDB's onMessage method should be received.
The JNDI locations for RA destinations are defined in the
oc4j-connectors.xml file.
-->
<config-property>
<config-property-name>DestinationName</config-property-name>
<config-property-value>OEMSJMSDRASubopp-ifs/MyQ</config-property-value>
</config-property>
<!--
DestinationType (string, no default)
This must be set to the type of the destination named by the above
"DestinationName" property.
The EJB 2.1 spec states that this must be set to either javax.jms.Queue or
javax.jms.Topic. OracleGJRA also allows it to be set to
javax.jms.Destination (which works for both queues and topics).
-->
<config-property>
<config-property-name>DestinationType</config-property-name>
<config-property-value>javax.jms.Queue</config-property-value>
</config-property>
<!--
Other activation-spec properties.
The following activation-spec properties supported by OracleGJRA are optional
except where otherwise noted:
-->
<!--
ListenerThreadMaxPollInterval (milliseconds, 5000)
Listener threads "poll" to see if there is a message waiting to be processed.
The more frequently this polling is performed, the faster (on average) a given
listener thread can respond to a new message. The price for frequent polling is
overhead - the resource provider must process a receive request each time it is
polled.
Oracle's JMS Connector implementation applies an adaptive algorithm which
uses shorter polling intervals (high polling rates) during periods of activity
(once activity is noticed) and longer polling intervals (lower polling rates)
during periods of inactivity. The ListenerThreadMaxPollInterval property places
an upper limit on the polling interval used by this adaptive algorithm.
-->
<config-property>
<config-property-name>ListenerThreadMaxPollInterval</config-property-name>
<config-property-value>5000</config-property-value>
</config-property>
<!--
AcknowledgeMode (string, default = Auto-acknowledge)
This should be set to Auto-acknowledge or Dups-ok-acknowledge. This
controls the quality-of-service provided by listener threads which
consume messages and call the MDB's onMessage method.
MessageSelector (string, default = no message filtering)
This is the selector expression used to filter messages sent to the
MDB's onMessage method. (I.e., this is used as the messageSelector for
the JMS sessions created for the listener threads.)
SubscriptionDurability (string, default = NonDurable)
For topics this should be set to Durable or NonDurable. (This should
not be set for queues.) This controls the durability of the topic
consumer used by the listener thread. When SubscriptionDurability is
set to Durable (and DestinationType is javax.jms.Topic or
javax.jms.Destination), the SubscriptionName property is required.
SubscriptionName (string, no default)
This property is required when SubscriptionDurability is Durable (and
DestinationType is javax.jms.Topic or javax.jms.Destination). (In all
other cases it is ignored.) This is the name used when creating the
durable subscriber used by the listener thread. For a given JMS server,
a given subscription name should be assigned to at most one MDB (which
must have most one listener thread).
ClientId (string, no default)
If set, connection(s) used by the listener threads will be set to use
this client ID.
TransactionTimeout (milliseconds, default = 300,000)
This limits the amount of time that the JMS Connector will wait for a
message to arrive before exiting the current transaction. The
transaction manager limits the amount of time a transaction can last
(see transaction-timeout in transaction-manager.xml).
TransactionTimeout should be set such that the transaction manager will
not timeout the transaction during the onMessage routine unless
something is wrong. For example, If the transaction mananager timeout
is set to 30 seconds, and the onMessage routine will never take more
than 10 seconds unless something is wrong, then this property could be
set to 20 seconds (20000 milliseconds).
EndpointFailureRetryInterval (milliseconds, default = 60,000)
If an endpoint can not be processed (due to the app server WorkManager
not accepting new work), it will be scheduled to be retried this many
milliseconds later.
ReceiverThreads (integer, default = 1)
This sets the maximum number of listener threads to create for this
endpoint. For queues, using more than one thread may be useful in
increasing the rate at which messages can be consumed. For topics this
value should always be 1. (Each listener thread gets its own session
and TopicSubscriber. For durable subscribers it would be an error to
have more than one subscriber with the same subscription name. For
nondurable subscribers having more than one thread will not help because
more threads translates into more subscribers which translates into more
copies of each message.) See also: ListenerThreadMinBusyDuration
UseExceptionQueue (boolean, default = false)
When "UseExceptionQueue" is true:
- Messages that would otherwise be discarded are sent to the
exception queue. (Currently the only case where this happens is
when the max delivery count is exceeded. See MaxDeliveryCnt
property.) Rather than sending the original message directly to
the exception queue, the following procedure is used:
o Create a new message of the same type.
o Copy the properties and body from the original message to the
new message.
o If the headers were copied, sending the message to the
exception queue would cause most of them to be lost
(over-written by the resource-provider). So instead,
translate headers in the original to properties in the copy,
assigning each header obtained via "getJMS{Header}" to
property "GJRA_CopyOfJMS{Header}". Since
javax.jms.Destination is not a valid property type, translate
destination headers into descriptive messages.
(Currently this same service is not provided for JMSX*
properties, most notably the JMSXDeliveryCount property.)
o If some part of the copy process (above) or augmentation
process (below) fails, do not abort. Attempt to complete the
rest of the procedure. (For Bytes/Map/Stream message types,
this can mean that part of the body is copied and the rest is
not.)
o If the copy process is 100% successful, add a boolean property
called "GJRA_CopySuccessful" with the value "true".
o Add a string property called "GJRA_DeliveryFailureReason" which
indicates why the message was not delivered.
o If the MDB onMessage method generated an exception immediately
prior to the delivery failure, add a string property called
"GJRA_onMessageExceptions" which contains exception information.
o Send the resulting message to the exception queue.
Note that only one attempt is made to send the message to the
exception queue. Should this attempt fail, the message will
be discarded without being placed in the exception queue.
See IncludeBodiesInExceptionQueue property for potential variations
of the above procedure.
- The ExceptionQueueName property is required.
- In addition to being used for the primary destination, the
connection factory specified by the ConnectionFactoryJndiName
property will also be used for the exception queue. If the primary
destination (specified by the DestinationName property) is a topic,
then the connection factory must support both queues and topics.
(I.e., the <connectionfactory-interface> [see oc4j-ra.xml] for the
given connection factory must be either javax.jms.ConnectionFactory
or javax.jms.XAConnectionFactory.)
ExceptionQueueName (string, no default)
This is the JNDI location of the javax.jms.Queue object to use as the
exception queue. (See UseExceptionQueue property for information about
the use of the exception queue.) This property is required when
UseExceptionQueue is true, and ignored when UseExceptionQueue is false.
IncludeBodiesInExceptionQueue (boolean, default = true)
This controls whether or not messages sent to the exception queue will
include a message body. (See UseExceptionQueue property for information
about the use of the exception queue.) If many messages are sent to the
exception queue during normal operation and the message body is of no
use in the exception queue, then this property may be set false to
improve performance. This property is ignored when UseExceptionQueue is
false. There are two cases where this property does not apply:
- If the original message did not have a message body, then the
message sent to the exception queue will not have one either.
- If a copy of the original message can not be created for any
reason, then the original may be sent to the exception queue
instead. This may result in a message body being sent to the
exception queue.
MaxDeliveryCnt (integer, default = 5)
If a message has the "JMSXDeliveryCount" property and the value of that
property is greater than MaxDeliveryCnt, then the message will be
discarded (and not sent to onMessage). If the exception queue is
enabled (see UseExceptionQueue), a copy of the message will be sent to
the exception queue. If MaxDeliveryCnt is set to 0, no messages will be
discarded. (Note that when an MDB responds to a message by throwing an
exception, the message is not considered delivered and it may be
redelivered. If the MDB might always respond to a given message by
throwing an exception, and MaxDeliveryCnt is set to 0 to prevent the
message from ever being discarded, the result may be an MDB stuck in an
"infinite loop" - failing to process the same message over and over
again.)
-->
<config-property>
<config-property-name>MaxDeliveryCnt</config-property-name>
<config-property-value>0</config-property-value>
</config-property>
<!--
LogLevel (string, no default)
This controls the level of detail of messages logged by the JMS
Connector. These messages are primarily intended for debugging the
JMS Connector itself, but may also be useful when debugging issues
related to the use of the JMS Connector. This property should not be
set in production code. (It should only be set temporarily for
debugging purposes - specific log messages and log levels may be and
will be added/removed/modified in future versions of the JMS
Connector.) Currently the allowed values are:
ConnectionPool
ConnectionOps
TransactionalOps
ListenerThreads
INFO
CONFIG
FINE
FINER
FINEST
SEVERE
WARNING
OFF
ListenerThreadMaxIdleDuration (milliseconds, default = 300,000)
This is how long a listener thread which is not receiving any messages
will be kept around. (At least one listener thread will remain as long
as the endpoint is active.)
ListenerThreadMinBusyDuration (milliseconds, default = 10,000)
If a listener thread has just received a message, has not been idle (had to
wait for a new message to arrive) at any point during the past
ListenerThreadMinBusyDuration milliseconds, and the current number of
listener threads for this endpoint is less than ReceiverThreads, then
(application server willing) an additional listener thread will be created.
ResUser (string, default = null)
ResPassword (string, default = null)
These properties allow a user/password to be passed to the resource
provider. When neither of these properties are set, connections used for
this MDB's inbound message handling (as well as for exception queue
handling, if enabled) are created using the no-argument version of the
create*Connection method. When one or both of these properties are set,
they are passed to the create*Connection method as the user/password
arguments. (If only one property is not set, then 'null' is used for that
particular create*Connection argument.) The ResPassword property supports
the standard password indirection options (e.g., using "->joeuser" to
represent the password of "joeuser").
Note that the commas used in many of the above default values and examples are
included here for readability but can not be used in the actual activation spec.
(I.e., integer/milliseconds values in the activation spec must not include
embedded commas.)
-->
</message-driven-deployment>
</enterprise-beans>
<assembly-descriptor>
<default-method-access>
<security-role-mapping name="<default-ejb-caller-role>"
impliesAll="true"/>
</default-method-access>
</assembly-descriptor>
</orion-ejb-jar> -
Problem calling a session bean (EJB 3.0)
Hello,
I'm new to netbeans and J2EE. I'm using NetBeans 5.5 Beta 2 and sun application server 9 pe.
I created a new enterprise application and i'm trying to access a Session Bean (Remote and Stateless)
from the app-client (outside the main class).
This is the loockup method that was generated by the IDE (Enterprise Resources > Call enterprise bean):
private ejb.SessionBeanDoenteRemote lookupSessionBeanDoenteBean() {
try {
javax.naming.Context c = new javax.naming.InitialContext();
return (ejb.SessionBeanDoenteRemote) c.lookup("java:comp/env/ejb/SessionBeanDoenteBean");
catch(javax.naming.NamingException ne) {
java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);
throw new RuntimeException(ne);
When I run the application and try to invoke the lookup method my application gets the following exception:
SEVERE: exception caught
javax.naming.NameNotFoundException: No object bound to name java:comp/env/ejb/Se
ssionBeanDoenteBean
at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.
java:751)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.j
ava:156)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:307
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at intensivecare.entrada.JDialogEntrada.lookupSessionBeanDoenteBean(JDia
logEntrada.java:219)
at intensivecare.entrada.JDialogEntrada.buttonMenuGravarActionPerformed(
JDialogEntrada.java:79)
at intensivecare.JDialogWizzard$2.jButtonGravarActionPerformed(JDialogWi
zzard.java:178)
at componentes.JTaskPanelMenu$3.actionPerformed(JTaskPanelMenu.java:54)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:18
49)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2169)
Please... can someone help me?The portable way to acquire the dependency is through java:comp/env or @EJB. Accessing the
global namespace directly is not recommended. If you use an ejb-ref, you need to define it
in the component environment within which you'll be looking up the dependency. So if you're
looking it up from an Application Client, you'll need to define the ejb-ref in application-client.xml.
Also, the ejb-ref-name is the portion of the string after java:comp/env. There is no automatic
"ejb" appended to it. If you do ic.lookup("java:comp/env/foo"), your ejb-ref-name would be "foo".
You can use @EJB but it can only be defined in certain managed classes such as the
Application Client main class.
You can find additional info in our EJB FAQ :
https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
--ken -
Error while calling PI webservice from EJB
Hi Experts,
We are getting exception while calling PI webservice from EJB which is deployed in CE 7.2. Earlier we used to call the same webservice but from different PI system at that it worked fine. Now we have changed the consumer proxies required in CE and tried to call from CE and it is throwing error. We have checked usernames and passwords that we are using to call the service and that is working fine. PI team tested from their side and li is also fine. We have also restarted the CE system but invain. Can somebody help on this. The below is the trace that we got.
Location: com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding
Text: Connection IO Exception. Check nested exception for details. (Connection reset).
[EXCEPTION]
com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException: Connection IO Exception. Check nested exception for details. (Connection reset).
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:419)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1364)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:990)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:944)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:168)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)
at $Proxy780.mioaRDMDataDistribution(Unknown Source)
at com.MDMEventListener.callToPIWS(MDMEventListener.java:100)
at com.MDMEventListener.ListenerMethod(MDMEventListener.java:173)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_WS.invoke(Interceptors_WS.java:31)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:39)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:23)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138)
at com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:203)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:730)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:682)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:324)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:199)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:65)
at com.sap.engine.services.webservices.servlet.SoapServlet.doPost(SoapServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:404)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:204)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:440)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:429)
at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:82)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:268)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:54)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:447)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:264)
at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.readLine(HTTPSocket.java:950)
at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getInputStream(HTTPSocket.java:414)
at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getResponseCode(HTTPSocket.java:319)
at com.sap.engine.services.webservices.espbase.client.bindings.ClientHTTPTransport.getResponseCode(ClientHTTPTransport.java:209)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:385)
... 78 more
Regards,
PradeepHi Pradeep,
this looks like if the server is not reachable. Have you checked if both server are able to communicate? Maybe firewall rules block the request.
Regards,
Tobias -
Calling stored procedure from EJB in JSever
I have some trouble to call stored procedure from EJB deployed to JServer on Oracle8i (815).
I have been able to sucessfully test the stored procedure using thin client JDBC driver. But when I user the default connection in JServer, the stored procedure never got called. Is there any restriction of EJB in JServer?
Thanks
nullThanks man! that was a great help. looks like i am almost there. i created those items t obe hidden.
now i am passing three parameters to the procedure. my url for that column value looks like this,
javascript:P65_PARTITION_ID=#PARTITION_ID#;P65_DBC=#DBC#;P65_FILE_ID=#FILE_ID#;doSubmit('Sku_Save');
the #DBC# parameter is a name of the person that has spaces(firstname lastname). i am getting a javascript error saying,
Line: 1
Char: 37
Error:Expected ';'
i see that char 37 is the space after firstname.
any idea how i should get rid of this error.
Also, as you have been very helpful, a question further beyond :). the above procedure will return a OUT varchar parameter. i guess i have to create another item for that. how do i read it and display just below my report as text.
Thanks Again! -
RE: Native Forte Clients with Express Services
I would be very interested in hearing from anyone using Express who may
have attempted using Native Forte Clients with Express Services, especially
what problems/issues (if any) you encountered and whether you found it to
be a successful way to develop complex screens where the 'look and feel'
can't be achieved with Express alone.I wrote a general-purpose windows framework which uses Express Services for its
database access. Had I known what I was letting myself in for, I probably
wouldn't have attempted it! I started it when Express V1 was fairly new, and
Express Windows did not support the types and complexity of relationships
required by the application we were developing. I soon discovered how
difficult it is to implement a completely general framework which handles every
possible permutation. Obviously I ended up making compromises, but what we
have now meets our needs very well. We are about to upgrade to Express V2, so
the real test will be whether the framework migrates smoothly to the new
release.
If I were starting a new project now with Express V2, I don't know if I would
go down the same path. If you do, be aware of the following (based on my
experience of Express V1):
* Your design MUST obey the fundamental rules of Express Services. Your
BusinessQueries must be fired off by the correct BusinessClient subclass,
your BusinessClass attributes must be logged at the right time (depending
on which concurrency scheme you are using), and you must start and end
Express transactions (different to Forte transactions) appropriately.
* Your design needs to take into account the difference in the way Express
Services handles aggregate and non-aggregate associations.
* If you manage parent-child class relationships from your windows, you must
make sure you set and log foreign key attributes at the right time. If
the relationship is not aggregation, you must also manage the order in
which the records are saved to the database (if you use referential
integrity constraints).
* If you call Express Services directly from the windows, it is hard to
reconcile the asynchronous nature of a windows interface with the
database's requirement for things to happen in a certain order. (From
memory, there was a very good discussion in this user group last year of
what should constitute a unit of work in the windows paradigm.) If I
were doing it again, I would move all the Express-related objects and
method calls from the windows to a separate layer, which would manage
putting together the data from multiple windows, assigning foreign keys
and firing things off in the right order.
Fiona Symon
Babylon Software Pty LtdHello Kevin,
Normally, it has been corrected from the last public release 2.
Hope this helps.
Daniel Nguyen
Kevin Klein wrote:
>
We had a similar problem. We reported the problem to Forte technical
support and they determined that it is a bug. I don't know if this has been
fixed in the 3.0.F release.
The Stopwatch seems to be accurate for long (several second) intervals, but
it can't be trusted for measuring short intervals.
Kevin Klein
Millennium Partners, Inc.
-----Original Message-----
From: [email protected] <[email protected]>
To: [email protected] <[email protected]>
Date: Tuesday, December 30, 1997 1:40 PM
Subject: The Forte Stopwatch
All,
At our site we are using Windows NT 4.0 clients and a Windows NT
Server with Forte 3.0.E.0.
Periodically, we use the Forte StopWatch class to measure durations for
access to data. We've noticed
a strange phenomenon, and we're not sure if it's simply circumstance or if
there's a problem. All of the
measured durations that we receive through the Split method appear to
contain either a 0 or a 9 in the
tenth-of-a-second position. For example, values of 1011 and 1912. Has
anybody noticed this?
Thank you,
Keith
Name: Kevin Klein.vcf
Part 1.2 Type: text/x-vcard
Encoding: 7bit -
Automatic logout of Forte clients
We would like to be able to detect if a user has not done anything for a
period of time - so that we can do automatic logouts after x minutes of
inactivity. Detecting inactivity sounds like the sort of job an agent
would do. Has anyone tried anything like this, or got any suggestions as
to how else we might do it - on a Forte client?
Thanks,
Graham JenkinsHi,
I would use BAT for that:
1. Create the services and the service profile, enable one user for IM&Presence using the service profile
2. Export all users using BAT in CUCM (Bulk Administration->users->Export Users, run immediately, then change to Bulk Administration->Job Scheduler, when your job is completed you can download the export file using Bulk Administration->Upload/Download Files)
3. Change the file extension from txt to csv and edit the file with your favorite CSV editor, so you enable all users for IM&Presence and add the service profile
4. Upload the file again with the last step in 2.
5. Use Bulk Administration->Users->update Users->custom file to update the user information.
Best regards,
Thomas. -
How to Hold the client ip from the client calls made to the ejbweb servic?
Hi
I am working on Ejb3 web services.I want to hold the client ip from the client calls made to the web service.I deployed this service in jboss AS 4.2.1
In the service implementation i started using
@Resource
SessionContext sessionCtx;
My idea is to get the MessageContext from this SessionContext and finally to get the HttpServletRequest.
I got the sessionCtx(BaseSessionContext) object.When i am trying to access the MessageContect using the below syntax
System.out.println(sessionCtx.getMessageContext());
I got ---ERROR [SOAPFaultHelperJAXWS] SOAP request exception
javax.ejb.EJBException: java.lang.IllegalStateException: No message context found
Please provide me with correct solution to this problem.Please also suggest if there is any alternate approach to get the client ip in the service implementation.
Thanks
AdinarayanaHi,
Assuming that you are using Form 6i or greater, one way to do is to embedd a java bean in the form, this bean would get you the ip address and in the form you can get_custom_property( ) to get the value from the bean to the oracle form.
There is one demo example in OTN site to get the ClientIP address, check out if that helps you.
Regards,
Dinesh -
How to call Custom RFC enabled Function Module in R/3 From XI
Hi Experts,
I want to call custom RFC enabled Function Module by sending some input parameters from XI.
How to do this
Thnx
RAMSHi RAMS,
1. Under the SWCV Go to the Imported Objects.
2. Right click on the RFC and click on the Import of SAP object.
3. Give the logon server name, system number the user name and pasword.
4. Select the RFC u want to import.
5. Execute the import and the RFC is imported under the SWCV.
Now u can use this Imported RFC in the scenarios of that SWCV.
Regards
Santhosh
Remember to set the thread to solved when you have received a solution -
Cisco Trust Agent - Any way to force the client to always be enabled?
We have begun to roll out dot1x configuration on our fleet of switches to support a basic authentication and posture check for our NAC Framework deployment. Previous to this, we spent a couple of months deploying the Trust Agent. In the time between deploying the client, and turning dot1x on the switch ports, some users have un-checked the "Enable Client" option available to them in the system tray icon, and the Wired Client. Obviously when dot1x is applied to the port, the supplicant forwards the authentication request to the client, and waits forever for a response, leaving users trying to login waiting for 20 - 30 mins for the login process to complete. My question is thus, is there any way (registry setting, config file setting) to force the client to always be enabled?
Thanks,
MichaelZ-index Guide:
http://www.smashingmagazine.com/2009/09/15/the-z-index-css-property-a-comprehensive-look/
Nancy O. -
How to call a BAPI in EJB application
Hi ,
I need to develop an webservice that takes data from a BAPI and insert in to ORACLE database. I think webservices can be created through EJB application.
I am not having idea regarding how to call an BAPI in EJB application. can anyone help me out in this.
Regards,
Laxmi.Hi,
you can use JCO Connection,
look this
[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/fcadaf90-0201-0010-4091-bd0bcd7b7f6a]
Regards,
Matteo -
Trying SAML sender-vouches, standalone Java client call to service bus.
I've built a standalone Java client using Jax-ws. It produces a wsse header containing both a SAMLAttribute and an optional SAMLAuthentication statement.
I've tried to configure a proxy service on the servicebus (10gR3) using ws-policy (weblogic version, not ws-1.2), configured a SAMLIdentityAsserter (v2), an identity provider partner and a SAMLIdentityNameMapper.
I get the message weblogic.xml.crypto.wss.SecurityTokenValidateResult@ca32f2[status: false][msg The SAML token is not valid.]
when sending SAML assertions which looks valid to me.
If you see something missing or invalid in the SAML, something missing in the configuration or something else, I would be really glad.
All examples are using a SAMLCredentialmapper, but I'm building a standalone client, so a weblogic SAMLCredentialMapper is out of the question (?).
request header:
<S:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" S:mustUnderstand="1">
<saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:exc14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:xs="http://www.w3.org/2001/XMLSchema" AssertionID="1246342701761" IssueInstant="2009-06-30T06:18:21.683Z" Issuer="http://openuri.org/service/customer/contact/contactInformationService" MajorVersion="1" MinorVersion="1">
<saml:Conditions NotBefore="2009-06-30T06:17:21.683Z" NotOnOrAfter="2009-06-30T07:18:21.683Z"/>
<saml:AuthenticationStatement AuthenticationInstant="2009-06-30T06:18:21.683Z" AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:unspecified">
<saml:Subject>
<saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName" NameQualifier="sb1sk">uid=vsb,ou=smn</saml:NameIdentifier>
<saml:SubjectConfirmation>
<saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:sender-vouches</saml:ConfirmationMethod>
</saml:SubjectConfirmation>
</saml:Subject>
</saml:AuthenticationStatement>
</saml:Assertion>
</wsse:Security>
response:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<env:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<faultcode>wsse:InvalidSecurityToken</faultcode>
<faultstring>Security token failed to validate. weblogic.xml.crypto.wss.SecurityTokenValidateResult@1061c5e[status: false][msg The SAML token is not valid.]</faultstring>
</env:Fault>
</env:Body>
</env:Envelope>
If the client leaves out the wsse:security element in the header, the service complains
<faultstring>No Security header in message but required by policy.</faultstring>
The SAMLIdentity name mapper is never loaded at all (checked by logging at class loading)
The configuration in the Identity provider partner:
audience uri: target:*:/
issuer uri: /service/customer/contact/contactInformationService (also tried with a unique string equal to what the client sends)
virtual user: enabled
confirmation method: sender-vouches
I am not using any certificates (tryed both with and without)
Policy in use for the proxy service:
<?xml version="1.0"?>
<wsp:Policy
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wssp="http://www.bea.com/wls90/security/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wls="http://www.bea.com/wls90/security/policy/wsee#part"
wsu:Id="samlSV"
>
<wssp:Identity>
<wssp:SupportedTokens>
<wssp:SecurityToken TokenType="http://docs.oasis-open.org/wss/2004/01/oasis-2004-01-saml-token-profile-1.0#SAMLAssertionID">
<wssp:Claims>
<wssp:ConfirmationMethod>sender-vouches</wssp:ConfirmationMethod>
</wssp:Claims>
</wssp:SecurityToken>
</wssp:SupportedTokens>
</wssp:Identity>
</wsp:Policy>
Stacktrace:
weblogic.xml.crypto.wss.WSSecurityException: Security token failed to validate. weblogic.xml.crypto.wss.SecurityTokenVal
idateResult@a4fc20[status: false][msg The SAML token is not valid.]
at weblogic.xml.crypto.wss.SecurityImpl.unmarshalAndProcessSecurityToken(SecurityImpl.java:630)
at weblogic.xml.crypto.wss.SecurityImpl.unmarshalChildren(SecurityImpl.java:556)
at weblogic.xml.crypto.wss.SecurityImpl.unmarshalInternal(SecurityImpl.java:448)
at weblogic.xml.crypto.wss.SecurityImpl.unmarshal(SecurityImpl.java:416)
at weblogic.xml.crypto.wss.api.WSSecurityFactory.unmarshalAndProcessSecurity(WSSecurityFactory.java:66)
at weblogic.wsee.security.WssServerHandler.processRequest(WssServerHandler.java:35)
at weblogic.wsee.security.WssHandler.handleRequest(WssHandler.java:74)
at com.bea.wli.sb.security.wss.WssInboundHandler.processRequest(WssInboundHandler.java:116)
at com.bea.wli.sb.security.wss.WssHandlerImpl.doInboundRequest(WssHandlerImpl.java:201)
at com.bea.wli.sb.context.BindingLayerImpl.addRequest(BindingLayerImpl.java:257)
at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:66)
at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:508)
at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:506)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
Edited by: user6080617 on Jun 29, 2009 11:39 PMThank you for the tip. I've tried it, the result is below. It suspect something missing in my configuration, but I do not know what.
<WSEE:17>Class of cred is: class weblogic.xml.saaj.SOAPElementImpl<SAMLCredentialImpl.<init>:85>
<WSEE:17>Instantiating SAMLAssertionInfoFactory<SAMLCredentialImpl.<init>:87>
<WSEE:17>Getting SAMLAssertionInfo from DOM Element<SAMLCredentialImpl.<init>:97>
<WSEE:17>Got SAMLAssertionInfo<SAMLCredentialImpl.<init>:117>
<WSEE:17>Assertion ID: 1246358297862<SAMLCredentialImpl.verbose:69>
<WSEE:17>Assertion CM: urn:oasis:names:tc:SAML:1.0:cm:sender-vouches<SAMLCredentialImpl.verbose:70>
<WSEE:17>Assertion Subject: uid=vsb,ou=smn<SAMLCredentialImpl.verbose:71>
<WSEE:17>Assertion Version: 1.1<SAMLCredentialImpl.verbose:72>
<WSEE:17>Attempting assertIdentity<CSSUtils.assertIdentity:310>
<WSEE:17>SAML_TARGET_RESOURCE is: /service/customer/contact/contactInformationService<CSSUtils.assertIdentity:312>
<WSEE:17>Got Principal Authenticator<CSSUtils.assertIdentity:314>
<WSEE:17>Cred type is: SAML.Assertion.DOM, Node: [saml:Assertion: null]<CSSUtils.assertIdentity:320>
<WSEE:17>Exception while asserting identity: javax.security.auth.login.LoginException: [Security:090377]Identity Assertion Failed, weblogic.security.spi.IdentityAssertionException: [Security:090380]Identity Assertion Failed, Unsupported Token Type: SAML.Assertion.DOM<CSSUtils.assertIdentity:325>
<WSEE:17>javax.security.auth.login.LoginException: [Security:090377]Identity Assertion Failed, weblogic.security.spi.IdentityAssertionException: [Security:090380]Identity Assertion Failed, Unsupported Token Type: SAML.Assertion.DOM<CSSUtils.assertIdentity:326> -
Is it allowed to make a rmi call from within an ejb??
Hello,
Am I allowed to make a rmi call from within an ejb such as:
String host = "localhost";
RemoteObject ro = (RemoteObject) Naming.lookup("rmi://"+host+"/MonServeur");
ro.myMethod();
package pack;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
public class MyRemoteObject extends UnicastRemoteObject implements RemoteObject {
public MyRemoteObject() throws RemoteException {
public void myMethod() throws RemoteException {
System.out.println("toto");
public static void main(String[] args) {
try {
RemoteObject ro = new MyRemoteObject();
Naming.rebind("MonServeur", ro);
} catch (Exception ex) {
ex.printStackTrace();
}Is it allowed by the spec?
Is it good design?
Thanks in advance,
Julien Martin.Allowed - yes
Good design - no, in my opinion.
Maybe you are looking for
-
I open Text Edit and 5 pages that were open last time appear. I don't want them. I open Photoshop, and all the photos I had open last time open. And when I shut down, I have to deselect the Reopen windows... or the computer starts back up with all th
-
Where can we find the methods of the classes in OLE Interface
Hi All, I am developing the code to download the file into multiple sheets of excel file. got many links and sample codes from this forum. but my doubt is where can we find the methods in applications. Example: add, cells, range etc are the methods i
-
How do I know what my Microsoft Exchange server (incoming) is?
I don't know where to check for this info (other than the IT guy), if anyone knows where I can find this online? Much appreciated.
-
Can you add a word or name to the spell checker in pages for iPad?
I'm looking for a way to add a word, alternate spelling or proper name to the spell checker for the newest version of pages for iPad so they won't keep showing up as "misspelled". Can you help?
-
Copying album name to metadata
Hi everybody, Is there any option to copy the album name of the photos in PSE 10 to the caption field or to any other metadata filed? I want to to it because the subject of all my photos is written in the album name, and I want it to be written on th