Sending JMS messages as web services

I am trying to read a JMS topic, retrieve an XMLBean from the queue, and send it
via web services developed in Workshop. Everything seems to deploy fine, but
when I post a message to the topic, it just disapears. No logging, no movement
to the specified error queue, and println doesn't print. How do I do this?

Hi Neil,
Have you gone through the tutorial "how to" [1] on this subject? There
is a basic JMS/webservice example [2], outside of WLW, that may be
useful in validating your JMS/server configuration. Also, be sure to
check the server log file for warning/error messages.
Hope this is of some value,
Bruce
[1]
http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/howdoi/howExchangeMessageswithaJMSQueueorTopicfromaWebService.html
[2]
http://webservice.bea.com/message.zip
Neil Hornbeck wrote:
>
I am trying to read a JMS topic, retrieve an XMLBean from the queue, and send it
via web services developed in Workshop. Everything seems to deploy fine, but
when I post a message to the topic, it just disapears. No logging, no movement
to the specified error queue, and println doesn't print. How do I do this?

Similar Messages

  • Send Multipart message in web service

    Hi All,
    I have configured IDoc-SOAP-File scenario successfully.
    Now My sender and receiver structure is changed.
    I mean in my Idoc i cn have node repeated number of times and so i have changed my occurace at wsdl file also, so tht for all web service will be call only once and response will also have 1-unbound occurance.
    When i run sceanrio...i m able to send Idoc with multiple node in it and request is futher sent to web service.
    But in response i m gettin response only for first one as web service is just sending/accepting (?) data for 1st occurance of node.
    Please guide me for same tht how i can send multiline data to web service and accept multiline responce.
    Regards,
    Manisha

    Check this note: https://service.sap.com/sap/support/notes/856597
    Q: My web service expects a SOAP with multiple elements in the SOAP body. How can I create such SOAP message?
    Check if you have done the setting as mentioned in the answer.
    Regards,
    Abhishek.

  • Obtaining the WSDL and sending a message (like Web Services)

    Hi All,
    Is it possible to use a service interface defined in XI as any other web service? Consider the following scenario.
    1. Create an async service interface (outbound) in XI (This has a message mapping and the message goes to some inbound interface). 
    2. Can we write an external application (a Java swing client or something) which can send a message to this service interface?
    3. While writing a normal web services client we specify the url of the WSDL and then send a SOAP message using some APIs.
    4. Can this be achieved in XI? If so could you provide me some links or blogs etc to have some idea about this. Also how do we specify the URL of the interface.
    5. I have seen a similar application (an HTML file) which takes the XML payload (conforming to the message type of the interface) and sends the message to the interface. In this case the URL is formed from sender namespace, server name, port etc. The name of this HTML is XIHttp_adapter.html.
    6. Can somebody give me more inputs in this direction?
    Many Thanks,
    Sandeep

    Hi Sandeep,
    The Info below should surely help you find an answer.
    If you're on WAS 6.20 and up, you can expose an RFC as a webservice directly from WAS.
    Or if you’re on Basis layer 4.6D, you'll need to use XI (or some other integration tool) to expose the RFC as a webservice.
    To do this in XI you'll need to:
    Integration Repository
    1) Import the RFC
    2) Define a message and datatype for the SOAP interface
    3) Create inbound and outbound interfaces
    4) Create maps between the RFC and SOAP messages
    5) Create an interface map
    Integration Directory
    1) Create an RFC Receiver Channel
    2) Create a SOAP Sender Channel
    3) Generate the WSDL (Tools->Define Web Service)
    You can then handoff the WSDL and a login username and password to your developer and they will have everything they need to make the WS call.
    Here are answers to a few doubts u might have:
    1) Do I need to actually create a WS that calls the RFC ? Isn’t the virtual interface exposed by the XI sufficient?
    Yes, you need to create a WS in XI that calls the RFC.
    2) If I really have to create the WS and deploy it in order to expose it with the XI, then what is my benefit of exposing it with the XI, why not just exposing it as a normal WS ?
    You don't have WAS 6.20 or up. Even if you did, you may still want to expose it using XI in order to have all of your integration go through the same application.
    3) If I expose my web service through the XI, how does the client application executes one of its methods? To which url does it have to access (the XI or the actual WS)?
    You expose a SOAP interface in XI by generating a WSDL file. This file contains all of the information a developer will need to call the webservice including the URL.
    You actually specify the URL when you generate the WSDL. Be sure to read the documentation to get the correct format because the URL that the wizard suggests isn't correct.
    Also check this Pdf for the Receiever SOAP Adapter configuration:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/40728f7b-0401-0010-d9bc-8c73884a3789
    Also the target URL must be the URL to the WSDL. So, if you try putting it in your browser you must see the wsdl code.Please do ensure the same.....
    I hope this helps.
    Regards,
    Abhy

  • Problem sending jms message from Web page button (JSF 1.2)

    SJSAS PE 9.0 running on Windows
    Some of the code
    //imports:
    import javax.jms.ConnectionFactory;
    import javax.jms.Queue;
    import javax.jms.Session;
    import javax.jms.JMSException;
    import javax.annotation.Resource;
    //Injection
    @Resource(mappedName = "jms/ConnectionFactory")
    private ConnectionFactory connectionFactory;
    @Resource(mappedName = "jms/Queue")
    private Queue queue;
    //Button action code
    System.out.println("Trying to send message to EJB");
    javax.jms.Session jmssession = null;
    javax.jms.Connection connection = null;
    javax.jms.MessageProducer messageProducer = null;
    javax.jms.TextMessage message = null;
    final int NUM_MSGS = 1;
    try {           
    // This line is failing, java.lang.NullPointerException
    connection = connectionFactory.createConnection();
    jmssession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    messageProducer = jmssession.createProducer(queue);
    message = jmssession.createTextMessage();
    for (int i = 0; i < NUM_MSGS; i++) {
    message.setText("PV interface jobid " + (i + 1));
    message.setBooleanProperty("Gyldig", true); // Sample on how to use properties; can be used to collect necessary information
    System.out.println("Sending message: " + message.getText());
    messageProducer.send(message);
    } catch (JMSException e) {
    System.out.println("Exception occurred: " + e.toString());
    } finally {
    if (connection != null) {
    try {
    connection.close();
    } catch (JMSException e) {
    } // if
    } // finally
    ERROR MESSAGE
    Log Entry Detail
    Details
    Timestamp:
    May 8, 2007 15:24:26.608
    Log Level:
    SEVERE
    Logger:
    javax.enterprise.resource.webcontainer.jsf.application
    Name-Value Pairs:
    ThreadID=12;ThreadName=httpWorkerThread-8080-1;_RequestID=832ea681-575f-4126-9bcf-01dcdf010044;
    Record Number:
    2513
    Message ID:
    java.lang.NullPointerException javax.faces.el.EvaluationException
    Complete Message
    java.lang.NullPointerException
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:97)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:96)
         at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
         at javax.faces.component.UICommand.broadcast(UICommand.java:383)
         at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:160)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:450)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:759)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: java.lang.NullPointerException
         at com.company.testinterfaceportal.JmsSending.<init>(JmsSending.java:37)
         at com.company.testinterfaceportal.MainApplicationBean.SendBeskjedNaa(MainApplicationBean.java:192)
         at com.company.testinterfaceportal.Status.button1_action(Status.java:709)
         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.sun.el.parser.AstValue.invoke(AstValue.java:151)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
         ... 34 more

    I know the code for the jms-sending is OK (I've
    tested in another application, copy of code), but i
    dont know why it isn't working in this particual
    Visual Web Project. It does seem like the injection
    isn't taking place here; and i have no clue to
    why.....where does your web.xml schema location points to ?
    Injection works only with JEE 5, which means that you have to point to the right version of the servlet spec, i.e version="2.5" and web-app_2_5.xsd.

  • Message driven bean and message style web service

    Hi,
    I'm trying to deploy a message style web service with a message driven EJB as
    the receiver and am getting the following exception:
    <Jan 22, 2002 10:51:06 AM PST> <Warning> <EJB> <MessageDrivenBean threw an Exception
    in onMessage(). The exception was:
    java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
    java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
    at credit.message.PostDefaultPayment.onMessage(PostDefaultPayment.java:24)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:254)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    public void onMessage(Message message) {
    System.out.println("onMessage");
    TextMessage textmessage = (TextMessage)message. // It is throwing
    the exception on this line --looks pretty normal
    Has anyone seen this before? Am I missing something?
    Thanks,
    Tim

    Hi Tim,
    I think the problem is that you are assuming that the data type, of the message
    argument to the onMessage(Message message) method in your MDB, is of type TextMessage.
    I agree that this seems logical, especially since you passed "a string" to the
    Message-style Web Service. However, this is not the case, because the WSDL uses
    the "xsd:anyType" as the data type for any argument you pass to the send() method
    ;-) This maps to a java.lang.Object in the WebLogic Web Services implementation,
    which is why you get the casting error. Try this instead:
    public void onMessage(Message msg)
         try
              String msgText;
              ObjectMessage objMessage = (ObjectMessage)msg;
              msgText = (String)objMessage.getObject();
    System.out.println("[PostDefaultPayment.onMessage(Message)] msgText=" + msgText);
    System.out.println("[PostDefaultPayment.onMessage(Message)] msg.getJMSType()="
    + msg.getJMSType());
    System.out.println("[PostDefaultPayment.onMessage(Message)] msg.getJMSCorrelationID()="
    + msg.getJMSCorrelationID());
    System.out.println("[PostDefaultPayment.onMessage(Message)] msg.getJMSMessageID()="
    + msg.getJMSMessageID());
         catch(Exception e)
    e.printStackTrace();
    Regards,
    Mike Wooten
    "Tim Uy" <[email protected]> wrote:
    >
    Hi,
    I'm trying to deploy a message style web service with a message driven
    EJB as
    the receiver and am getting the following exception:
    <Jan 22, 2002 10:51:06 AM PST> <Warning> <EJB> <MessageDrivenBean threw
    an Exception
    in onMessage(). The exception was:
    java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
    java.lang.ClassCastException: weblogic.jms.common.ObjectMessageImpl
    at credit.message.PostDefaultPayment.onMessage(PostDefaultPayment.java:24)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:254)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    public void onMessage(Message message) {
    System.out.println("onMessage");
    TextMessage textmessage = (TextMessage)message. // It
    is throwing
    the exception on this line --looks pretty normal
    Has anyone seen this before? Am I missing something?
    Thanks,
    Tim

  • 'Payload not Serializable' with custom WSDL data types in message-style web service

    I'm implementing a message-style web service which publishes to a JMS Queue.
    I had the web service built and deployed, but noticed that the "sendRequest" message's
    part was of type "xsd:anyType." This is not specific enough for our interface,
    since it is externally facing and needs to describe the object we're expecting
    on the back end.
    So I replaced xsd:anyType with mynamespace:MyType, which is defined as a complex
    type in the same WSDL document.
    My problem is that when I test the web service with the new WSDL (using the client.jar),
    I get a server-side exception from the DestinationSendAdapter.doPost() method.
    The exception reads:
    javax.servlet.ServletException: Payload not Serializable
    at weblogic.soap.server.servlet.DestinationSendAdapter.doPost(DestinationSendAdapter.java:129)
    The domain object ('classic' JavaBean) that it should map to on the server side
    extends a class that implements Serializable, so it should inherit the trait.
    So my questions are:
    1) Did I properly go about trying to restrict the object type that gets sent to
    my Destination?
    2) If no, what is the correct way? If yes, why am I receiving the Payload not
    Serializable error if the domain object implements Serializable?
    Thanks in advance.

    Resolved:
    Apparently this is the right approach, as it boiled down to a classpath issue
    on the client-side. Thanks anyway.

  • How to send JMS Message from a BPM Process

    Hi All
    I have small query regarding sending JMS Message from a bpm process. Is it possible to send JMS message from one bpm process to another bpm process.
    I have a scenario in which I need to send a JMS message to a queue where another process is listening on that queue and as soon as the message is received on the queue the process instance is created.
    I know how to listen for the JMS message on the queue, but I don't how to send a JMS message from a process.
    Also Can I create process by sending the Notification to the process instead of a JMS message. But the process to be created is not a subprocess i.e. Can notification be send accross different processes.
    Any information or example in this regard would be helpful.
    Thanks in advance
    Edited by: user9945154 on Apr 22, 2009 7:46 PM

    Hi,
    Here's one approach to sending JMS messages from an Oracle BPM process. If you're doing this just to send a message into another process, do not take this approach. It's far easier and quicker if you do this using the OOTB "send notification" logic.
    These steps describe how to do this using WebLogic. The steps would be different if you're using another ap server / JMS provider.
    1. Guessing you've already done this, but first expose the two required WebLogic jar files for JMS messaging as Java components in the External Resources. The two files for WebLogic are weblogic.jar and wljmsclient.jar” (located in the < WebLogic home directory > /weblogic/server/lib” directory).
    AquaLogic BPM JMS Queue Listener for WebLogic 8.1
    2. You've probably already done this, but add an External Resource to represent the J2EE container:
    • Name: “weblogicJ2EE” - this is important and will be used in the next step
    • Supported Type: “GENERIC_J2EE”
    • Initial Context Factory: “weblogic.jndi.WLInitialContextFactory”
    • URL: “t3://localhost:7001”
    • Principal: and Credentials: whatever userid and password you defined to access theWebLogic administrative console.
    3. Create the External Resource that represents the send queue configuration. In this example, I'm calling it “WebLogic Send Queue”. This is important - remember what you named it because you will use this name in the logic that sends the JMS message. This new External Resource is configured as:
    • J2EE: “weblogicJ2EE” (same name as the second External Resource you created)
    • Destination Type: “QUEUE”
    • Lookup Name: “weblogic.examples.jms.exampleQueue”
    • Connection Factory Lookup Name: “weblogic.examples.jms.QueueConnectionFactory”
    4. Here's the logic to send a Message to the Queue
    <pre class="jive-pre"><p />msg as String = "Hello World"
    jmsMsg as Fuego.Msg.JmsMessage
    msg = "<?xml version=\"1.0\"?><Msg>" + msg + "</Msg></xml>"
    jmsMsg = JmsMessage(type : JmsMessageType.TEXT)
    jmsMsg.textValue = msg
    sendMessage DynamicJMS
    using configuration = "WebLogic Send Queue",
    message = jmsMsg</pre>
    Note that the “sendMessage” method uses the configuration parameter “WebLogic Send Queue”. You previously created a JMS messaging service External Resource with this name in the third step.
    Again, please don't go this route if you're just using it to send notifications between processes,
    Dan

  • BusinessService which sends JMS messages to a JBoss 4.2.x server

    Hi,
    how do I configure my OSB so that I can send JMS messages to a JBoss server? I have added a Foreign JMS server with the appropriate initial context data and have put the jboss relevant jars into my <domain>/lib directory (javassist.jar, jbossall-client.jar, jboss-aop-jdk50.jar, jboss-messaging-client.jar, trove.jar) but I still get an error in the proxy service when it forwards the message to the business service referencing the imported JMS queues and connectionFactory. The message is:
    <18.02.2010 18:00 Uhr MEZ> <Warning> <ALSB Logging> <BEA-000000> < [RouteToJboss, _onErrorHandler-1181696354513531347--39bf6a8e.126dc62f38e.-7e57, Log error, ERROR] Error occurred in flow: BEA-380002[JMSPool:169803]JNDI lookup of the JMS connection factory jboss.connectionFactory failed: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]RouteToJbossrequest-pipeline>
    Am I missing something?
    Best regards,
    Dimo
    PS. I also had to put a newer log4j version in the preclasspath because jboss client seems to require verisons >= 1.2.12 and the one shipped with OSB does not cut it

    There is a difference between supported and certified.
    ADF was certified (meaning tested) with JBoss 4.0.4.
    We didn't test with JBoss 4.2 so we don't know if it works or not.
    However it is supported - meaning that if you try to deploy to 4.2 and run into issues you can open bugs with Oracle support.

  • Using message-style web service by a Microsoft client

    Does anyone have a sample Microsoft client using message-style web service? BEA
    does not provide one. I found MS client does not receive messages published between
    2 calls to method "receive", while the sample Java client ConsumerClient.java
    does.
    ConsumerClient.java is like:
    while(true){
    Object result = method.invoke(null);
    sleep(20000); // not in sample, added for my test
    System.out.println(result);
    My VBScript code is like:
    Set SC = CreateObject("MSSOAP.SoapClient")
    SC.mssoapinit "http://localhost:7001/msg/Receiver/Receiver.wsdl", "", "", ""
    While TRUE
    Res = SC.receive
    WScript.echo "Res = " & Res     
    Res = ""
    ' do something that takes 20 seconds
    Wend
    I added 20 seconds between calls so I can publish a message between 2 calls. I
    found the Java client receives the message but the VBScript client doesn't. Has
    anyone else observed this?

    Hi Kevin,
    Thanks for your feedback.
    Header support is planed for the next major release.
    regards,
    -manoj
    Kevin Jiang wrote:
    Hi Manoj,
    Can you use SOAP header to pass session id accross instead of HTTP header? MS
    SOAP toolkit 2.0 support access to SOAP header.
    My app needs to use topic instead of queue. But as I said earlier, I can use MS
    XML toolkit to access HTTP header. So I have a work around.
    Thanks for all your responses with regard to this question!
    Kevin
    manoj cheenath <[email protected]> wrote:
    Hum! i thought you were not able to receive message at all. now
    i understood the problem. yes we are using http header to pass
    session id accross, in the case of web service client who wants
    to subscribe to JMS topics. I cant think of any other way to do
    this. if you have any suggestions, i very much like to hear it.
    for your application is it possible to use queues instead of topics?
    we do not use http session information in the case of JMS queues.
    -manoj
    Kevin Jiang wrote:
    Hi Manoj,
    Your sample code is basically same as mine. It would also lose messagespublished
    between calls to "receive" method.
    I figured out what's going on. Undocumented by BEA, the web servicesends JMS
    session ID in HTTP header along with first message. When client makessubsequent
    calls to "receive", this ID must be sent back. I found this by usinga SOAP trace
    tool.
    Unfortunately, MS SOAP toolkit doesn't support access to HTTP header.So one has
    to use MS XML toolkit to use message-style web service, when writingMS clients.
    manoj cheenath <[email protected]> wrote:
    an example of using message style web services with
    ms soap toolkit is attached. let me know if this works
    for you.
    regards,
    -manoj
    Kevin Jiang wrote:
    Hi Manoj,
    I just changed anyType to string and the problem still happens.
    Thanks,
    Kevin
    manoj cheenath <[email protected]> wrote:
    I have not tryed message style web services with MS soap toolkit.
    I think the problem is because the WSDL for the message style
    web service use xsd:anyType as the return type and MS soap is
    not able to understand it. can you pls modify the xsd:anyType to
    xsd:string (or someother base type) in the WSDL.
    SC.mssoapinit can load wsdl stored as a local file. so it should
    be easy to make this change.
    regards,
    -manoj
    Kevin Jiang wrote:
    Does anyone have a sample Microsoft client using message-style
    web
    service? BEA
    does not provide one. I found MS client does not receive messages
    published
    between
    2 calls to method "receive", while the sample Java client ConsumerClient.java
    does.
    ConsumerClient.java is like:
    while(true){
    Object result = method.invoke(null);
    sleep(20000); // not in sample, added for my test
    System.out.println(result);
    My VBScript code is like:
    Set SC = CreateObject("MSSOAP.SoapClient")
    SC.mssoapinit "http://localhost:7001/msg/Receiver/Receiver.wsdl",
    While TRUE
    Res = SC.receive
    WScript.echo "Res = " & Res
    Res = ""
    ' do something that takes 20 seconds
    Wend
    I added 20 seconds between calls so I can publish a message between2 calls. I
    found the Java client receives the message but the VBScript clientdoesn't. Has
    anyone else observed this?

  • Problem in sending JMS message on remote OC4J

    I have two OC4J standalone (10.1.3.0.0 build 041119.0001.2385)
    The containers work on Windows2000 in different machines connected by the LAN.
    The First container has deployed application from example http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-jca-intro/doc/how-to-jca-intro.html
    The second container has j2ee application (Servlet) that sending JMS messages in the queue of the first container.
    Code Servlet in second OC4J:
    package mypackage2;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    import javax.jms. *;
    import javax.naming. *;
    import java.util. *;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html;charset=windows-1251";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    String QUEUE_NAME = "OracleASjms/MyQueue1";
    String QUEUE_CONNECTION_FACTORY = "OracleASjms/MyQCF";
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    try
    Hashtable env = new Hashtable ();
    env.put (Context. INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put (Context. PROVIDER_URL, "ormi://host_OC4J_1:23791/jcamdb");
    env.put ("dedicated.rmicontext", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ic.lookup (QUEUE_CONNECTION_FACTORY);
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    QueueSession queueSession =
    connection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (QUEUE_NAME);
    ic.close ();
    System.out.println (" Queue: " + queue);
    QueueSender sender = queueSession.createSender (queue);
    System.out.println (" creating Message: " + queue);
    Message message = queueSession.createMessage ();
    System.out.println (" Message created ");
    message.setJMSType ("theMessage");
    message.setLongProperty ("time", System.currentTimeMillis ());
    message.setStringProperty ("id", "11111");
    message.setStringProperty ("oamount", "55555");
    message.setStringProperty ("message", "77777");
    message.setStringProperty ("RECIPIENT", "MDB");
    System.out.println (" Sending message... ");
    sender.send (message);
    System.out.println (" Message sent ");
    sender.close ();
    queueSession.close ();
    connection.close ();
    catch (Exception e)
    System.out.println (" ** TEST FAILED ** < br > Exception: " + e);
    out.println (e.toString ());
    e.printStackTrace ();
    out.println (" < p > The servlet has received a GET. This is the reply. < /p
    ");out.println (" < /body > < /html > ");
    out.close ();
    Error: This code send message in The First container, and should send in the second OC4J !!!!
    Please answer :
    As configure (what code it is necessary to write) servlet (any J2EE the application in OC4J) to use a path to OC4J JMS (remote OC4J JMS) through the Resource Adapter (using OracleASjms.rar). ???

    I have two OC4J standalone (10.1.3.0.0 build 041119.0001.2385)
    The containers work on Windows2000 in different machines connected by the LAN.
    The First container has deployed application from example http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-jca-intro/doc/how-to-jca-intro.html
    The second container has j2ee application (Servlet) that sending JMS messages in the queue of the first container.
    Code Servlet in second OC4J:
    package mypackage2;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    import javax.jms. *;
    import javax.naming. *;
    import java.util. *;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html;charset=windows-1251";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    String QUEUE_NAME = "OracleASjms/MyQueue1";
    String QUEUE_CONNECTION_FACTORY = "OracleASjms/MyQCF";
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    try
    Hashtable env = new Hashtable ();
    env.put (Context. INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put (Context. PROVIDER_URL, "ormi://host_OC4J_1:23791/jcamdb");
    env.put ("dedicated.rmicontext", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ic.lookup (QUEUE_CONNECTION_FACTORY);
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    QueueSession queueSession =
    connection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (QUEUE_NAME);
    ic.close ();
    System.out.println (" Queue: " + queue);
    QueueSender sender = queueSession.createSender (queue);
    System.out.println (" creating Message: " + queue);
    Message message = queueSession.createMessage ();
    System.out.println (" Message created ");
    message.setJMSType ("theMessage");
    message.setLongProperty ("time", System.currentTimeMillis ());
    message.setStringProperty ("id", "11111");
    message.setStringProperty ("oamount", "55555");
    message.setStringProperty ("message", "77777");
    message.setStringProperty ("RECIPIENT", "MDB");
    System.out.println (" Sending message... ");
    sender.send (message);
    System.out.println (" Message sent ");
    sender.close ();
    queueSession.close ();
    connection.close ();
    catch (Exception e)
    System.out.println (" ** TEST FAILED ** < br > Exception: " + e);
    out.println (e.toString ());
    e.printStackTrace ();
    out.println (" < p > The servlet has received a GET. This is the reply. < /p
    ");out.println (" < /body > < /html > ");
    out.close ();
    Error: This code send message in The First container, and should send in the second OC4J !!!!
    Please answer :
    As configure (what code it is necessary to write) servlet (any J2EE the application in OC4J) to use a path to OC4J JMS (remote OC4J JMS) through the Resource Adapter (using OracleASjms.rar). ???

  • Sending plain request to web service using receiver sender adapter and PI and expecting as attachment as response

    Hi
    In my scenario,we are sending plain request to web service using receiver sender adapter and PI will receive response as excel attachment. What are standard module required to achieve this and sequence? or checking Keep attachment box will help us to achieve this? 
    is it possible to receive excel sheet as attachment from receiver soap adapter ?
    Thanks in Advance

    Hi,
    This issue might be due to the invalid .pem certificate file.
    Make sure to include the beginning and end tags on each certificate.                   
    The result should look like this:                
    -----BEGIN CERTIFICATE-----
    (Your Primary SSL certificate: your_domain_name.crt)
    -----END CERTIFICATE-----
    -----BEGIN CERTIFICATE-----
    (Your Intermediate certificate: DigiCertCA.crt)
    -----END CERTIFICATE-----
    For more detailed information, you could refer to:
    https://www.digicert.com/ssl-support/pem-ssl-creation.htm
    Regards

  • How to send JMS message from oracle to weblogic

    Hello,
    I am facing with a problem of sending jms message from oracle to weblogic. I am using oracle 10g and weblogic server 9.1. Here is the problem. I would like to create a trigger to send JMS message to weblogic server whenever there is an update in oracle database. So I created a java class that will send a jms message to weblogic server. But in that class I use the jndi from weblogic: weblogic.jndi.WLInitialContextFactory
    when I use the loadjava utility to load that class into oracle, the status of that class is invalid though this class is working fine in eclipse with the weblogic.jar included. I was thinking because the jndi from weblogic needs the weblogic.jar in order to work, then I loaded that jar file into oracle (it took about 20 minute to load everything) and everything loaded into oracle from that jar file is invalid and missing some reference.
    So my question is: how do I send a jms message from oracle to weblogic using a java class with the right jndi?
    Any help will be appreciated.
    Thanks
    TL

    It should be quite straightforward to do this. As stated you need weblogic.jar in your classpath, then use 100% standard JMS calls to publish.
    Ensure that you set the following properties before getting your initial context:
    java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
    java.naming.provider.url=t3://node:7001 (or whatever)
    this will ensure that the correct JMS implementation classes are invoked.
    You can't easily (without some mucking around) build a test implementation in an AQ environment and then deploy to WebLogic because in AQ you don't tend to use JNDI lookups (unless you've implemented oracle JNDI etc) but rather use non standard factory class to create connections etc.

  • Message Style Web Services

    Could u please suggest me some examples for Message Style web services other than the sample example provided with weblogic

    Could u please suggest me some examples for Message Style web services other than the sample example provided with weblogic

  • Message-based web service

    We are using CF 7.01 and have been successful in consuming
    web services in the past. We are unsuccessful however in consuming
    a web service where the client says is using a message-based (aka
    document style) web service. We are entering thier system but we
    error out in our attempt to access thier web service.
    In the cfcomponent I have even tried using style="document"
    but we are still erroring out. The nature of the error message at
    our end shows:
    -- start of error message...
    Message: Could not generate stub objects for web service
    invocation.
    Detail: Name:
    https://integrationdev.peopleclick.com/soap/echo. WSDL:
    https://integrationdev.peopleclick.com/soap/echo. WSDLException (at
    /SOAP-ENV:Envelope): faultCode=INVALID_WSDL: Expected element '{
    http://schemas.xmlsoap.org/wsdl/}definitions'.:
    It is recommended that you use a web browser to retrieve and
    examine the requested WSDL document for correctness. If the
    requested WSDL document can't be retrieved or it is dynamically
    generated, it is likely that the target web service has programming
    errors.
    -- ...end of error message.
    The message insinuates a WSDL problem. I understand
    message-based web services don't use a WSDL. Must I remove
    something from our standard RPC-based web service configuration?
    Thanks in advance.
    Dev

    hi all,
    UPDATE:
    i have some how managed to handle my error at both REQUEST MESSAGE peoplecode and at HANDLER peoplecode. Tested the webservice using SOAPUI tool. After passing all inputs required, the customer is not created and i am getting a blank response message which should contain the SETID and CUST_ID as response. Please help me out whether i am missing any Key part in creating a CUSTOMER. Note, i haven't written any Peoplecode for creation and i am also not aware how to do the same or where to write the logic for it.
    Kindly bare with me and do help me out as i m struck with it for long. Thanks in advance

  • XAException during sending JMS message

    I'am having following exception during sending JMS message using JMSService to remote OC4J queue:
    04/09/15 16:35:02 XAException in errorRollback rollback(c0:a7:9:14:cd:2d:0:0:2a:
    0:0:0:0:0:0:0:0:2b:0:ff:2:84:8c:1):
    04/09/15 16:35:02 XAException in errorRollback null
    04/09/15 16:35:02 XAException in errorRollback rollback(c0:a7:9:14:cd:2d:0:0:2a:
    0:0:0:0:0:0:0:0:2b:0:ff:2:84:8c:1):
    04/09/15 16:35:02 XAException in errorRollback null
    <2004-09-15 16:35:02,717> <ERROR> <default.collaxa.cube.engine.dispatch> <BaseSc
    heduledWorker::process> Failed to handle dispatch message ... exception Message
    handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.
    engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: Transac
    tion was rolled back: TwoPhase Commit failed; nested exception is: javax.transac
    tion.xa.XAException: rollback(c0:a7:9:14:cd:2d:0:0:2a:0:0:0:0:0:0:0:0:2b:0:ff:2:
    84:8c:1):
    Regards
    Jarek

    Hi Jarek,
    Is it possible to send us a reproducible bpel package or steps to reproduce? you can send the test case to [email protected]
    when you send the zip file could you please rename to .zap extension. I haven't seen this problem before. I want to reproduce this on my development env.
    -muruga

Maybe you are looking for