Looking UP JMS services From an Applet!!

Hi!!
1>I am trying to lookup JMS services from my applet. Actually I would like my applet to send JMS messages and recieve messages as well. When I am trying to do lookup it is giving Access Control Exception
a> java.util.PropertyPermission "user.dir", "read";
b>java.util.PropertyPermission "java.version", "read";
c>java.util.PropertyPermission "line.separator", "read";
It works fine if I give
"grant {permission java.security.AllPermission;};"
How can I avoid giving Grant All to my applet.
2>If I have my Weblogic web server and my Applet Client sitting behind a firewall.How will I take care of lookup as the lookup occurs through 7001 port. If I use tunnellling at the appplication server side.I would be able to lookup using http over port 80 but JMS messaging won't be over port 80. How to take care of Server Side and CLient Side firewalls.
Can anybody help.
thanks
aditya.

hi,
if the security exception is coming from the applet side, then you should consider the following:
Normally for an applet to run in any web server, the database and theweb server should reside in the same machine to avoid a security exception being thrown. If you have the web server residing in different machine than the database then you can either use signed applet or you can use oracle connection manager to make it as a medium between the web server and the database. The connection manager will have to be installed in the same machine where the database resides. For more information on applet security with oracle products, please refer to oracle connection manager reference guide.
If the security issue is thrown from the JMS side, then you might conside granting your user Advance queing and some java security permissions.
hope this helps.

