[Fwd: JMS publishing via http-tunneling]

"Jeffrey S. Hair" wrote:
Does anyone know of way to speed up WL JMS publishing via http-tunneling?
We have a server that is publishing messages to JMS rather frequently (1/200 millisecs). We then
have several applications and applets subscribed for this topic. The applications work great and get
all of the messages quite fast (using t3 protocol).
However, the applet, running on the other side of a firewall, and connected to the server over a 28k
modem, receives the updates rather slowly since the messages need tunneled through http. In fact, so
many updates are being published that the applet continually falls behind. If we stopped the updates
or slowed down the updates, the applet would eventually catch up and reflect the latest message.
The sessions in the applet were created using AUTO_ACKNOWLEDGE. I've since changed them to use
CLIENT_ACKNOWLEDGE and allow for 15 seconds of messages to be processed before acknowledging. This
improved the speed but the applet still falls behind to some degree. When the publishing slows down,
the applet now at least catches up.
As a side note, does anyone know of a way to view the contents of the JMS queue?
Thanx,
jsh
Jeffrey S. Hair
Sr. System Architect, FNX Limited[email.eml]

Which web server are you using?
Both iWS6.0 SP2 or iWS Fast-track 4.1 works with iMQ.
But earler versions of iWS6.0 do not and we have no
control of that.

