Communication between mobile browser and proxy server

hi
I am trying to connect to internet in mobile through my proxy server.I wrote codings for that.Using my code i am able to get the request from the mobile browser but the problem is i am unable to connect to the proxy server
The following is my code for sending the request to the proxyserver and getting back the response:
s = (SocketConnection)Connector.open("socket://"+hostname+":"+port);
/*OutStream to write the request to the proxy server*/
OutputStream out = s.openOutputStream(); PrintStream outw = new PrintStream(out); outw.print(requestHeader +"\r\n"); /*Inputstream to read the response from the proxy server*/ InputStream in = s.openInputStream();
/*writing the response in the browser */
byte[] buffer = new byte[1024];
int len;
while((len = in.read(buffer)) > 0) {
os.write(buffer, 0, len);
is my coding correct?or i need to change anything in my codings?
This coding is working fine in emulator and displaying the correct output in the desktop browser.but in mobile it is not working?
Thanks a lot

hi
yes nothing is returned from the browser
request from the browser means
whenever u type say,www.google.co.in in your browser
the following type of request will go to the proxy server,after getting the request the proxy server will check for the host address and then it connects to the webserver and get the response and send it back to the browser.
for google page the request is
GET http://www.google.co.in/ HTTP/1.1
Host: www.google.co.in
Accept: text/html, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/css, multipart/mixed, text/vnd.wap.wml, application/vnd.wap.wmlc, application/vnd.wap.wmlscriptc, application/java-archive, application/java, application/x-java-archive, text/vnd.sun.j2me.app-descriptor, application/vnd.met.ticket, application/x-wallet-appl.user-data-provision, application/vnd.oma.drm.message, application/vnd.oma.drm.content, application/vnd.wap.mms-message, application/vnd.wap.sic, text/x-co-desc, application/vnd.oma.dd+xml, */*
Accept-Charset: iso-8859-1, utf-8, iso-10646-ucs-2; q=0.6
Accept-Encoding: gzip,deflate,identity;q=0.9
Accept-Language: en
Cookie: PREF=ID=dc8dc6e63dab6e09:TM=1156324791:LM=1156324791:S=FgovcdMV93Mm4Li7
Cookie2: $Version="1"
User-Agent: Nokia6630/4.06.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1
x-wap-profile: "http://nds1.nds.nokia.com/uaprof/N6630r100.xml"
in the code u have given the value of the host is http: only

Similar Messages

  • Error in the Socket Communication between Java Client and VC++ Server

    In my application, using Java Client to do socket bi-communication with VC++ Server, which is done by somebody else.
    The error is after the application properly running one or two days, the VC++ Server cannot receive the messages passed by java Client, but at Java client, everything is the same, although using CheckError() after every print(), there is no exception thrown.
    The JVM is jdk1.3.1, platform is Win2k Server.
    The outputstream is PrintWriter().
    Please help me to settle down this problem. Thanks in advance.

    I read some thread in the forum, and found somebody had the similar problem with me. Just want to know how to settle this problem.
    In the client/server program. Client is a JAVA program and Server a
    VC++ program. The connection works, and the problem appears after some time. The Client sends a lots of requests to Serverm, the server seems receive nothing. But at the same time, the server is able to send messages to Client. The Client also can get the messages and handle them. Don't understand why there this problem and why it appears when it wants.
    The client is a Win2k platorm with JDK1.3.1 and the server is also a Win2K platform with VC++ 6.0.
    In the Client, using:
    inputFromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    outputToServer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);
    Hope can get your help.

  • Socket Communication between java client and c++ server

    HI,
    In my project,I want to do the following:
    1.Sending datas from client to server.
    2.Getting the response from server to client.
    I written the client in java.but the server is in c++.
    Is it possible to communicate with the server using java codings itself?
    Im able to send the data from my java client to the server.
    but unable to get back the datas from server to client.
    Can anyone tell me how to do this?
    thanks a lot

    hi
    thanks for ur reply.
    I didnt get any error msg while getting the back the datas.
    Actually i divided my application into two parts.
    My application will act as both server and client.
    server ll get the browser request and send to the client and the client will send that data to the c++ server.
    Im able to do that.and unable to get the data from server.
    Didnt get any error.
    can u tell me how to make an application to act as both client and server.
    I think im wrong in that part.
    thanks a lot

  • Communication between J2ME MIDlet and J2SE server

    In my project I need to be able to exchange SMS messages between a J2ME MIDlet and a J2SE server? Is that possible? I tried the following:
    I included the CLDC, MIDP and WMA libraries in the classpath of my J2SE server and tried to use the wireless messaging API in the J2SE server. I get the following error message while trying to establish a MessageConnection:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.midp.Configuration.getProperty0(Ljava/lang/String;)Ljava/lang/String;
         at com.sun.midp.Configuration.getProperty0(Native Method)
         at com.sun.midp.Configuration.getProperty(Configuration.java:34)
         at com.sun.midp.io.InternalConnector.<clinit>(InternalConnector.java:91)
         at javax.microedition.io.Connector.open(Connector.java:158)
         at javax.microedition.io.Connector.open(Connector.java:138)
         at javax.microedition.io.Connector.open(Connector.java:120)
    Can anybody provide any suggestions?

    The communication should be done through these ports: https://social.technet.microsoft.com/Forums/windowsserver/en-US/6de9c3f0-2841-4a74-80bb-46a02779124b/which-tcp-ports-does-a-workstation-use-to-authenticate-to-ad-and-get-group-policy?forum=winserverNIS
    To have better visibility, you can setup a network sniffer like Wireshark and observe the traffic.
    As the ADFS and DCs will be located in the same LAN then it should be okay as no filtering should be done (Unless if this is done on local firewalls of the servers).
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • Communication between a GUI and a Server

    Hi,
    I have created a main JFrame which in turn initializes a Server object.
    The Server (multithreaded) accepts socket connections.
    Is there any way for the Server to report back at the GUI that a connection request was received (so as to print a message to the user) without the need to pass a reference to the JFrame to the constructor of the Server object?
    (I am asking this because I've read somewhere that a good programming technique is not allowing the children know their father objects)

    Within Swing you will find a mechanism called the "listener". You can for example implement a MouseMotionListener interface on one of your classes and then register that with specific Swing components to receive mouse movement events on that object for example.
    I suggest using a similar mechanism within your server.

  • Communication between non SAP and SAP

    HI,
    do you have some information about communication between non SAP and ERP (WebAs) SAP System ?
    I would like to receive an xml file or xml IDoc from a Java Plattform (non SAP) into our SAP ERP System as an own defined IDoc.
    remember: we don´t have a converter like XI.
    What about using a proxy (do you have some information/blog how to use that) ?
    What about using a webservice (do you have some information/blog how to use that) ?
    What about storing the xml on the application server (do you have some information/blog how to use that) ?
    How to transform xml to IDoc ?
    other methods ?
    Thanks for your help.
    Gordon

    Here is a link to connecting MS SQL Server with SAP using Open Hub connection.
    http://msdn.microsoft.com/en-us/library/dd299430(SQL.100).aspx
    This might give you some insight into connecting with Non SAP Systems.
    I have used the information from this link to export data from SAP to MS SQL Server.
    Good Luck.
    MP.

  • Lost connection between ovm-manager and ovm-server (ovm 3.1)

    Hi,
    I have a manager as a VM on my laptop and a physical server as an ovm-server. Everything is fine when i boot the server but after some time, the manager stop to show the information from the server. in the ovs-agent log file the following messages are repeated regulary
    [2013-08-29 13:06:19 6160] DEBUG (notification:289) Trying to connect to manager.
    [2013-08-29 13:06:20 6160] DEBUG (notification:291) Connected to manager.
    [2013-08-29 13:06:20 6160] ERROR (notification:316) No manager Core API server object for 10:60:4b:88:bc:24:10:60:4b:88:bc:25:fe:ff:ff:ff.
    [2013-08-29 13:06:34 6171] ERROR (notification:64) Unable to send notification: (111, 'Connection refused')
    I did not reboot neither the server nor the manager. No IP change. Rebooting the manager has no effect.
    The only way to restore communication is to restart the ovs-agent on the server, but this restart disable the network card. I must be physical on the server to restart the network.
    any help will be very helpful
    best regards
    Jean-Marc

    Hi,
    The are many steps to verify:
    Verify with your firewall on the Oracle VM Manager system (service iptables stop).
    Verify with a ping between OVM Manager and OVM Server using the IP Address and using the hostname for each one (from OVM Manager : ping ovm-server ; and from OVM Server: ping ovm-manager).
    I hope this can help you
    Best Regards

  • Communication between HP eprint and Google Cloud Print

    Hi,
    the communication between HP eprint and Google Cloud Print seems to be broken. At least for me.
    The documents do get printed when I print vio Chrome browser or Cloud Print dashboard -- but the status in cloud print remains as "submitted". It seems like somehow the HP eprint status doen't get reported back to cloud print. In HP eprintcenter the log says "printed".
    Well, I wonder who will take care of this problem ...  (Hope it will not result in fingerpointing only ...)
    Thanks for your support!
    Best,
    George
    This question was solved.
    View Solution.

    Are you able to log back in later and the status at Google Cloud print update to reflect the true outcome of the print job? Or does it just remain as "submitted". Otherwise, if it is printing and showing in the log at ePrint Center (EPC) as printed, the issue would not be on the ePrint side but on Google's
    I am a former employee of HP...
    How do I give Kudos?| How do I mark a post as Solved?

  • Error 2032 in communication between Flex Client and WCF

    Hi All,
    I'm trying to establish communication between Flex Client
    and WCF service.
    WCF service accepts gZip compressed data and returns gZip
    compressed results.
    So I used Flex ByteArray.compress() and
    ByteArray.uncompress() for this purpose. However, it throws error
    2032.
    The gZip compression/decompression uses MemoryStream class in
    C#. Based on my previous experience, memory stream communication
    between Flex and C# gives erro 2032.
    Is there a work around for this?
    Thanks,
    Vishal

    I read some thread in the forum, and found somebody had the similar problem with me. Just want to know how to settle this problem.
    In the client/server program. Client is a JAVA program and Server a
    VC++ program. The connection works, and the problem appears after some time. The Client sends a lots of requests to Serverm, the server seems receive nothing. But at the same time, the server is able to send messages to Client. The Client also can get the messages and handle them. Don't understand why there this problem and why it appears when it wants.
    The client is a Win2k platorm with JDK1.3.1 and the server is also a Win2K platform with VC++ 6.0.
    In the Client, using:
    inputFromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    outputToServer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);
    Hope can get your help.

  • Difference between WS runtime and proxy runtime

    HI,
    I'm new to PI/XI. 1) Could anyone please explain about the real difference between WS runtime and Proxy runtime?
    2) How to configure the scenario's for WS communication and proxy communication?
    3) what is the adapter type we should use for this in ID?
    4) How to convert the proxy to webservice? etc.
    Thanks in adavnce
    Regards,
    Baskaran K

    I'm new to PI/XI.
    I would suggest that you first make use of the Search facility of SDN. If I am not wrong all your questions will be answered by a Search.
    Regards,
    Abhishek.

  • Component that implements encryption solution between the browser and Java

    I need a Component that implements encryption solution between the browser and Java tier.
    I am a java programmer and have really limited knowledge about cryptography. I work on JSF . I am basically looking to build a component that will ensure that the password entered by the user in the login page of the browser is properly encrypted using Java script and then we should be able to decrypt it in the Java Tier.
    Basically, I think we need a public-private key system. We send the public key to the browser and use it with JavaScript to encrypt the key and we hold the private key on the server to decrypt it.
    If some one can help me with this it would be very helpful. Or if anyone can point me to some resource that does this kind of thing I shall be obliged.

    Can't use HTTPs as many of our existing customers
    that run on intranet do not use HTTPs.Is there really a technical reason that your clients cannot use HTTPS? If so, what is it and why would your homebrew re-implementation of the same technology be acceptable instead?

  • Connection between SMD Agent and SMD server via SAProuter

    In our scenario, we have to setup the connection between SMD agent and SMD server(solution manager server) via saprouter. But during the installation of SMD agent, we can only specify the hostname of the managing system, we have no place to add saprouter string(/H/..../H/). I I am not sure if we could connect the agent and server via saprouter, if so how to do it?
    Hope someone can give us your precious advices on this issue.
    Karl

    Perfect; and thanks for your response. I found this help page for developers to implement P4 support over SAP router: http://help.sap.com/saphelp_nw73/helpdata/en/48/2992d7ad8758d7e10000000a421937/content.htm
    But in the SM Diagnostics Setup options I can set up only a direct HTTP adresses and have no options to set up connections over a sap router to P4 ports directly. I can at the moment only solve my problems with NAT or firewall rules.
    And also the diagnostic agent setup has no options to config a proxy or sap router. I found yesterday a blog on sdn side with screenshots of the setup with all available connection opetions to SLD... sry I can not post this link today.
    This is an official statment of SAP from the current version of SMD guide; it is also possible but why not from the beginning???:
    In some network conficurations, the Diagnostics agent has to connect to the Managing system though a SAP router.
    This feature will be fully supported in Solution Manager 7 Ehp2 (7.02).
    In order to enable this feature in Ehp1, please contact the Diagnostics Agent support team to get information on how to
    setup the agent and on which patch level you can perform the installation.
    This thread were a long time not answared; proxy and routing connections are mostly stepmotherly handled by SAP; this is also a problem by set up of automatic RFC generations in SMSY; why there are in the setup assitents no options to set up the router string.
    I have absolutly no comprehension for this in year 2011. All this technics are good known and long time tested.
    In this case the f**k has provoked an answare to this thread and this is what I expected; but sorry for my style You are right I could also writh why the heck
    FAQ:
    SMD root side on SDN: http://service.sap.com/diagnostics
    SM FAQ: http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/4e49dbea-0c01-0010-91bd-f0b61388c9ae
    SM Setup Home: http://wiki.sdn.sap.com/wiki/display/SMSETUP/Home
    SM Diagnostic Troubleshooting Guide: https://websmp201.sap-ag.de/~sapdownload/002007974700000409092009E/DiagAgent_TroubleShooting.pdf
    SMD Candidate Setup: http://wiki.sdn.sap.com/wiki/display/SMSETUP/Diagnostics+Agents

  • Communication between a driver and application.

    Communication between a driver and application.
    I am writing a driver for a PCI card. I have found very good examples of how the driver should be build.
    Where do I find the information about how the user mode application should be talking the driver.
    So If you have any idea that will help me, please let me know.

    Hi,Sir
    This for your reference.
    It will create pci adapter device node at /devices .
    You can use AP function call ioctl to Communicate with your device driver.
    static int
    xxattach(dev_info_t *dip, ddi_attach_cmd_t cmd)
    int instance = ddi_get_instance(dip);
    switch (cmd) {
    case DDI_ATTACH:
    allocate a state structure and initialize it.
    map the device�s registers.
    add the device driver�s interrupt handler(s).
    initialize any mutexes and condition variables.
    create power manageable components.
    * Create the device�s minor node. Note that the node_type
    * argument is set to DDI_NT_TAPE.
    if (ddi_create_minor_node(dip, "minor_name", S_IFCHR,
    instance, DDI_NT_TAPE, 0) == DDI_FAILURE) {
    free resources allocated so far.
    /* Remove any previously allocated minor nodes */
    ddi_remove_minor_node(dip, NULL);
    return (DDI_FAILURE);
    * Create driver properties like "Size." Use "Size"
    * instead of "size" to ensure the property works
    * for large bytecounts.
    xsp->Size = size of device in bytes;
    maj_number = ddi_driver_major(dip);
    if (ddi_prop_update_int64(makedevice(maj_number, instance),
    dip, "Size", xsp->Size) != DDI_PROP_SUCCESS) {
    cmn_err(CE_CONT, "%s: cannot create Size property\n",
    ddi_get_name(dip));
    free resources allocated so far
    return (DDI_FAILURE);

  • Communication between the computer and the disc drive failed

    The disc can’t be burned because because communication between the computer and the disc drive failed (error code 0x80020022). This computer has been out of the box for less than a month and this has been a growing problem.

    My problem was FIXED at the apple store..... there was something wrong in the system preferences and the genius deleted something that recreated it's self. Surely enough we we're able to burn a 600 mb dmg of nothing onto a few test disks. For anyone having this issue...it's NOT The media, it's some configuration issue within the computer's preferences. I'm telling you all to take your machine to the nearest apple store and have them fix it, if your machine is still under warranty the fix is free. There was no hardware issue, so the optical drive was not replaced.

  • How to provide joins between oracle tables and sql server tables

    Hi,
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server.
    how to provide joins between oracle tables and sql server tables ? Any help on this
    Regards,
    Malli

    user10675696 wrote:
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server. Bad idea most times. Heterogeneous joins do not exactly scale and performance can be severely degraded by network speed and b/w availability. And there is nothing you can do in the application and database layers to address performance issue at the network level in this case - your code's performance is simply at the mercy of network performance. With a single glaring fact - network performance is continually degrading. All the time. Always. Until it is upgraded. When the performance degradation starts all over again.
    If the tables are not small (few 1000 rows each) and row volumes static, I would not consider doing a heterogeneous join. Instead I would rather go for a materialised view on the Oracle side, use a proper table and index structure, and do a local database join.

Maybe you are looking for

  • End of Useful life for an asset

    Hello, Does anyone know if there is any standard report which states when the asset's useful life is going to end? Even if there is no standard report, does anyone know if this information is stored in any tables from which it can be extracted. Basic

  • Importing Crystal report in SAP B1

    Hi All, I have imported crystal report in SAP B1. In Parameter screen there are 3 parameters.(From Date, To Date and Location). In that Location should have values from OLCT table. How can i fill that location text with location name without FMS.

  • Interface required to post invoice in EBP system in SRM4.0

    We are using classic scenario in SRM 4.0 with non-sap backend system. We are in process to develop a interface , which can post invoice automatically in EBP system after getting data from non- sap backend system.  Could anyone please answer the follo

  • How to Initialize a workflow from Application using CIS

    Hi, I am new to the (Stellent) UCM, And could not find a way to initialize a workflow from CIS, Someone's help is greatly appreciated. All i can find in forums about the workflow with in the Stellent Interface. But No one talking about how to initial

  • Best way to mark data that has changed when it is edited in  a spark datagrid?

    I am not sure if this is the best way to mark data that has changed (isModifiedClientSide ) when it is edited in  a spark datagrid: <GridColumn  width="140" headerText="Margin "dataField="margin" editable="false"  editable.editMode="true"  >