Similar Messages

  • Looking up JMS Server from an applet

    Hi!!
    I am trying to lookup a JMS server via an applet using Oracle9i
    Application Server. It's giving Security Access Exception. Can
    anybody help.

    hi,
    if the security exception is coming from the applet side, then you should consider the following:
    Normally for an applet to run in any web server, the database and theweb server should reside in the same machine to avoid a security exception being thrown. If you have the web server residing in different machine than the database then you can either use signed applet or you can use oracle connection manager to make it as a medium between the web server and the database. The connection manager will have to be installed in the same machine where the database resides. For more information on applet security with oracle products, please refer to oracle connection manager reference guide.
    If the security issue is thrown from the JMS side, then you might conside granting your user Advance queing and some java security permissions.
    hope this helps.

  • Accessing a web service from an applet

    Using NetBeans 5.5.1, I have created a web application consisting of a web service, an applet and a jsp. The applet is the client of the web service. The application is deployed on Tomcat 5.5.17, which comes with the IDE. Since the web service and the applet reside on the same server, I do not need to sign the applet to contact the web service�at least that was what I thought. Asking for the jsp in my browser, however, results in a java.security.AccessControlException:
    access denied (java.util.PropertyPermission xml.catalog.ignoreMissing read)
    To my best knowledge, my applet is not accessing local resources or doing other things that require it to leave the sandbox, so I don't understand why it needs extra permissions. Could it be the generated web service client code that is causing the exception? What is it doing that it needs extra permissions? By bundling everything in one application, I was really hoping to avoid having to sign my applet...

    I performed some additional tests and it appears that when processing XML, java classes under the hood often need access to PropertyPermissions, ReflectPermissions, etc. So although your own code does not need to step out of the sandbox, system classes do. For example, try to create a JAXB context in an applet: unless you sign your applet or change your policy file, it will not work. Something to bear in mind when developing applets or deploying applications via JWS.

  • What's a lightweight method to call a web service from an applet?

    So, writing web service clients in java is pretty easy these days using the JAX-RPC library. Problem is in an applet you want it to load fast. I need my applet to call a web service, but don't want to include all the 'baggage' that comes along with JAX-RPC. It looks like you need XML libraries for JAX-RPC stuff to run, and those are huge jar files (many megabytes). I want a lightweight way to call web services. They are my own web services, so I don't need a general solution. There's got to be a way to just form a soap message and use http to send it. It seems like that has been done already.
    On a related note. I will be passing byte arrays as parameters, so if I do try and form my own SOAP XML message, how are byte typically encoded into these messages?
    Thanks a bunch for any suggestions.
    Mike

    The scripting prompt is due to locally installed WebHelp. If you put it on a server, it should work fine. (Or try to enable Mark of the Web for your output.)
    The problem with CSH not working is probably because the CSH is not enabled in the output. In the single source layout settings, make sure that all your map files are selected:
    The easiest way I see it to create a simple API yourself. (We did it for Delphi and C# and it took about ten minutes.) You can just create a URL and feed it to the default browser. If you want to be able to load new help calls in the same tab, you will have to hook into the browser somehow.
    The URL's are really easy to create. See http://www.wvanweelden.eu/article-category/context-sensitivity for a complete overview of all your options in HTML and WebHelp. If you want to call a CHM context sensitive look at the following article: http://msdn.microsoft.com/en-us/library/2bk8zwb3(v=vs.90).aspx
    Greet,
    Willam

  • Can Call Web Service from Applet?

    Can we call a .NET Web Service from an Applet?.
    Please help me.

    if the Applet has been downloaded from the same web server where the web service runs, pretty easily. else, you might have to sign the applet.
    just build the XML messages .NET is expecting, post them to the server and process the response.
    you can try using JAXM but i am not sure the messages it produces will be digested by .NET - just try!

  • Calling web service from applet

    Hi,
    I am trying to consume a .NET web service from a java applet. I use JDev9i and I generated a clientside-stub...
    It works fine in the development environnement, but I get this exception when executing from browser:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertiesAccess(Unknown Source)
         at java.lang.System.getProperties(Unknown Source)
         at oracle.soap.transport.http.OracleSOAPHTTPConnection.<clinit>(OracleSOAPHTTPConnection.java:105)
         at AppletPackage.Service1Stub.<init>(Service1Stub.java:23)
    I replaceOracleSOAPHTTPConnection with SoapHTTPConnection, but then I get the same exception when trying to execute
    requestBodyEntries.addElement(toElement(wrappingName, targetNamespace, requestData)); (in the stub)
    Is there anything wrong with the methods of the Oracle packages that could cause security problems?

    Nope, the problem is that the webservice impl is trying to get all system properties and this is a restricted operation for applets. Seems like every single api impl done by oracle is not usable from applets, unless you sign them. I've tried webservices, xml and jndi.. all of them rely on system properties

  • Problems looking up JMS queues in JNDI from other nodes

              I have a simple cluster(MyCluster) in weblogic 6.1 which consists of two managed servers
              (Server1 & Server2).
              Server1 has a JMSServer (JMSServer1) containing a couple of JMS queues.
              I also created a JMS Connection Factory, and targeted both the managed servers as
              well as the cluster.
              I can look up the queue from the node hosting the JMSServer, but cannot look up the
              queues from the 2nd node (server2).
              It just says that it cannot resolve the jndi name for the queue on Server2.
              According to weblogic docs, I should have transparent access to the queues from server2
              as long as i target both servers from the connection factory.
              Am I missing something?
              Thanks.
              

              I have a simple cluster(MyCluster) in weblogic 6.1 which consists of two managed servers
              (Server1 & Server2).
              Server1 has a JMSServer (JMSServer1) containing a couple of JMS queues.
              I also created a JMS Connection Factory, and targeted both the managed servers as
              well as the cluster.
              I can look up the queue from the node hosting the JMSServer, but cannot look up the
              queues from the 2nd node (server2).
              It just says that it cannot resolve the jndi name for the queue on Server2.
              According to weblogic docs, I should have transparent access to the queues from server2
              as long as i target both servers from the connection factory.
              Am I missing something?
              Thanks.
              

  • Writing to a JMS queue from Tux-service?

    Greetings,
    is there any way to write to a JMS-queue from a Tuxedo/atmi service without
    using WebLogic Server (because of WTC needing it)?
    Lara

    Lara,
    One way to write to a JMS-queue from a Tux service would be by using JNI functions.
    Inside your server's tpsvrinit function you can create a JVM (using JVM_CreateJavaVM
    function) and instantiate a couple of Java objects. You may then call Java methods
    on these objects from your Tux services. At the server's tpsvrdone function you
    must then destroy the Java objects and the JVM.
    Regards,
    Lazaros
    "Lara Faiazza" <[email protected]> wrote:
    Greetings,
    is there any way to write to a JMS-queue from a Tuxedo/atmi service without
    using WebLogic Server (because of WTC needing it)?
    Lara

  • Any difference in creating a web service from a java class or session bean?

    Hi,
    The JDeveloper tutorial at http://www.oracle.com/technology/obe/obe1013jdev/10131/devdepandmanagingws/devdepandmanagingws.htm demonstrates creating a web service from a plain java class. I'm wondering:
    - Is it possible to create a web service from a stateless session bean instead of a java class? If so, what's the proper way to do this in JDeveloper? When I tried doing so in JDeveloper 10.1.3.0.4 (SU5) using the J2EE Web Service wizard, the wizard did not list the session bean in the Component To Publish dropdown (it does list any java classes available in the project). I can proceed by manually typing in the name of the session bean. After the wizard completes though, the @Stateless annotation that had been in my session bean class code is removed and replaced by a @WebService annotation. The end result is that it looks like it made no difference whether I had tried to create the web service from a session bean or plain java class as the annotations in the resulting web service code are the same (although if I had started from a session bean, the class for the web service still implements the Local/Remote EJB interface that the session bean originally implemented).
    - Assuming it's possible to create a web service from a stateless session bean, is there any advantage/disadvantage creating a web service from a java class vs a stateless session bean? I'm creating the web service from scratch so I also need to either build the java class or stateless session bean the web service would be based on from scratch too.
    Thanks for any ideas about this.

    Hi,
    EJB Session beans (EJB 3.0) are deployed as WebServices by annotating the class with @WebService and the methds with @WebMethod (both tags require you to add the JSR-181 library to your project (available in the JDeveloper list of libraries)). Unlike the J2E WebService, the EJB session bean service is turned into a WebService upon deployment. This means you obtain teh WSDL file after deployment
    - Assuming it's possible to create a web service from a stateless session bean, is there any advantage/disadvantage creating a web service from a java class vs a stateless session bean?
    The difference is that EJB Session bean based web services are integrated with the J2EE container, which means that they can leverage container services like transaction handling, data sources, security, JMS etc.
    Frank

  • Authentication error when using JMS service

    I'm currently trying to send String messages from LiveCycle to Websphere MQ (Both running on the same server), but I'm having some problems...
    I''m quite sure that my WAS setup is correct (or at least close to correct) because I've build some test Java classes that are able to put and get messages from MQ using JMS. However, when I'm usng the LiveCycle JMS service I get the following exception thrown:
    [5/26/10 17:46:44:705 CAT] 00000027 QueueMessageS A com.adobe.livecycle.jms.QueueMessageSender sendMessageToQueueWithProperties Error occurred when creating queue connection. Reason: MQJMS2013: invalid security authentication supplied for MQQueueManager.
    Since I'm not a Websphere fundi I trawled through Google and was able to figure out that the problem probably lies with the configuration of my queue connection factory. Changing the transport type from "Bindings" to "Client" didn't resolve the problem and I'm rapidly running out of good ideas. Hopefully somebody here would be able to help.
    The following info might be useful:
    OS = Windows Server 2003
    I'm using WAS 6.1.0.29
    Websphere MQ is running on the same machine (v6.0)
    I've used the Websphere MQ JMS Provider that comes with WAS
    I've configured a Queue Connection Factory and a Queue in the server scope
    No SSL or anything like that is set up yet
    I did notice that when configuring the Queue there is a section titled "WebSphere MQ Queue Connection Properties" where I am able to specify a user Id and password. However, nothing seemed to work. I tried my WAS administration user name, as well as a windows user who is indeed a member of the mqm group. Also tried it without any value, but no luck
    On the MQ side I couldn't really find any settings under either the Queue Manager or the Channel that would make much of a difference. Since I was able to access the queues using a servlet deployed on the same WAS instance I'm thinking it has something to do with the way that LC call the JMS provider. But to be honest, I don't really have a clue.
    Any help would be much appreciated.
    Greg

    Haven't solved the problem yet, but here's an update:
    I created an "ExecureScript" operation that contains simple Java code to write a message to MQ using the same JMS connection factory and JMS queue. It does work correctly, so clearly my setup it correct enough to send messages from LiveCycle to MQ via JMS.
    Here's the code for the ExecuteScript:
    //import the classes that the script references
    import java.util.List;
    import java.lang.String;
    import java.util.Map;
    import java.util.HashMap;
    import javax.jms.*;
    import javax.naming.*;
    //get a list of file names that are stored in the process variable named files
    String strMessage = patExecContext.getProcessDataStringValue("/process_data/@strMessage");
    //get connection factory
    String strQcf = patExecContext.getProcessDataStringValue("/process_data/@strQcf");
    //get queue
    String strQ = patExecContext.getProcessDataStringValue("/process_data/@strQ");
    try
        // Look up administered objects
        System.out.println("Looking up administered objects...");
        InitialContext initContext;
        initContext = new InitialContext();
        QueueConnectionFactory factory = (QueueConnectionFactory) initContext.lookup(strQcf);
        Queue queue = (Queue) initContext.lookup(strQ);           
        initContext.close();
          // Create JMS objects
          System.out.println("Creating JMS objects...");
          QueueConnection connection = factory.createQueueConnection();
          QueueSession session =    connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        QueueSender sender = session.createSender(queue);
          //Send messages
          TextMessage message = session.createTextMessage(strMessage);
          sender.send(message);
           //Exit
           System.out.println("Exiting...");
           connection.close();
           System.out.println("Goodbye!");   
    } catch (Exception e)
            e.printStackTrace();
    Interestingly I don't provide any authentication information and yet LC is able to connect to MQ
    Cheers

  • How to call a method in the servlet from an applet

    I want to get the data for the applet from the servlet.
    How to call a method that exits in the servlet from the applet? I want to use http protocol to do this.
    Any suggestions? Please help.
    thanks

    Now that Web Services is around, I'd look at possibly implement a Web Service call in your applet, which can then be given back any object(s) on return. Set up your server side to handle Web Service calls. In this way, you can break the applet out into an application should you want to (with very little work) and it will still function the same

  • Best way to call web service from Message Driven Bean

    I'm q'ing msgs up and would like to use a message driven bean to forward them to
    an external web service. Weblogic workshop does not seem to support web service
    controls in an EJB project. Any suggestions?
    Thanks,
    Paul

    Paul,
    A non-trivial alternative, since you have the WSDL, would be to forget about trying
    to use generated client code and just use JAX-RPC dynamic invocation instead.
    That's how I call external web services from within an EJB in situations in which
    generated client code cannot be incorporated prior to deployment. Minimally all
    that is required is the WSDL and the service name, port name, and operation name,
    although if non-builtin parameter types are used then you will have to manipulate
    the service's type mapping registry.
    Mark
    "Paul" <[email protected]> wrote:
    >
    I've taken our wsdl and generated a web service in Workshop 8.1 using
    XMLBeans.
    This produces a web page that contains a link"Java Proxy" for downloading
    generated
    client code. I assume this is the same as clientgen. It's interesting
    that
    it does not
    use XMLBeans like the web service that generated it. It uses a different
    serialization
    method.
    I've used this generated code to call the web service. Although the
    client seems
    to run
    successfully to completion, I get the following error in the weblogic
    server console:
    <Sep 29, 2003 7:46:24 AM EDT> <Error> <WLW> <000000> <Failure=com.bea.wlw.runtim
    e.core.request.ResponseValidationException: java.lang.RuntimeException:
    Protocol
    'http-soap' not available on this operation. [ServiceException]>
    <Sep 29, 2003 7:46:24 AM EDT> <Warning> <WLW> <000000> <Returning HTTP
    500 due
    t
    o SOAP fault occurring on DispFile=pjm.srcm.webservices.face.Receptor>
    Frustrating...
    Bruce Stephens <[email protected]> wrote:
    Hi Paul,
    Could you not first use clientgen on the external webservice, then take
    the stubs it created, then add these to your code along with the
    onMessage(Message msg) and roll it into the MBean?
    We don't have exactly that example, but you might take a look at this
    one to get some ideas:
    http://webservice.bea.com/message.zip
    Hope this helps,
    Bruce
    Paul wrote:
    Bruce,
    Don't think this will work for us. We are receiving data internallythrough
    a JMS queue. We need to pull it off the queue (MDB), massage it alittle and
    send it to an external web service. The link you sent me was howto implement
    a web service with JMS.
    I started out by trying to use the Web Service and JMS controls butit doesn't
    seem like I can use a JMS control because that requires a conversationID,
    which we don't have because nothing is comming in through a web services.
    Paul
    Bruce Stephens <[email protected]> wrote:
    Hi Paul,
    There is a chapter in the docs on this. See if this helps,
    http://edocs.bea.com/wls/docs81/webserv/jms.html#1067060
    Thanks,
    Bruce
    Paul wrote:
    I'm q'ing msgs up and would like to use a message driven bean to
    forward
    them to
    an external web service. Weblogic workshop does not seem to supportweb service
    controls in an EJB project. Any suggestions?
    Thanks,
    Paul

  • Transforming messages read using jms service

    I have a web service that reads a message from jms queue and returns the message as string. This string itself seem to be full xml document, i.e., it has an xml header element and soap:envelope. What should xquery look like if I need to select contents of the embedded soap:body? or should i rather change the jms service and do some xml parsing there (if so, please suggest recommended strategy)?
    Here is an example of how $body looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header
    /><soap:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="ht
    tp://www.w3.org/2001/XMLSchema"><ns:Result xmlns:ns="http://example.org"> .....

    XQuery:
    $body/soap:Body/*
    will get you the contents of the soap Body. Don't use the predefined soap-env prefix; it's not a match for the soap-envelope schema referenced in your example. Instead, define a "soap" (or whatever you'd like to call it) prefix with the namespace uri of "http://www.w3.org/2003/05/soap-envelope".
    Meghan

  • Calling web service from oracle forms 10g

    Problem Description:
    I'm following the steps as per the doc:
    http://www.oracle.com/technology/products/forms/htdocs/10gr2/howto/webservicefromforms/ws_10_1_3_from_forms.html
    to create a java stub to call external web service and then use java importer in oracle forms to call this web service from oracle forms.
    WSDL for external web service used is http://gend:83/DesignService.svc?wsdl
    The service was developed by us.
    Calling the web service using JDeveloper works fine but when I complie in Oracle Forms it returns wrong number of types of arguments in call SENDHELLO.
    The code from oracle form to call web service is as below:
    DECLARE
    jo ora_java.jobject;
    xo ora_java.jobject;
    rv varchar2(2000);
    ex ora_java.jobject;
    str varchar2(100);
    BEGIN
    jo := GendServiceClient.new;
    rv := GendServiceClient.sendHello('Nora');
    EXCEPTION
    WHEN ORA_JAVA.JAVA_ERROR then
    message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
    WHEN ORA_JAVA.EXCEPTION_THROWN then
    ex := ORA_JAVA.LAST_EXCEPTION;
    message(Exception_.toString(ex));
    END;
    Any help/ideas on this is greatly appreciated. Thanks.
    Edited by: KE Nora Loera on Jun 1, 2012 1:24 PM

    My primary skill is PL/SQL but the only information I found on Oracle's site to call a web service from a 10g Form was creating a jar file and importing the java class. Since I don't want to ask our corporate IT to make changes on the UNIX box for the jar files I went a different route.
    I use UTL_HTTP.BEGIN_REQUEST to call a URL then load I load the data to a table as a CLOB since we have more than 4000 characters. Now I need to parse the XML and load it into a form. I have never done this so if there is a helpful site please let me know. I have looked at several sites but none do what I want.
    Thanks

  • Problem invoking a web service from soa11g BPEL.

    Hi ,
    I am trying to invoke a web service from soa bpel 11g composite.
    We have the wsdl, wsdl URL of the web service along with the user name , password credentials.
    Initially w/o any WS policy attached and testing the composite, it fails with the below message
    *<fault>*
    *<bpelFault>*
    *<faultType>0</faultType>*
    *<remoteFault>*
    *<part name="summary">*
    *<summary>An Authentication object was not found in the SecurityContext</summary>*
    *</part>*
    *<part name="detail">*
    *<detail>javax.xml.ws.soap.SOAPFaultException: An Authentication object was not found in the SecurityContext</detail>*
    *</part>*
    *<part name="code">*
    *<code>soap:Server</code>*
    *</part>*
    *</remoteFault>*
    *</bpelFault>*
    *</fault>*
    *<faultType>*
    *<message>0</message>*
    *</faultType>*
    *</messages>*
    So I have gone back to the composite and added the WS policy (oracle/wss_username_token_client_policy) by Right clicking on web service -> Configure WS Policy -> Security -> oracle/wss_username_token_client_policy -> OK.
    After this I have added the following binding properties 'oracle.webservices.auth.username' , 'oracle.webservices.auth.password' with the respective values and deployed it again.
    Even then I face the same issue. I have looked into the EM console and found the HTTP username and password properties were blank for this Web service even though the WS policy was attached.
    Later I have tried editing the username pwd from the EM console, only to find out that the composite was now failing in the previous step (an ordinary db adapter with a select statement) even before it reaches the web service invocation.
    If I redeploy the composite, the http username and pwd properties in the EM console are erased and when i test it, it errors out at the web service invocation with the same issue again.
    Any pointers on how to solve this issue ??
    How can I figure out what is the security policy the web service is using ??
    Regards,
    Shiva Kiran

    Hi,
    Can anyone help me with this ??
    I guess I am not able to send the authorization credentials via the request to the web service invocation.
    Plz help ! This is a bit urgent..
    Regards,
    Shiva Kiran

Maybe you are looking for

  • Restrict Deletion of Components from Service Order

    Hello All, I noticed that I am able to delete the components from the Components tab of a Service Order even after I have completely issued the components. Is there a possible way to prevent deletion of components that have already been issued..? I t

  • Macbook Pro (2.8Gz Intel Core i7) Crashing after installing 10.8.3

    Hi there, After doing some spring cleaning on my computer and upadting it to the above I am incountering crashes (blackouts and auto reboot) mulitiple times a day. It mostly happens when i go to open any internet browser but has also happened when i'

  • ITunes 7.1 starts endless-download when "buying iTunes Gifts"

    After installing iTunes 7.1 I tried to buy iTunes Gift Cards (at the Austrian iTunes Store). Every time i clicked onto the link "buy iTunes Gifts" the bar inside the "apple-window" the did not finish (1 cm before the right side). iTunes then did star

  • I can't get note taking mode on iTunes U

    Hi. I've installed ITunes U in my IPad and I can take notes - all videos open full screen

  • Algorithm question, please help

    Hi all, Suppose that we have several String lines (postal addresses for example) in a text file. Is there an algoritm that permits to find the list of the addresses that 'resembles' to the query (an address that may contain an error) entered by the u