Similar Messages

  • Talking to WL JMS Queue via HTTP

    Hi,
    We have a web application running on weblogic server 6.1. We were able to talk (in our case, this involved sending it xml input) to this application through the weblogic JMS by hitting the JMS queue via a java program on the same box. What we need to do now is to talk to that same JMS queue using HTTP. In other words, be able to post an HTTP message from a different box to the JMS queue on this weblogic server.
    How do we do that? Please assume I know as little as possible.
    Thanks so much.
    Avraham

    One way to do this is to create a servlet that forwards the incoming HTTP message to the queue. In order to access a remote box you probably just need to package the JMS client library with the servlet's WAR file. In this setup, the servlet is basically a router between the HTTP side and the JMS side. You can also create a JAX-RPC web service if you want the HTTP input to follow a specific XML structure.
    - Bjarne.

  • Get InitialContext for P4-connection via Http tunneling

    Hi,
    I have to use an Http tunnel to access my integration J2EE engine.
    Now, I want to create a P4-connection. It doesn't work. No InitialContext will be returned.
    I can open the VisualAdmin on the http tunneling port. But in the connection GUI I can select 'Http tunneling' as connection type. Is there any setting, i.e. property, for the InitialContext to signal that Http tunneling should be used ?
    Regards,
    Astrid

    Hi Astrid,
    yes, you need ot use TransportLayerQueue property of the InitialContext to specify that you need Http Tunneling as the transport layer. See <a href="http://help.sap.com/saphelp_nw04/helpdata/en/c8/5bc0417951cf17e10000000a155106/frameset.htm">this</a> page for description.
    Did you use that already?
    Regards,
    Ivo

  • ClassCastException when RMI callback via HTTP tunneling

    Hello,
    I have a typical stock quote type of weblogic RMI application running WLS
    6.0. If I use T3 for client to register its stub on the server side, the
    server callback works fine. I use standard jndi lookup to find the server,
    if I simply switch the provider_url form:
    env.put(Context.PROVIDER_URL, "t3://192.168.1.5:7001");
    to
    env.put(Context.PROVIDER_URL, "http://192.168.1.5:7001");
    the client can still connect to server and register itself, but server
    callback fails:
    this client method: qClient.setFreshData(vList) generates the following
    error:
    java.lang.ClassCastException: ocsmon.wServerThread
    at weblogic.servlet.logging.CLFLogger.log(CLFLogger.java:65)
    at
    weblogic.servlet.logging.LogManagerHttp.log(LogManagerHttp.java:293)
    at weblogic.servlet.internal.HttpServer.log(HttpServer.java:670)
    at
    weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:
    851)
    at
    weblogic.rjvm.http.HTTPServerJVMConnection.sendMsg(HTTPServerJVMConnection.j
    ava:361)
    at
    weblogic.rjvm.MsgAbbrevJVMConnection.sendOutMsg(MsgAbbrevJVMConnection.java:
    367)
    at
    weblogic.rjvm.MsgAbbrevJVMConnection.sendMsg(MsgAbbrevJVMConnection.java:173
    at
    weblogic.rjvm.ConnectionManager.sendMsg(ConnectionManager.java:482)
    at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:419)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.flushAndSendRaw(MsgAbbrevOutputStream.ja
    va:114)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:
    122)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:144)
    at
    weblogic.rmi.internal.AbstractOutboundRequest.sendReceive(AbstractOutboundRe
    quest.java
    :84)
    at
    ocsmon.QuoteClientInterface_WLStub.setFreshData(QuoteClientInterface_WLStub.
    java:218)
    at ocsmon.wServerThread.run(wQuoteServer.java:350)
    ocsmon.wServerThread is the thread spawned on the server side that obtains
    the qClient stub from the server's registry and calls the refreshQuotes
    method on it. 'vList' is a Vector of Strings containing the quotes.
    What went wrong?
    thanks
    -Alan

    Hello,
    I have a typical stock quote type of weblogic RMI application running WLS
    6.0. If I use T3 for client to register its stub on the server side, the
    server callback works fine. I use standard jndi lookup to find the server,
    if I simply switch the provider_url form:
    env.put(Context.PROVIDER_URL, "t3://192.168.1.5:7001");
    to
    env.put(Context.PROVIDER_URL, "http://192.168.1.5:7001");
    the client can still connect to server and register itself, but server
    callback fails:
    this client method: qClient.setFreshData(vList) generates the following
    error:
    java.lang.ClassCastException: ocsmon.wServerThread
    at weblogic.servlet.logging.CLFLogger.log(CLFLogger.java:65)
    at
    weblogic.servlet.logging.LogManagerHttp.log(LogManagerHttp.java:293)
    at weblogic.servlet.internal.HttpServer.log(HttpServer.java:670)
    at
    weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:
    851)
    at
    weblogic.rjvm.http.HTTPServerJVMConnection.sendMsg(HTTPServerJVMConnection.j
    ava:361)
    at
    weblogic.rjvm.MsgAbbrevJVMConnection.sendOutMsg(MsgAbbrevJVMConnection.java:
    367)
    at
    weblogic.rjvm.MsgAbbrevJVMConnection.sendMsg(MsgAbbrevJVMConnection.java:173
    at
    weblogic.rjvm.ConnectionManager.sendMsg(ConnectionManager.java:482)
    at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:419)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.flushAndSendRaw(MsgAbbrevOutputStream.ja
    va:114)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:
    122)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:144)
    at
    weblogic.rmi.internal.AbstractOutboundRequest.sendReceive(AbstractOutboundRe
    quest.java
    :84)
    at
    ocsmon.QuoteClientInterface_WLStub.setFreshData(QuoteClientInterface_WLStub.
    java:218)
    at ocsmon.wServerThread.run(wQuoteServer.java:350)
    ocsmon.wServerThread is the thread spawned on the server side that obtains
    the qClient stub from the server's registry and calls the refreshQuotes
    method on it. 'vList' is a Vector of Strings containing the quotes.
    What went wrong?
    thanks
    -Alan

  • JMS over HTTP, HTTP tunneling, imqhttp, Glassfish, Open MQ

    Hi,
    I want to run JMS over HTTP, because of firewalls.
    My environment:
    - Windows 7 64 bits
    - Java EE 6 SDK (Glassfish 3, installer java_ee_sdk-6u4-jdk7-windows-x64.exe)
    Following instructions (Oracle GlassFish Server Message Queue Administration Guide, HTTP/HTTPS Support), I have done as follows:
    1.- modified default.properties (in my case file D:\usr\Glassfish3\mq\lib\props\broker\default.properties) by adding "httpjms" to imq.service.activelist, so I have:
    # List of active services, started at startup
    imq.service.activelist=jms,admin,httpjms
    2.- modified server.policy file (in my case D:\usr\Glassfish3\glassfish\domains\domain1\config\server.policy) by adding at the end:
    grant codeBase "file:${com.sun.aas.installRoot}/glassfish/domains/domain1/applications/imqhttp/-" {
    permission java.net.SocketPermission "*",
    "connect,accept,resolve";
    3.- I then, using the Glassfish Admin Console (listening on port 4848), deployed the application packaged in the imqhttp.war WAR file (this WAR file taken from D:\usr\Glassfish3\mq\lib), using "imqhttp" as Context Root name.
    4.- I then invoke URL http://127.0.0.1:8080/imqhttp/tunnel and get the following return:
    HTTP tunneling servlet ready.
    Servlet Start Time : Wed Jul 04 19:28:01 CEST 2012
    Accepting TCP connections from brokers on port : 7675
    Total available brokers = 1
    Broker List :
    ANTEC:imqbroker
    Importantly: I had to reboot everything, including Windows to get the broker listed in the broker list.
    ...uh !!???!! ...it just shows that posting to discussion groups and sharing is great... yesterday, I could not get this working, I had nothing in my Broker list, and a bunch of exceptions when trying to publish a message... I swear I re-started Glassfish many times... now it's working all right, and the only thing I've done meantime is to reboot the PC...
    In any case, I keep the post, it might be of help to someone.
    Later
    Varus

    To have the new setting of broker property imq.service.activelist take effect, if EMBEDDED (default) jms-service is used, the GlassFish server needs to be restarted; otherwise, the broker process needs to be restarted. If the JMS service (EMBEDDED mode) in the GlassFish server has not been started (due to GlassFish JMS lazy init - default), run 'asadmin jms-ping' will start the embedded broker in GlassFish server.

  • How to add HTTP Header Response X-Frame-Options:SAMEORIGIN from OWA published via Forefront TMG 2010 to stop Clickjacking

    How to add HTTP Header Response X-Frame-Options:SAMEORIGIN from OWA published via Forefront TMG 2010 to stop Clickjacking. I have put the IIS setting X-Frame-Options:SAMEORIGIN  on my Internal CAS Server. However as the OWA page is published through
    Forefront TMG 2010, the iFrame tag is not blocked when the page is first opened. Only when you login with your credentials to the OWA page inside the frame and the page reaches IIS on the Internal CAS it gets blocked. I want to block it in the first
    instance when it is opened from TMG.

    Hi,
    Thank you for the post.
    To modify the http header, please refer to this blog:
    http://tmgblog.richardhicks.com/2009/03/27/using-the-isa-http-filter-to-modify-via-headers-and-prevent-information-disclosure/
    Regards,
    Nick Gu - MSFT

  • Jms & proxy http tunnel

    "I am trying to run TradeRecive sample program that come with 7.0 on a machine behind the firewall at remote site and I am having the following exception. (java command line has proxy specified, server has http tunneling enabled)
              Can someone help ?
              C:\ArthurTest\JMS>java -Dhttp.proxyHost=134.142.50.10 -Dhttp.proxyPort=8080 -cp
              .;.\weblogic.jar TraderReceive http://205.172.179.92:80
              <May 6, 2003 4:33:25 PM CDT> <Error> <RJVM> <000515> <execute failed
              java.net.ProtocolException: Tunneling result unspecified - is the HTTP server a
              t host: '205.172.179.92' and port: '80' a WebLogic Server?
              java.net.ProtocolException: Tunneling result unspecified - is the HTTP server at
              host: '205.172.179.92' and port: '80' a WebLogic Server?
              at weblogic.rjvm.http.HTTPClientJVMConnection.handleNullResponse(HTTPCli
              entJVMConnection.java:173)
              at weblogic.rjvm.http.HTTPClientJVMConnection.receiveAndDispatch(HTTPCli
              entJVMConnection.java:409)
              at weblogic.rjvm.http.HTTPClientJVMConnection.execute(HTTPClientJVMConne
              ction.java:305)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              >
              Exception in thread "main" javax.naming.CommunicationException. Root exception
              is java.net.ConnectException: http://205.172.179.92:80: Bootstrap t
              

    Hi,
              The tunneling problem likely has nothing to do with JMS.
              JMS likely hasn't been called yet. I have little experience here,
              so all I can suggest is trying to connect
              to the WL server directly without the
              firewall/proxy-server/interposed-web-server in between --
              to see if you can narrow down the problem to the HTTP pass-through
              to the WL server. Then check the BEA docs, and google search and/or
              post to the more relevant rmi and/or jndi newsgroups...
              Tom, BEA
              tieeren wrote:
              > "I am trying to run TradeRecive sample program that come with 7.0 on a machine behind the firewall at remote site and I am having the following exception. (java command line has proxy specified, server has http tunneling enabled)
              >
              > Can someone help ?
              >
              >
              >
              > C:\ArthurTest\JMS>java -Dhttp.proxyHost=134.142.50.10 -Dhttp.proxyPort=8080 -cp
              > .;.\weblogic.jar TraderReceive http://205.172.179.92:80
              > <May 6, 2003 4:33:25 PM CDT> <Error> <RJVM> <000515> <execute failed
              > java.net.ProtocolException: Tunneling result unspecified - is the HTTP server a
              > t host: '205.172.179.92' and port: '80' a WebLogic Server?
              > java.net.ProtocolException: Tunneling result unspecified - is the HTTP server at
              > host: '205.172.179.92' and port: '80' a WebLogic Server?
              > at weblogic.rjvm.http.HTTPClientJVMConnection.handleNullResponse(HTTPCli
              > entJVMConnection.java:173)
              > at weblogic.rjvm.http.HTTPClientJVMConnection.receiveAndDispatch(HTTPCli
              > entJVMConnection.java:409)
              > at weblogic.rjvm.http.HTTPClientJVMConnection.execute(HTTPClientJVMConne
              > ction.java:305)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              >
              > Exception in thread "main" javax.naming.CommunicationException. Root exception
              > is java.net.ConnectException: http://205.172.179.92:80: Bootstrap t
              

  • JMS through firewall (no tunneling)

              Hi,
              I have to send and receive messages through a firewall with JMS. The company security
              policy forbids http tunneling but I can get a specific port opened. Which port
              do I have to get opened to start listening to a queue ? Weblogic's default ?
              I heard that Weblogic JMS initiates the communication on the default port but
              then attributes another socket dynamically, is that true ? If so, is there a way
              to specify the ports that must be used ?
              Thanks.
              

    Hi Matt,
              I'm sorry for the delay, I've been away for a while.
              I'm wondering if I gave you incorrect advice. I'm not
              familiar enough with firewalls. I suspect the new port
              is related to the permanent standard TCP/IP connection
              that WL sets up between any client and any server.
              It may be that you should use HTTP tunneling instead of T3 - just
              substitute "http" or "https" for "t3" or "t3s" respectively,
              and ensure that HTTP tunneling is enabled for the port you
              have opened up.
              We've reached the limits of my knowledge - please consider
              directing further questions to the "RMI" newsgroup (WL JMS
              communicates through WL RMI, which, in turn communicates
              through sockets...)
              Tom
              Matthieu Riou wrote:
              > I really have a problem with my JMS listeners. Anytime I start a new JMS listener
              > to a Weblogic queue, a new port is opened and listening around 2100 to 2200 or
              > 3100 to 3200. I configured a network channel only accepting t3 on port 8001 and
              > a very restrictive connection filter that only accepts t3 on 8001 and http on
              > 7001.
              >
              > Still, anytime I start a listener, a new port is opened. How can I avoid that
              > ?
              >
              >
              > Tom Barnes <[email protected].bea.com>
              > wrote:
              >
              >>T3 is fine. In fact, it is preferable, as it is the
              >>fastest. Actually T3S is much more preferable. The point
              >>is to lock things down as much as possible:
              >>
              >>-- Consider a seperate port for admin - to
              >>ensure it is never reachable through the firewall
              >>
              >>-- create an additional port just for the firewall - to make
              >>it more managable and to restrict it to SSL only connections
              >>(with certificates),
              >>
              >>-- ensure that all server resources are secured so that
              >>users coming in through the firewall have the most
              >>restricted permissions possible...
              >>
              >>Matthieu Riou wrote:
              >>
              >>>So if I understand well, I should use another protocol than t3 to be
              >>
              >>sure to always
              >>
              >>>use only one port.
              >>>I'm using Weblogic 7.0 sp4, it seems that iiop is not supported
              >>>for JMS on this version. So what is left ? JCOM ?
              >>>
              >>>Tom Barnes <[email protected].bea.com>
              >>>wrote:
              >>>
              >>>
              >>>>Hi,
              >>>>
              >>>>In WL, all services are available on a port (EJB, JMS, JNDI,
              >>>>JTA, etc.), but the protocols that the port supports are
              >>>>configurable (T3, HTTP tunnel, IIOP, JCOM).
              >>>>
              >>>>Additionally, WL supports the concept of an "Admin"
              >>>>port (channel), which, when configured, is the only port
              >>>>that can be used for privileged administrative purposes.
              >>>>An "Admin" port is SSL only.
              >>>>
              >>>>In WL 7.0 and later, additional ports can be configured.
              >>>>These are referred to as network channels.
              >>>>
              >>>>In light of the above, I recommend:
              >>>>
              >>>>(1) Consider configuring a separate admin port.
              >>>>(2) Consider configuring a port specific for the purpose (using
              >>>>a channel).
              >>>>(3) Ensuring that all applications, and destinations, etc. are
              >>>>secured (via ACLs) such that permission to access
              >>>>a particular destination doesn't imply permission to access any
              >>>>other server resources.
              >>>>(4) Considering configuration of "connection filters"
              >>>>as to act as a second layer of firewall for the port...
              >>>>
              >>>>For further questions, try "rmi", "network",
              >>>>and "security" newsgroups.
              >>>>
              >>>>Tom
              >>>>
              >>>>Matthieu Riou wrote:
              >>>>
              >>>>
              >>>>>Hi,
              >>>>>
              >>>>>I have to send and receive messages through a firewall with JMS. The
              >>>>
              >>>>company security
              >>>>
              >>>>
              >>>>>policy forbids http tunneling but I can get a specific port opened.
              >>>>
              >>>>Which port
              >>>>
              >>>>
              >>>>>do I have to get opened to start listening to a queue ? Weblogic's
              >>>>
              >>>>default ?
              >>>>
              >>>>
              >>>>>I heard that Weblogic JMS initiates the communication on the default
              >>>>
              >>>>port but
              >>>>
              >>>>
              >>>>>then attributes another socket dynamically, is that true ? If so,
              >>
              >>is
              >>
              >>>>there a way
              >>>>
              >>>>
              >>>>>to specify the ports that must be used ?
              >>>>>
              >>>>>Thanks.
              >>>>
              >
              

  • Try expose svn via http, but Location directive does not work.

    Hello everyone,
    I used svn exposed via http in OSX 10.6 and 10.7 using collabnet.
    Now I take OSX server 10.8 and installed svn inside XCode.
    SVN is correctly installed, apache respond to default site.
    I copied the modules dav_svn_module and authz_svn_module compiled on my machine with same svn version of XCode [version 1.6.18 (r1303927)] .
    I created a file into /etc/apache2/other called svn.conf that contain follow code:
    LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so
    LoadModule authz_svn_module libexec/apache2/mod_authz_svn.so
    <Location /repo>
      DAV svn
      SVNPath '/Volumes/VMware HD/svn/repository'
    </Location>
    Checking if module are loaded with sudo apachectl -t -D DUMP_MODULES i obtain:
    Loaded Modules:
    dav_svn_module (shared)
    authz_svn_module (shared)
    Syntax OK
    So file svn.conf is loaded and the module too.
    When I try to check via browser with http://localhost/repo I obtain in /var/log/apache2/error_log the following error:
    [Wed Feb 13 12:41:12 2013] [error] [client 192.168.1.114] File does not exist: /Library/Server/Web/Data/Sites/Default/repo
    Is Location directive failing?!
    How can I expose the right repository location instead of default site?

    Oeren,
    I stumbled across this little tidbit buried in the BI Publisher forum: Dynamic Images in rtf
    Glad you are up and running!
    Joshua

  • Help needed in HTTP Tunneling - urgent

    Hi all,
    I urgently need a working code sample of a client which sends requests to a server that redirects the request to an RMI server via RMI servlet.
    Does any of you familiar of such a code sample?
    Thanks

    I'm sorry, but HTTP Tunneling is not working for me. I must have done something wrong.
    Let me describe my configuration:
    I have a server behind NAT router which connected to apache2 and tomcat 4.1 web servers. The apache2 and tomcat are not connected between them.
    I deployed war file on tomcat which contains the servlet for the HTTP Tunneling which its code is:
    public class RmiHttpTunnelerServlet extends HttpServlet
        public void init(ServletConfig config) throws ServletException
            super.init(config);
            System.out.println("Simplified RMI Servlet Handler loaded successfully.");
        public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
            try
                String queryString = req.getQueryString();
                String command, param;
                int delim = queryString.indexOf("=");
                if (delim == -1)
                    command = queryString;
                    param = "";
                else
                    command = queryString.substring(0, delim);
                    param = queryString.substring(delim + 1);
                if (command.equalsIgnoreCase("forward"))
                    try
                        ServletForwardCommand.execute(req, res, param);
                    catch (ServletClientException e)
                        returnClientError(res, "client error : " + e.getMessage( ));
                        e.printStackTrace();
                    catch (ServletServerException e)
                        returnServerError(res, "internal server error : " + e.getMessage());
                        e.printStackTrace();
                else
                    returnClientError(res, "invalid command: " + command);
            catch (Exception e)
                returnServerError(res, "internal error: " + e.getMessage());
                e.printStackTrace();
        public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
            returnClientError(res, "GET Operation not supported: Can only forward POST requests.");
        public void doPut(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
            returnClientError(res, "PUT Operation not supported: Can only forward POST requests.");
        public String getServletInfo()
            return "Simplified RMI Call Forwarding Servlet Servlet.<br>\n ";
        private static void returnClientError(HttpServletResponse res, String message) throws IOException
            res.sendError(HttpServletResponse.SC_BAD_REQUEST,
                          "<HTML><HEAD><TITLE>Java RMI Client Error < / TITLE > < / HEAD > < BODY > " +
                          "<H1>Java RMI Client Error</H1>" + message + "</BODY></HTML>");
            System.err.println(HttpServletResponse.SC_BAD_REQUEST + "Java RMI Client Error" + message);
        private static void returnServerError(HttpServletResponse res,
                                              String message) throws IOException
            res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                          "<HTML><HEAD>< TITLE > Java RMI Server Error < / TITLE > < / HEAD > < BODY > " +
                          "<H1>Java RMI Server Error < / H1 > " + message + " < / BODY > < / HTML > ");
            System.err.println(HttpServletResponse.SC_INTERNAL_SERVER_ERROR + "Java RMI Server Error : " + message);
        }There is also a utility class:
    public class ServletForwardCommand {
        public static void execute(HttpServletRequest request, HttpServletResponse response, String stringifiedPort)
            throws ServletClientException, ServletServerException, IOException {
            int port = convertStringToPort(stringifiedPort);
            Socket connectionToLocalServer = null;
            try {
                connectionToLocalServer = connectToLocalServer(port);
                forwardRequest(request, connectionToLocalServer);
                forwardResponse(response, connectionToLocalServer);
            } finally {
                if (null != connectionToLocalServer) {
                    connectionToLocalServer.close();
        private static int convertStringToPort(String stringfiedPort) throws ServletClientException {
            int returnValue;
            try {
                returnValue = Integer.parseInt(stringfiedPort);
            } catch (NumberFormatException e) {
                throw new ServletClientException("invalid port number: " + stringfiedPort);
            if (returnValue <= 0 || returnValue > 0xFFFF) {
                throw new ServletClientException("invalid port: " + returnValue);
            if (returnValue < 1024) {
                throw new ServletClientException("permission denied for port: " + returnValue);
            return returnValue;
        private static Socket connectToLocalServer(int port) throws ServletServerException {
            Socket returnValue;
            try {
                returnValue = new Socket(InetAddress.getLocalHost(), port);
            } catch (IOException e) {
                throw new ServletServerException("could not connect to " + "local port");
            return returnValue;
        private static void forwardRequest(HttpServletRequest request, Socket connectionToLocalServer)
            throws IOException, ServletClientException, ServletServerException {
            byte buffer[];
            DataInputStream clientIn = new DataInputStream(request.getInputStream());
            buffer = new byte[request.getContentLength()];
            try {
                clientIn.readFully(buffer);
            } catch (EOFException e) {
                throw new ServletClientException("unexpected EOF " + "reading request body");
            } catch (IOException e) {
                throw new ServletClientException("error reading request" + " body");
            DataOutputStream socketOut = null;
            // send to local server in HTTP
            try {
                socketOut = new DataOutputStream(connectionToLocalServer.getOutputStream());
                socketOut.writeBytes("POST / HTTP/1.0\r\n");
                socketOut.writeBytes("Content-length: " + request.getContentLength() + "\r\n\r\n");
                socketOut.write(buffer);
                socketOut.flush();
            } catch (IOException e) {
                throw new ServletServerException("error writing to server");
        private static void forwardResponse(HttpServletResponse response, Socket connectionToLocalServer)
            throws IOException, ServletClientException, ServletServerException {
            byte[] buffer;
            DataInputStream socketIn;
            try {
                socketIn = new DataInputStream(connectionToLocalServer.getInputStream());
            } catch (IOException e) {
                throw new ServletServerException("error reading from " + "server");
            String key = "Content-length:".toLowerCase();
            boolean contentLengthFound = false;
            String line;
            int responseContentLength = -1;
            do {
                try {
                    line = socketIn.readLine();
                } catch (IOException e) {
                    throw new ServletServerException("error reading from server");
                if (line == null) {
                    throw new ServletServerException("unexpected EOF reading server response");
                if (line.toLowerCase().startsWith(key)) {
                    responseContentLength = Integer.parseInt(line.substring(key.length()).trim());
                    contentLengthFound = true;
            while ((line.length() != 0) &&
                (line.charAt(0) != '\r') && (line.charAt(0) != '\n'));
            if (!contentLengthFound || responseContentLength < 0)
                throw new ServletServerException("missing or invalid content length in server response");
            buffer = new byte[responseContentLength];
            try {
                socketIn.readFully(buffer);
            } catch (EOFException e) {
                throw new ServletServerException("unexpected EOF reading server response");
            } catch (IOException e) {
                throw new ServletServerException("error reading from server");
            response.setStatus(HttpServletResponse.SC_OK);
            response.setContentType("application/octet-stream");
            response.setContentLength(buffer.length);
            try {
                OutputStream out = response.getOutputStream();
                out.write(buffer);
                out.flush();
            } catch (IOException e) {
                throw new ServletServerException("error writing response");
    }I checked also with packets monitoring tool, I couldn't see any http transportation.
    Any help will be appreciated.

  • Possible Bug with Drag-and-Drop Being Published via HTML5 - Getting "Undefined" Error When Dragging Object

    Hello,
    I came up with a way to use drag-and-drop interactions that will take advantage of file input so that I may create a drag-and-drop interaction that uses one draggable object over and over allowing multiple scoring/tracking possibilities.  Example use...is having the draggable object be dynamic in that it randomly changes its text so that a learner can drag a term it's possible classification.........thus allowing the possibility of having many terms easily loaded without having to redo a drag-and-drop interaction for each needed terms/classifications updates/changes.
    My Issue: When using a variable to represent the text for a draggable Smart Shape object, I'm getting the error message "undefined" when, clicking/pressing on the object, as well as during the drag of the object. This issue occurs when publishing the project in an HTML5 format.  Flash interestingly enough seems to work perfect...but we are not interested in publishing via Flash any longer.
    To better help you explore this error message, I've set up a test project so that you can see when and how the "undefined" message shows up during a drag-and-drop interaction.  I've also included the Captivate 8 project file used to make the exploration project I'm sharing in this post.
    Link to Captivate project I created for you all to explore "undefined" error message": http://iti.cscc.edu/drag_and_drop_bug/
    Link to this Captivate 8 Project file: http://iti.cscc.edu/drag_and_drop_bug.cptx
    It's pretty interesting how things react in this demo, please try the following actions to see some interesting happenings:
    Drag the Yellow (or variable drag box) to the drag target.
    Drag Black Hello square to Drag target and click undo or reset - watch the undefined message come up on the Yellow (or variable drag box).
    Drag the Yellow (or variable drag box) to the drag target and then use the undo or reset.
    Move both draggable boxes to the drag target and use the undo and reset buttons...
    Anyhow, I know you all are sharp and will run the demo through its paces.
    I'd really be very honored if anyone help me figure out how I could (when publishing out to HTML5) no longer have the "undefined" error message show up when using drag-and-drop with a variable for shape text. This technique has been well received at the college I work at...and I have many future project requests for using such an idea on a variety of similar interactions. I'd love see a solution or see if this might be a bug Adobe may be able to fix!
    I tried to find a solution to the issue documented here for quite some time, but I was not able to find anyone with this problem much less attempting the idea I'm sharing in the help request -  save the darn "undefined" message that comes up!
    Many thanks in advance for any help and/or direction that you all may be able to provide,
    Paul

    Hello,
    I just wanted to supply a minor update related to my drag-and-drop question/issue stated above:
    I did another test using Captivate 7, and found that the undefined error (publishing as HTML5) does not appear and the variable data remains visible - except the variable data turns very small and does not honor any font size related settings.
    I did go ahead and submit this to Adobe as a possible bug today.
    Thanks again for any help related to this issue.  If the issued documented above is solved, it will allow many amazing things to be done using Captivate's drag-and-drop for both regular type projects as well as interaction development for iBooks! 
    Matter of fact if this issue gets fixed, I'll publish a Blog entry (or video) on way's I've used Captivate's drag-and-drop to create dynamic learning activities for Higher Ed. and for use in iBooks.
    ~ Paul

  • Dont think RMi is HTTP tunneling through proxy firewall

    Hi Guys,
    Does anyone know how to monitor if RMI is using the option toHTTP tunnel through a proxy ???
    Many of clients sit behind firewalls/proxies that enable HTTP only. I thought RMI would, as a default, use HTTP tunneling POST, RESPONSe methods to get through, but it does not.
    Would that case be insted of using Naming.lokup("RMIServer"); that i should use
    Registry reg = LocateRegistry.getResgistry(serverAddress, serverPort);
    reg.lookup("RMIServer");
    Any help would be greatly appreciated.

    RMI doesn't have an option like that. Sockets do, and you get it for any socket including RMI by setting socksProxyHost and socksProxyPort.
    The RMI HTTP tunnelling thing happens when there is an HTTP server at the server side. which redirects the request to an RMI server via rmi-cgi.cgi or the RMI servlet. It's automatic, as a fallback, and you can enforce its use via a system property which you can find in the Javadoc Guide to Features/Remote Method Invocation/Useful java.rmi system properties.

  • Use of servlet http tunneling for client server communication

    Hello I am having a problem connecting a simple client applet to a server application. I can connect the two directly using sockets. However, when I try to connect the two via a servlet the input stream cannot be accessed. The application is purely for demonstration. Here is some of the source code
    A servlet for http tunneling
    import java.io.*;
    import java.net.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class SocketServlet extends HttpServlet
         ServletInputStream servletinput;
         ServletOutputStream servletoutput;
         Socket socket;
         DataOutputStream dataoutput;
         DataInputStream datainput;     
         public SocketServlet()
    public void init(ServletConfig servletconfig) throws ServletException
    super.init(servletconfig);
    log("Socket servlet initialized.");
         public void doPost( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException
    try
    servletinput = request.getInputStream();
    socket = new Socket( InetAddress.getByName( "127.0.0.1" ), 5000 );
    dataoutput = new DataOutputStream( socket.getOutputStream() );
    try
                        byte[] inbytes = new byte[1024];
                        servletinput.read( inbytes );
                        String inmessage = new String( inbytes );                    
                        dataoutput.writeBytes( inmessage );
    catch(IOException ioex)
    dataoutput.flush();
    datainput = new DataInputStream( socket.getInputStream() );
    servletoutput = response.getOutputStream();
    try
    byte[] outbytes = new byte[1024];
    datainput.read( outbytes );
    servletoutput.write( outbytes );
    catch(IOException ioex)
    servletoutput.flush();
    servletoutput.close();
    catch(Exception ex)
    // Server.java
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Server extends JFrame {
    private JTextField enter;
    private JTextArea display;
    DataOutputStream output;
    DataInputStream input;
    public Server()
    super( "Server" );
    Container c = getContentPane();
         enter = new JTextField();
         enter.setEnabled( false );
         c.add( enter, BorderLayout.SOUTH );
    display = new JTextArea();
    c.add( new JScrollPane( display ),
    BorderLayout.CENTER );
    setSize( 300, 150 );
    show();
    public void runServer()
    ServerSocket server;
    Socket connection;
    int counter = 1;
    try {
    // Step 1: Create a ServerSocket.
    server = new ServerSocket( 5000, 100 );
    while ( true ) {
    // Step 2: Wait for a connection.
    display.setText( "Waiting for connection\n" );
    connection = server.accept();
    display.append( "Connection " + counter +
    " received from: " +
    connection.getInetAddress().getHostName() );
    // Step 3: Get input and output streams.
    output = new DataOutputStream(
    connection.getOutputStream() );
    input = new DataInputStream(
    connection.getInputStream() );
    display.append( "\nGot I/O streams\n" );
    // Step 4: Process connection.
    String message =
    "SERVER>>> Connection successful";
    output.writeBytes( message );
    enter.setEnabled( true );
                   display.append( "\nConnected\n" );
    do {
    try {
                        byte[] mess = new byte[1024];
    input.read( mess );
    display.append( "\n" + message );
    display.setCaretPosition(
    display.getText().length() );
                   catch (IOException ioex )
    } while ( !message.equals( "CLIENT>>> TERMINATE" ) );
    // Step 5: Close connection.
    display.append( "\nUser terminated connection" );
    enter.setEnabled( false );
    output.close();
    input.close();
    connection.close();
    ++counter;
    catch ( EOFException eof ) {
    System.out.println( "Client terminated connection" );
    catch ( IOException io ) {
    io.printStackTrace();
    private void sendData( String s )
    try {
    output.writeBytes( "SERVER>>> " + s );
    display.append( "\nSERVER>>>" + s );
    catch ( IOException cnfex ) {
    display.append(
    "\nError writing object" );
    public static void main( String args[] )
    Server app = new Server();
    app.addWindowListener(
    new WindowAdapter() {
    public void windowClosing( WindowEvent e )
    System.exit( 0 );
    app.runServer();
    // Fig. 21.4: Client.java
    // Set up a Client that will read information sent
    // from a Server and display the information.
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.zip.*;
    public class Client extends Applet implements ActionListener {
    private TextField enter;
    private TextArea display;
    DataOutputStream output;
    DataInputStream input;
    private Button button, button2;
    URLConnection connection;
    private byte[] bytes1, bytes2;
    private String message, message2;
    public void init()
    setLayout( new BorderLayout() );
    enter = new TextField( " Enter text here " );
    enter.setEnabled( false );
    enter.addActionListener( this );
    add( enter, BorderLayout.NORTH );
    display = new TextArea( 4, 30 );
         display.setEditable( false );
    add( display, BorderLayout.CENTER );
         button = new Button( "Connect" );
         button.addActionListener( this );
         add( button, BorderLayout.SOUTH );
    public void runClient()
    Socket client;
    try {
    // Step 1: Create a Socket to make connection.
    display.setText( "Attempting connection\n" );
              URL currentpage = getCodeBase();
              String protocol = currentpage.getProtocol();
              String host = currentpage.getHost();
              int port = 8100;
              String urlsuffix = "/servlet/SocketServlet";
              URL dataurl = new URL( "http://localhost:8100/servlet/SocketServlet" );
              connection = dataurl.openConnection();
    connection.setDoOutput(true);
    connection.setDoInput(true);
    connection.setRequestProperty("Content-type", "application/octet-stream");
              connection.setUseCaches( false );
              display.append( "\nConnected to: " + host );          
    // Step 2: Get the output streams.
    output = new DataOutputStream(
    connection.getOutputStream() );
              display.append( "\n got output stream\n" );
              // Step 3 get input connection
              try
              display.append( "\nAttempting to connect to input stream\n" );
                   input = new DataInputStream( connection.getInputStream() );
                   bytes1 = new byte[1024];
                   input.readFully( bytes1 );
                   display.append( "\nGot input stream\n" );
                   message = new String( bytes1 );
                   display.append( "\n" + message + "\n" );          
              catch ( IOException ioex )
              // Step 3: Process connection.
              enter.setEnabled( true );
              do {
              try {
    bytes2 = new byte[1024];
              input.readFully( bytes2 );
              message2 = new String( bytes2 );
              display.append( "\n" + message2 );
              display.setCaretPosition(
              display.getText().length() );
              catch ( IOException ioex ) {
              display.append(
              "\nUnknown object type received" );
              } while ( !message.equals( "SERVER>>> TERMINATE" ) );
    // Step 4: Close connection.
    display.append( "Closing connection.\n" );
    output.close();
    input.close();
         catch (MalformedURLException mfe )
    catch ( EOFException eof ) {
    System.out.println( "Server terminated connection" );
    catch ( IOException e ) {
    e.printStackTrace();
    private void sendData( String s )
    try {
    message = s;
    output.writeBytes( "CLIENT>>> " + s );
    display.append( "\nCLIENT>>>" + s );
    catch ( IOException cnfex ) {
    display.append(
    "\nError writing object" );
    public void actionPerformed( ActionEvent e )
         if ( e.getActionCommand() == "Connect" )
              runClient();
         else
              sendData( e.getActionCommand() );
    public static void main(String args[])
    Frame f = new Frame("Chat Client");
         Client c = new Client();
         c.init();
         f.add("Center", c);
         f.setSize(300, 150);
         f.show();
    the connection appears to fail at client step 3, any help is super, thanks
    Aidan

    Hi,
    In your client you are trying to open OutputStream even though you are not using it.
    So there are two solutions here.
    1. If you dont need OutputStream your code shoud look like this
    try {
    // Step 1: Create a Socket to make connection.
    display.setText( "Attempting connection\n" );
    URL currentpage = getCodeBase();
    String protocol = currentpage.getProtocol();
    String host = currentpage.getHost();
    int port = 8100;
    String urlsuffix = "/servlet/SocketServlet";
    URL dataurl = new URL( "http://localhost:8100/servlet/SocketServlet" );
    connection = dataurl.openConnection();
    //connection.setDoOutput(true);
    connection.setDoInput(true);
    connection.setRequestProperty("Content-type", "application/octet-stream");
    connection.setUseCaches( false );
    display.append( "\nConnected to: " + host );
    // Step 2: Get the output streams.
    //output = new DataOutputStream(
    //connection.getOutputStream() );
    //display.append( "\n got output stream\n" );
    display.append( "\n Not interested in output stream\n" );
    //Step 3 Inpustream related
    // Step 4: Close connection.
    display.append( "Closing connection.\n" );
    //output.close();
    input.close();
    1. If you need OutputStream, close your OutputStream before even trying to get InputStream, your code should like this
    try {
    // Step 1: Create a Socket to make connection.
    display.setText( "Attempting connection\n" );
    URL currentpage = getCodeBase();
    String protocol = currentpage.getProtocol();
    String host = currentpage.getHost();
    int port = 8100;
    String urlsuffix = "/servlet/SocketServlet";
    URL dataurl = new URL( "http://localhost:8100/servlet/SocketServlet" );
    connection = dataurl.openConnection();
    //connection.setDoOutput(true);
    connection.setDoInput(true);
    connection.setRequestProperty("Content-type", "application/octet-stream");
    connection.setUseCaches( false );
    display.append( "\nConnected to: " + host );
    // Step 2: Get the output streams.
    output = new DataOutputStream(
    connection.getOutputStream() );
    display.append( "\n got output stream\n" );
    //I'll do whateve I've to do with outputstream
    //done with output stream closing
    output.close();
    //Step 3 Inpustream related
    // Step 4: Close connection.
    display.append( "Closing connection.\n" );
    //output.close();
    input.close();
    hope this works
    all the best,
    Raj

  • How to integrate Oracle BI Publisher via Web Services in Oracle Forms.

    hi
    I hope you fine and happy. I think you hear about the new reporting tool (Oracle BI Publisher).
    Really it is a great tool. I need someone help me; How I can integrate Oracle BI Publisher via Web Services in Oracle Forms.
    I got the guidelines of this integration process from ORACLE.
    But, when I compile the script of publicreportserviceclient.callRunReport - the script running the report -, I get some errors in PL/SQL compiler
    http://www.oracle.com/technology/products/xml-publisher/index.html

    ==========================
    PL/SQL CODE:
    ==========================
    DECLARE
         RAISEDEXCEPTION ORA_JAVA.JOBJECT;
    REPORT_PATH VARCHAR2(200);
    PARAM_NAME VARCHAR2(200);
    PARAM_VALUE VARCHAR2(200);
    UN VARCHAR2(200);
    PW VARCHAR2(200);
    FORMAT VARCHAR2(200);
    TEMPLATE VARCHAR2(200);
    OUT_FILE VARCHAR2(200);
    OBJ ORA_JAVA.JOBJECT;
    BEGIN
    OBJ := PUBLICREPORTSERVICECLIENT.NEW();
    REPORT_PATH := '/LEARN/EMPLOYEES/EMPLOYEES.XDO';
    PARAM_NAME := 'P_DEPTNO';
    PARAM_VALUE := '50';
    UN := 'Administrator';
    PW := 'Administrator';
    FORMAT := 'PDF';
    TEMPLATE := 'Simple';
    OUT_FILE := 'C:\DevSuiteHome_1\j2ee\home\default-web-app\' || 'TEST';
    --PUBLICREPORTSERVICECLIENT.CALLRUNREPORT(OBJ,:REPORT_PATH,PARAM_NAME,:PARAM_VALUE,UN,PW,:FORMAT,:TEMPLATE,OUT_FILE);
    PublicReportServiceClient.callRunReport( REPORT_PATH,
    PARAM_NAME,
    PARAM_VALUE,
    UN,
    PW,
    FORMAT,
    TEMPLATE,
    OUT_FILE);
    WEB.SHOW_DOCUMENT('HTTP://127.0.0.1:8889/j2ee/' || 'TEST');
    END;
    ==========================
    JAVA CODE FOR callRunReport FUNCTION:
    ==========================
    public void callRunReport (String reportPath, String[] paramName, String[] paramValue, String
    username, String password, String format, String template, String outFile)
    try {
    bip_webservice.proxy.PublicReportServiceClient myPort =
    new bip_webservice.proxy.PublicReportServiceClient();
    // Calling runReport
    ReportRequest repRequest = new ReportRequest();
    repRequest.setReportAbsolutePath(reportPath);
    repRequest.setAttributeTemplate(template);
    repRequest.setAttributeFormat(format);
    repRequest.setAttributeLocale("en-US");
    repRequest.setSizeOfDataChunkDownload(-1);
    if (paramName != null)
    ParamNameValue[] paramNameValue = new ParamNameValue[paramName.length];
    String[] values = null;
    for (int i=0; i<paramName.length; i++)
    paramNameValue[i] = new ParamNameValue();
    paramNameValue.setName(paramName[i]);
    values = new String[1];
    values[0] = paramValue[i];
    paramNameValue[i].setValues(values);
    repRequest.setParameterNameValues(paramNameValue);
    else
    repRequest.setParameterNameValues(null);
    ReportResponse repResponse = new ReportResponse();
    repResponse = myPort.runReport(repRequest,username,password);
    byte[] baReport = repResponse.getReportBytes();
    FileOutputStream fio = new FileOutputStream(outFile);
    fio.write(baReport);
    fio.close();
    } catch (Exception ex) {
    ex.printStackTrace();

  • Invoking scheduled/bursted reports via HTTP... documentation?

    Hi all - I am looking for documentation regarding the HTTP "API" for BI Publisher Scheduler. There is an HTTP interface for which I can find no documentation. For instance by POSTing a URL such as http://<site>:<port>/xmlpserver/servlet/scheduler?ujobname=DirectDeliveryReport.xdo&d_printerd_p_gname0=direct&show_conf_page=true&d_method0=d_printer0&job_locale=en_US&save_output=off
    ...you can "schedule" a job for immediate execution and output to a printer.
    This is the method of execution for Oracle SIM 13 and is vaguely described in the SIM 13 Implementation Guide but not apparently in the BIP docs. I am wondering:
    a) what is the API for this web interface? What are the parameters?
    b) can this interface be used for bursting reports? If so it would seem to be a much easier way to schedule burst reports when an external scheduling system is required. More straightforward, like a shell script for Oracle Reports, rather than having to write a Java app to call BIP twice, first to get the XML data, second to burst/deliver that data.

    Hi Tim -
    By 'run now' mode via HTTP, are you referring to a direct call to the XDO or a one-time run via the scheduler servlet? I am not looking to set up a repeating schedule via HTTP, simply to kick off a one-time job with an output destination of email or printer. I cannot find any documentation for the one-time scheduled execution through the scheduler via HTTP. I have searched all the 10.1.3.3.3 docs, the blog, and the message boards for some of those parameters being defined in the SIM URL and there's no mention of them.
    SIM may use some internal logic to construct the URL, but by looking at the SIM, Apache, and BIP log I can see what it's doing. It's a series of GETs and POSTs via HTTP. Using this same logic, I have constructed some PL/SQL (http_utl package) to call BIP in the same fashion from a trigger and it works fine. The HTTP interface that SIM is using certainly seems to be fully-fledged; it seems to have parameters that would allow you to define the output format and destination. I just want to know what they are =)
    All I'm trying to do is automate some of the SIM printing by making it trigger-based rather than GUI-based. If the client wants to, say, autoemail instead of autoprint, I would have no idea how to change the URL params to do this. Secondly, if such a URL could specify that bursting, per the XDO, take place, we can use this HTTP method to invoke BIP from an external scheduler which will be easier for us than using web services.
    Thanks in advance,
    -eric

Maybe you are looking for

  • Itunes will not open safari webkit2 error... :(

    all of a sudden my itunes will not open... i've folllowed ALL of the steps to fix it... no results... my safari keeps giving me a webkit2process.exe error and quicktime does not work!!! help!!!! 

  • Cannot find class WorklistUtil Jdeveloper 11.1.1.2

    Hi there, this is my second question today :( I am trying to run a base Worklist application. After deployment is done, I go to the webpage and get the following error. I have checked Google but there is nothing like this. Can anyone help? javax.el.E

  • Warhammer - Graphics Card Issue

    So here's my problem. I'm running vista through bootcamp and am having problems installing/running Warhammer Online becauce of what appears to be a graphics card issue? I screened through systemrequirementslab.com and came back with it saying I had "

  • Is there a way to remove the blue bars on the side

    Me and my friend are trying to make video and I wanna remove the blue bars because they don't blend in with his background. Is their a way I can remove them or change the color?

  • FRM-10221

    Hi! I made a new menu for my form.I attached the menu to my form. But when i compile the form i get this error message:Cannot read file:Menu I have compiled my menu again, but nothing happens, i get the error again. With kind regards Nicole