Unable to read http response from servlet (on nokia 6630 device)

I am sending a http GET request to a servlet for getting some response. Though I am able to obtain the response when I run my j2me app on sony phone I am not able to get any response in case of nokia. On being asked for the APN on nokia I do select the correct one and my settings are correct too. Moreover I am able to connect to the servlet without any problems from my nokia device. However when I tried to read from the Input stream the value returned by read() is -1.
The code works fine on emulator also. Here is the code snippet being used by me. Plz help me solve this problem. Your response shall be definitely appreciated by me.
Code in servlet:
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {       
        String t_username = request.getParameter("user");
        String t_password = request.getParameter("pass");
        URL url = new URL("http://somehost:80/query.cgi?serv=s1&user=" + t_username + "&pass=" + t_password);
        HttpURLConnection head = (HttpURLConnection)url.openConnection();
        head.connect();
        int contentLen = head.getContentLength();
        System.out.println("content length = " + contentLen); //here I get some content length value as expected
        BufferedReader in = new BufferedReader(new InputStreamReader(head.getInputStream()));
        StringBuffer sb = new StringBuffer(contentLen);
        String data = null;
        final String NEWLINE = "\r\n"; //acts as delimiter for parsing response later in my j2me code
        while((data = in.readLine()) != null)
            sb.append(data).append(NEWLINE);
        sb.append(NEWLINE);
        in.close();
        PrintWriter out = response.getWriter();
        out.print(sb.toString());
        out.flush();
        out.close();
        head.disconnect();
    }Code in J2ME:
public static byte[] readFromHttpConnection(String p_URL) throws ConnectionNotFoundException, IOException {
        if(p_URL.startsWith("http://") || p_URL.startsWith("https://")) {
            HttpConnection c = null;
            DataInputStream dis = null;   //tried using InputStream also...still value returned by read() is -1
            c = (HttpConnection)Connector.open(p_URL);
            c.setRequestMethod(HttpConnection.GET);
            c.setRequestProperty("Content-Type", "application/octet-stream");
            dis = c.openDataInputStream();   //able to open this stream
            int len = (int)c.getLength();    //here i get len as -1 for both sony and nokia
            byte[] t_data = null;
            if(len > 0)
                t_data = new byte[len];
                int offset = 0;
                int numRead = 0;
                while((numRead = dis.read(t_data, offset, t_data.length-offset)) > 0) {
                    offset += numRead;
            else //since i get content length as -1 for both sony and nokia, this block is executed, and though
                   //I am able to read data on sony on nokia read() returns value -1 from the start itself
                ByteArrayOutputStream bs = new ByteArrayOutputStream();
                int ch;
                while((ch = dis.read()) != -1)
                    bs.write(ch);
                t_data = bs.toByteArray();
            dis.close();
            c.close();
            dis = null;
            c = null;
            return t_data;
        return null;
    }Edited by: alprazolam on Oct 16, 2007 6:02 AM
Edited by: alprazolam on Oct 16, 2007 6:04 AM
Edited by: alprazolam on Oct 16, 2007 6:07 AM

Strange, this should be fine. You might want to try a more efficient (and shorter and faster) read code:
byte[] buffer = new byte[512];
ByteArrayOutputStream  = new ByteArrayOutputStream();
int b;
while((b=dis.read(buffer))!=-1){
  bs.write(buffer,0,b);
t_data = bs.toByteArray();No need to check for content length, and always fast. I hope this helps...

Similar Messages

  • Unable to read SEARCH response from backend server

    Currently we have problem when searching huge amounts of users against new SunOne Directory Server v6.3
    in production and acceptance.
    [17:12:43] root@ecdiala03-2[!]# /opt/app/sun/ds6/bin/dsadm -V
    [dsadm]
    dsadm : 6.3 B2008.0311.0058 NAT
    [slapd 64-bit]
    Sun Microsystems, Inc.
    Sun-Java(tm)-System-Directory/6.3 B2008.0311.0058 64-bit
    ns-slapd : 6.3 B2008.0311.0058 NAT
    Slapd Library : 6.3 B2008.0311.0058
    Front-End Library : 6.3_MTR_5087249_1_20081209 B2008.1210.1821
    ==============================================================
    It’s not working while searching huge amounts of users against DPS.However, It’s working while searching huge amounts of users against DS.
    Below is the error from access log of DPS when the problem occurred.
    ==================================
    31/Mar/2009:14:08:17 +0200] - CONNECT - INFO - conn=4565433 client=153.88.247.15:2719 server=ecdiala03-1:389 protocol=LDAP
    [31/Mar/2009:14:08:17 +0200] - PROFILE - INFO - conn=4565433 assigned to connection handler cn=default connection handler, cn=connection handlers, cn=config
    [31/Mar/2009:14:08:17 +0200] - OPERATION - INFO - conn=4565433 op=0 BIND dn="uid=itimadm1,ou=system accounts,o=ericsson" method="SIMPLE" version=3
    [31/Mar/2009:14:08:17 +0200] - SERVER_OP - INFO - conn=4565433 op=0 BIND dn="uid=ITIMADM1,ou=system accounts,o=Ericsson" method="SIMPLE"" version=3 s_msgid=17 s_conn=ecditna03-2:72725
    [31/Mar/2009:14:08:17 +0200] - SERVER_OP - INFO - conn=4565433 op=0 BIND RESPONSE err=0 msg="" s_conn=ecditna03-2:72725
    [31/Mar/2009:14:08:17 +0200] - PROFILE - INFO - conn=4565433 assigned to connection handler cn=BindDone,cn=connection handlers,cn=config
    [31/Mar/2009:14:08:17 +0200] - OPERATION - INFO - conn=4565433 op=0 BIND RESPONSE err=0 msg="" etime=0
    [31/Mar/2009:14:08:17 +0200] - OPERATION - INFO - conn=4565433 op=1 msgid=2 SEARCH base="ou=External,o=Ericsson" scope=2 filter="(objectclass=inetorgperson)" attrs="*"
    [31/Mar/2009:14:08:17 +0200] - SERVER_OP - INFO - conn=4565433 op=1 SEARCH base="ou=external,o=ericsson" scope=2 filter="(objectclass=inetorgperson)" attrs="*" s_msgid=18 s_conn=ecditna03-2:72725
    [31/Mar/2009:14:12:25 +0200] - OPERATION - INFO - conn=4565433 op=1 SEARCH RESPONSE err=1 msg="Unable to read SEARCH response from backend server : Timeout when waiting to read from input stream" nentries=33959 etime=248309
    [31/Mar/2009:14:17:25 +0200] - DISCONNECT - INFO - conn=4565433 reason="other" msg="Exception caught while polling client connection LDAP.153.88.247.15.2719 -- java.io.IOException: Connection reset by peer"
    ================================
    >>
    > > [15:12:29] root@ecdiala03-1[!]# ./dpadm -V
    > >
    > > [dpadm]
    > >
    > > dpadm :
    > >
    6.3_PD_COMBO_CUMULATIVE_VIRTUAL_15112008_ED2.0+6774589+6780423+6778308+6782659_2
    > > B2008.1212.0459 NAT
    > >
    > >
    > >
    > > [DPS]
    > >
    > > Sun Microsystems, Inc.
    > >
    > >
    Sun-Java(tm)-System-Directory-Proxy-Server/6.3_PD_COMBO_CUMULATIVE_VIRTUAL_15112008_ED2.0+6774589+6780423+6778308+6782659_2
    > > B2008.1212.0436
    > >
    > > =================

    We have changed the value of data-source-read-timeout in DPS from 20s to 30m.As per application test, the "time out" error has gone, but we get a new error as following.
    ==========================
    [27/Apr/2009:05:28:36 +0200] - SERVER_OP - INFO - conn=209469 op=8 SEARCH base="ou=internal,o=ericsson" scope=2 filter="(objectclass=ericssonInternal)" attrs="EriCA-AttesterNL EriCA-EmploymentForm EriCA-KeyRecoveryNL-Auth EriCA-NL-Auth EriCA-NLOTP-Admin EriCA-NLOTP-User EriCA-accountExpires c cn departmentNumber description displayName eriCompanySynch eriCountry eriCountryCode eriEmployeeStatus eriExpired eriIsManager eriMasterDomain eriOpOrgUnitAbbreviation eriOpOrgUnitIdentifier eriOpOrgUnitName eriOperationalManager eriPartner eriPartnerTrigram eriPwSynchDate eriSignType eriSignum eriSignumStatus facsimileTelephoneNumber givenName isMemberOf l mail memberOf mobile objectClass ou sametimebrowseldap sametimehomeserver sametimeuser smChallResp smDisabled smXauthRADIUSServer sn telephoneNumber title uid uidNumber " s_msgid=27 s_conn=ecditna03-2:8645
    [27/Apr/2009:06:06:23 +0200] - SERVER_OP - INFO - conn=209469 op=8 SEARCH RESPONSE err=0 msg="" nentries=236367 s_conn=ecditna03-2:8645
    [27/Apr/2009:06:06:23 +0200] - OPERATION - INFO - conn=209469 op=8 SEARCH RESPONSE err=0 msg="" nentries=236367 etime=2266483
    [27/Apr/2009:06:11:27 +0200] - DISCONNECT - INFO - conn=209469 reason="other" msg="Exception caught while polling client connection LDAP.153.88.247.15.4862 -- java.io.IOException: Connection reset by peer"
    ================
    Each time while application client (153.88.247.15) connecting DPS to read, they will exit with “connection reset” error.
    Could you please kindly give us some suggestion if this error is realted to the DPS?

  • Unable to get the response from dynamic partnerlink

    Hi
    I used dynamic partnerlink, in this i am able to invoke the services dynamcially but i am unable to get the response from the services which i had invoked dynamically. In my dynamic partnerlink wsdl i had included callback binding and call back service in the wsdl you can see them below
    <binding name="LoanServiceCallbackBinding" type="tns:LoanServiceCallback">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="onResult">
    <soap:operation soapAction="onResult" style="document"/>
    <input>
    <soap:header message="tns:RelatesToHeader" part="RelatesTo" use="literal" required="false"/>
    <soap:body use="literal"/>
    </input>
    </operation>
    </binding>
    <service name="LoanServiceCallbackService">
    <port name="LoanServiceCallbackPort" binding="tns:LoanServiceCallbackBinding">
    <soap:address location="http://openuri.org"/>
    </port>
    </service>
    please help me on this
    thanks
    Srikanth

    Hi, thanks for the input
    Actually My partnerLink had two messageTypes one for Input message request and the other for the Output message request and for the input message i had used the operation as initiate also for the output messsage type operation as result.For both of them binding is defined.
    With these am passing the values from myBPELl to the service which am nvoking dynamically but unable to capture the response the variables are local to myBPEL.

  • Unable to deserialize HTTP response content - SharePoint Designer Call Web Service Workflow Activity

    I am creating a workflow using SharePoint Designer 2013 and I'm using the call HTTP web service action.
    The web service call works (it is for a text messaging service, and I get the text message to my phone) however the workflow stops at this point with internal status "suspended" and gives the error message below when clicking on the "i"
    icon.
    I have tried setting the Accept and Content-Type request headers to "application/json; odata=verbose" (minus the quote marks) as other posts suggested but this doesn't make a difference (e.g. here: https://social.msdn.microsoft.com/Forums/windowsapps/en-US/f0b18411-87d1-466b-aab0-1a0093605ed4/workflow-cannot-read-json-after-latest-sp15-patches?forum=sharepointdevelopment).
    I tried adding in the Content-Length header too but that made no difference.
    I tested calling another web service (https://sharepointurl/_api/contextinfo) and this works fine.
    Is there any way to get the workflow to accept this XML as the response? I don't actually really need anything out of the response content, but I do need the workflow to carry on after this step and carry out other activities after this call.
    Error message:
    Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.IO.InvalidDataException:
    Unable to deserialize HTTP response content. Expected ContentType : 'application/json', 'text/plain' or 'text/html', Received ContentType : 'text/xml'. Content (truncated) : '<?xml version="1.0" ?><outbound-message-delivery messageId="35d60bd2-a829-4382-8189-7a74de2d1cca"
    isError="false"><recipient msisdn="6427xxxxxxx" isError="false"></recipient></outbound-message-delivery>'. ResponseStatusCode : 'OK' Request Uri : 'https://www.txtserviceurl.co.nz/api/3/sms/out?to=6427xxxxxxx&body=test+from+workflow'
    at Microsoft.Activities.Messaging.SendHttpRequest.OnReceiveResponse(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)
    at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) Exception from activity SendHttpRequest HttpPost Switch<String> Sequence Microsoft.SharePoint.WorkflowServices.Activities.CallHTTPWebService
    Stage 1 Sequence Flowchart Sequence Testing 

    Hi,
    Thank you for your post.
    I'm trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact 
    [email protected]
    Lisa Chen
    TechNet Community Support

  • Tomcat unable to read accented characters from MySQL

    Folks,
    Can anyone help with me this problem?
    It seems that my version of Tomcat is unable to read accented characters from my MySQL Database.
    I've checked in the Database and the characters are all correctly represented there. But when, in my servlet code, I do:
    String author = results.getString("author_surname");If the String contains any accented character then the character shows as a '?'. (Even before it gets to the JSP - I'm writing the results straight to catalina.out).
    Looking around these forums I found that some people suggested adding
    ?useUnicode=TRUE&characterEncoding=UTF-8;to the end of my jdbc url. As in:
    <ResourceParams name="jdbc/connection">
    //a whole load of other params
      <parameter>
        <name>url</name>
         <value>jdbc:mysql://localhost:3306/bookshop?useUnicode=TRUE&characterEncoding=UTF-8</value>
      </parameter>
    </ResourceParams>inside my server.xml
    But it doesn't seem to make any difference. In addition, I doubt I even need to use Unicode as the accents I need are only: ����� etc.
    (Incidentally, writing that line into my server.xml, tomcat complains that it should finish with a semi-colon. Is that correct? Even if I put in the semi-colon, it still complains!!)
    Any suggestions on this would be much appreciated. Thank you.

    user13109986 wrote:
    HI,
    From http://download.oracle.com/docs/cd/B10501_01/server.920/a96529/ch9.htm
    My understanding is the JDBC Api converts the string from the database to UTF-16.. If so is there any way to disable the UTF-16 encoding at JDBC API?That's exactly what it's supposed to do. There isn't even any concept of what it would mean to disable that: Java characters are UTF-16 representations of Unicode code-points, so there isn't anything else it could do.
    I still suspect the JDBC part is working correctly and your writing-to-file isn't. I found this quote in the Wikipedia article on Windows-1256:
    Windows-1256 is a code page used to write Arabic (and possibly some other languages that use Arabic script, like Persian) under Microsoft Windows. This code page is not compatible with ISO 8859-6 and MacArabic encodings.So was there a particular reason you chose Cp1256 and not ISO-8859-6 as the charset to write to the file with?

  • 2013 Exchange, Can't connect to Exchange Management Shell. It cannot determine the content type of the HTTP response from the destination computer.

    The following error occurs.
             Welcome to the Exchange Management Shell!
    Full list of cmdlets: Get-Command
    Only Exchange cmdlets: Get-ExCommand
    Cmdlets that match a specific string: Help *<string>*
    Get general help: Help
    Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
    Show quick reference guide: QuickRef
    Exchange team blog: Get-ExBlog
    Show full output for a command: <command> | Format-List
    Tip of the day #0:
    Did you know that the Identity parameter is a "positional parameter"? That means you can use:
     Get-Mailbox "user" instead of: Get-Mailbox -Identity "user"
    It's a neat usability shortcut!
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Exception calling "GetComputerSite" with "0" argument(s): "The Specified directory object cannot be found."
    At C:\Program Files\Microsoft\Exchange Server\V15\bin\ConnectFunctions.ps1:164 char:2
    +     $localSite=[System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetC ...
    +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ActiveDirectoryObjectNotFoundException
    Failed to connect to an Exchange server in the current site.
    Enter the server FQDN where you want to connect.: mail1.dorothy.local
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Randy Cheek

    Good Morning,
    Log into the server with an account that has appropriate Exchange rights, not a local account.  
    Note: By default - Domain Admins don't have Exchange rights.
    Dame Luthas, ITILv3, MCSE Messaging 2013, MCSA, MCITP
    My Technical Blog: http://thelifestrategist.wordpress.com
    Discipline is the Difference between Goals and Accomplishments
    If this post is useful, please hit the green arrow on the left & if this is the answer hit "mark as answer"

  • ASDM is unable to read the configuration from ASA.

    Earlier today I was configuring the Cisco ASA (7.2(2)) using the ASDM, but after a reboot of the appliance I now get the following:
    ASDM is unable to read the configuration from ASA.
    This happens shortly after ?Loading running configuration from the device? appears in the ASDM status window.
    I have tried restarting both the appliance and my workstation, but the issue persists. I have also tried clearing the ASDM cache, but that doesn?t help either. The issue occurs whether I used the Cisco ASDM Launcher or the web interface.
    SSH access to the appliance works fine.
    Thanks for any assistance (why is it that Cisco?s GUIs always have issues?!?).

    I have exactly the same issue , SSH works fine but ASDM and Web interface reply with that error message "ASDM is unable to read the configuration from ASA".
    My ASA is a 5520 ver 7.1(2) with ASDM 5.1(2)
    Could it be something related to Java ?
    Thanks for any hint.

  • Thread will hang if no http response from TP

    i found out 1 case that Oracle B2B thread will hang if it does not receive HTTP reponse from TP after posting messages to TP.
    we use Async MDN.
    example 1:
    i send ORDERS to TP and expect HTTP response to close the transaction but my TP failed to send HTTP response due to proxy problem. then that particular thread will remain like that forever and no timeout.
    example 2:
    i receive ORDERS from TP and send the MDN back to my TP, again the thread will hang forever if no HTTP response from TP.
    eventually all the thread will hang and no more messages can be process, then i have to restart the B2BService to clean all the hanged thread.

    Please get us the b2b.log. And, information like midtier shiphome (version) used also would help.
    If you are running it on linux, please recreate the scenario and get a thread dump. Here's the command,
    kill -3 <B2BServer process id>
    You could reach me at [email protected]
    Thanks,
    Sinkar

  • How to see http response from an axis web service call (Eclipse)

    Hello,
    I would like to see the raw http response which is returned from web service calls. I have a dynamic web project in Eclipse which uses a local instance of Tomcat 6. I'm using all of the default setting for a top-down web service generated from a WSDL file. I've generated the client using the built-in "generate client" using default settings.
    I've tried using the Eclipse plugin TCP/IP monitor and apache's TCPMON, but I am only able to see the http request, not the http response returned from the web server I am querying.
    I've seen some sparse documentation outlining how to use logging handlers and a client-config.wsdd file, but I haven't been able to get that working.
    So to recap, I'm looking for a way to view raw http responses using a web service client and server generated from a WSDL file in eclipse. I don't mind creating a new project using different code-generating libraries if someone has an easy way to do this using a different configuration.
    Thanks very much,
    Craig

    908794 wrote:
    Hello,
    I would like to see the raw http response which is returned from web service calls.Why the HTTP response? Isn't the soap message body enough? If it is, you probably want to check out SoapUI.
    A simple google query for "apache axis2 http response" also return this article:
    http://blogs.cocoondev.org/dims/archives/004668.html
    And finally, you did go through the Axis2 website right? It has a wiki with a rather staggering amount of articles in there.
    http://wiki.apache.org/ws/FrontPage/Axis2/

  • How to read the response from the request made from teh client using java

    Hi All,
    I am using the following code to connect to the sever .
    HttpRequest httpRequest     = new HttpRequest();
    httpRequest.setMethod(method);
    if( null == uri )
    uri = "";
    httpRequest.setURI(myReplaceAll(uri, ' ',"%20"));
    httpRequest.setHeader(CONTENTTYPE, CONTENTTYPE_XML);
    httpRequest.setHeader(TRANSLATE, "f");
    httpRequest.setBody((String) null);
    IResponse httpResponse = null;
    try
    httpResponse = getRequester().perform(httpRequest);
    int httpStatus= response.getStatus();//get the response code
    I want to read the response stream that will be returned from this connection.
    Can you please help me in this case.
    Thanks and Regards,
    Anamika Mazumder.

    IResponse provides getDocument() (for XML) and getStream() (otherwise). Only one of them will work; I don't recall how it chooses. See http://help.sap.com/javadocs/NW04s/current/km/com/sapportals/wcm/util/http/HttpRequest.html#expectsResponseDocument(boolean).
    And, btw, do not construct URIs by text replacement; there are proper URI parsing/generator classes for this purpose in KM.

  • HTTPS connection from servlet to another webserver

    Hi,
    We want to make a https connection from a servlet in weblogic server to another
    web server (not necessarily weblogic). We also need dual authentication. But whenever
    we use URL.openConnection(), it always returns us weblogic's internal https and
    SSL implementation. Since weblogic has no documentation about how to use these
    internal classes, such as how to set trusted server certificate, and how to set
    client certificate (servlet is a client of another web server). We want to use
    jsse, after setting JSSE required system properties, I still get a weblogic's
    httpsURLConnection. Can any of you tell me how to resolve this issue?
    Thanks.
    Xinshi

    Yeah, I'm using JSSE now. Here is what I did:
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provide());
    Provider prov = new SimpleSecureProvider();
    prov.setProperty("SecureRandom.efficient", "test.EfficientSecureRandom");
    Security.insertProviderAt(prov, 1);
    You don't really need the provider stuff to get the example working. I use it
    to get around a quick in JSSE where the random number generator takes 15-30 seconds
    to generate a random sequence at start up.
    SimpleSecureProvider looks like this:
    public class SimpleSecureProvider extends Provider
    public SimpleSecureProvider()
    super("SimpleSecureProvider-", 1.0, "Hack to enable more efficient random
    seed generator");
    test.EfficientSecureRandom is bascially an exact copy of Sun's SecureRandom.java
    with the only difference that I used my own random number generator.
    Anyway, rest of the code you need looks like this:
    URL url= new URL("htps://someplace.com");
    URLConnection sconnection = url.openConnection();
    Do whatever.
    I also stored jcert.jar, jnet.jar, jsse.jar in /usr/java/jdk1.3/lib/ext
    I think that is everything.
    I just noticed that service pack 9 has a security example that does not require
    all these jsse hacks. I'm trying to get it to work, but not having much luck.
    Anybody got this working right?
    "Jayesh Patel" <[email protected]> wrote:
    See if this works,
    1. Add the 'j2ee.jar' to CALSSPATH in weblogic startup script.
    2. Set the property SSLHandlerEnabled flase in config.xml
    3. Add the following property permission to the
    weblogic.policy' file under a 'grant' directive
    for all codebases (bottom): 'permission java.security.AllPermission'
    4. Use the following bit of source code to create an https connection:
    import com.sun.net.ssl.*; ....
    com.sun.net.ssl.HttpsURLConnection connection;
    System.setProperty ("java.protocol.handler.pkgs",
    "com.sun.net.ssl.internal.www.protocol");
    java.security.Security.addProvider(new
    com.sun.net.ssl.internal.ssl.Provider() );
    URL url = new URL( "https", hostname, query );
    -Jayesh
    connection = (com.sun.net.ssl.HttpsURLConnection )url.openConnection(
    "Xinshi Sha" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    We want to make a https connection from a servlet in weblogic serverto
    another
    web server (not necessarily weblogic). We also need dual authentication.But whenever
    we use URL.openConnection(), it always returns us weblogic's internalhttps and
    SSL implementation. Since weblogic has no documentation about how
    to
    use
    these
    internal classes, such as how to set trusted server certificate, andhow
    to set
    client certificate (servlet is a client of another web server). Wewant to
    use
    jsse, after setting JSSE required system properties, I still get aweblogic's
    httpsURLConnection. Can any of you tell me how to resolve this issue?
    Thanks.
    Xinshi

  • TMS 14.3.2 - No HTTPS Response from devices (again) - Looks like permissions issues (but possibly down to NetBIOS over TCP/IP)

    Hi All,
    Sometime ago I posted regarding an issue I was seeing on our TMS , where most of the remote devices seemingly showed up as loosing remote connection (no HTTPS Response - https://supportforums.cisco.com/discussion/12290956/tms-lost-https-communciation-devices-not-really). However, I could not figure out the root cause of the error, and now I have managed to break things again - probably due to a Java upgrade which broke TMSPE (see https://supportforums.cisco.com/discussion/12404166/looks-latest-update-java-8-update-31-will-break-tmspe-11).
    However, I thought I would look at little more closely this time to see if I could figure out the problem.
    I am seeing a lot of entries in the Security Log in TMS that seem to indicated that my the account used from a TMSPE connection has a bad or invalid password (this is set in "Administrative Tools --> Configuration --> Provisioning Extension Settings", but this password is correct (I can log into TMS with this account, and reset and restarted services etc).
    The computer attempted to validate the credentials for an account.
    Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
    Logon Account: tmspeconnect
    Source Workstation: TMS
    Error Code: 0xc0000064
    and
    An account failed to log on.
    Subject:
    Security ID: IIS APPPOOL\TMSNet40AppPool
    Account Name: TMSNet40AppPool
    Account Domain: IIS APPPOOL
    Logon ID: 0x214b6
    Logon Type: 8
    Account For Which Logon Failed:
    Security ID: NULL SID
    Account Name: tmspeconnect
    Account Domain: TMS
    Failure Information:
    Failure Reason: Unknown user name or bad password.
    Status: 0xc000006d
    Sub Status: 0xc0000064
    Process Information:
    Caller Process ID: 0x860
    Caller Process Name: C:\Windows\SysWOW64\inetsrv\w3wp.exe
    Network Information:
    Workstation Name: TMS
    Source Network Address: 127.0.0.1
    Source Port: 62114
    Detailed Authentication Information:
    Logon Process: Advapi
    Authentication Package: Negotiate
    Transited Services: -
    Package Name (NTLM only): -
    Key Length: 0
    This event is generated when a logon request fails. It is generated on the computer where access was attempted.
    The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.
    The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).
    The Process Information fields indicate which account and process on the system requested the logon.
    The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.
    The authentication information fields provide detailed information about this specific logon request.
    - Transited services indicate which intermediate services have participated in this logon request.
    - Package name indicates which sub-protocol was used among the NTLM protocols.
    - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.
    I just wanted to check this like file/folder NTFS permissions, or any specific IIS permission . Is there a list of NTFS folder permissions for which the TMS required with regard to the "IIS APPPOOL", and perhaps what may need to be check in IIS?
    Oddly, the error list above refers the our "TMSPEConnect" account from the TMS domain, however this is incorrect - TMS is the machine name. Still we ARE seeing similar error which reference the actual domain name, such as:
    An account failed to log on.
    Subject:
    Security ID: IIS APPPOOL\TMSNet40AppPool
    Account Name: TMSNet40AppPool
    Account Domain: IIS APPPOOL
    Logon ID: 0x49e55
    Logon Type: 8
    Account For Which Logon Failed:
    Security ID: NULL SID
    Account Name: tmspeconnect
    Account Domain: mydomain
    Failure Information:
    Failure Reason: Unknown user name or bad password.
    Status: 0xc000006d
    Sub Status: 0xc000006a
    Process Information:
    Caller Process ID: 0xb18
    Caller Process Name: C:\Windows\SysWOW64\inetsrv\w3wp.exe
    Network Information:
    Workstation Name: TMS
    Source Network Address: 1.1.1.1 (changed external IP)
    Source Port: 47620
    Detailed Authentication Information:
    Logon Process: Advapi
    Authentication Package: Negotiate
    Transited Services: -
    Package Name (NTLM only): -
    Key Length: 0
    This event is generated when a logon request fails. It is generated on the computer where access was attempted.
    The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.
    The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).
    The Process Information fields indicate which account and process on the system requested the logon.
    The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.
    The authentication information fields provide detailed information about this specific logon request.
    - Transited services indicate which intermediate services have participated in this logon request.
    - Package name indicates which sub-protocol was used among the NTLM protocols.
    - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.
    Idea welcome.
    Cheers
    Chris

    Hi all,
    After a long a fraught weekend trying to fix things, I am not that much further on, but I am beginning to understand what it isn't........ I think :(
    It looks as though the "DatabaseScanning" service, or anything that runs under the credentials of the "nt authority\network service" seems to have a problem.
    The Audit log show lot of entries where services such as"TMSWebPublic" running under the ISS Application pool "tmsnet40apppool", and actions launched under our own credential appear to communicate just fine with the device, only for the 'network service' to time out the connection a short while later. The same goes for some (not all) of the Phone book updates, which also looks as though it runs under the credentials of the 'Network Service' account.
    26/01/2015 08:30:54
    nt authority\network service
    Update
    System
    our-ctrl1
    System status
    NoResponse
    TMSDatabaseScannerService
    26/01/2015 08:30:54
    nt authority\network service
    Update
    System
    our-ctrl1
    Connection status
    NoHTTPSResponse
    TMSDatabaseScannerService
    26/01/2015 08:29:06
    tmsnet40apppool
    Update
    System
    our-ctr1l
    System status
    Idle
    TMSWebPublic
    26/01/2015 08:29:06
    tmsnet40apppool
    Update
    System
    our-ctrl1
    Connection status
    OK
    TMSWebPublic
    However, I still don't know at this point is this is related to the actual TMS front end, something to do with the domain and policies that have been applied to TMS, or the actual database, or even just communication with the back end database??? I did try running the services under a domain user (service) account, but then ran into other issues as I couldn't log into TMS.
    BTW, removing TMS, and IIS and reinstalling did fix my second issue relating to the 'Communication Errors'.
    Chris

  • How to read http cookies from adobe desktop Air app using flex/flash builder in AS 3.0 ??

    Im developing Adobe desktop air app where i need to read the session id from the cookie of a http request.
    I have found a property called URLRequest.manageCookies supported by AIR so i Hope there should be a way to read the cookies as well. Im Using Flash Builder 4.5
    Please provide any reference code or guide me for this research;
    searched a lot regarding on this web.
    Most results lead to local shared object or reading cookies fr a webpage using javascript and ExternalInterface.
    I want to read http cookies not Local shared Object and in a desktop AIR application.
    Im using Flash builder 4.5
    Thanks
    Hari

    Sorry, but you are at the wrong forum; this one is only for discussions on the forums themselves. The Air forums are here:
    http://forums.adobe.com/community/air

  • XSL-FO unable to read special characters from the XML file

    Team,
    please help on issue, when trying to read the text from XML file (Special characters like bullet). It is displaying as Question mark(?) in output in place of bullet..please proved any soultion.

    The "?" signals a character set mismatch issue - http://www.oracle.com/technetwork/database/globalization/nls-lang-099431.html - between client and database software

  • Unable to read net files from Nikon D800

    purchased Nikon D800
    have cs5
    updated Adobe manager as suggested
    closed all adobe products
    Tried installing Adobe patch installer- Adobe 7.1 update,  
    Update Failed- not applicable for me
    Still cannot read NEF files, 
    I would like to read NEF files from Nikon D800 in bridge and photoshop.
    Any suggestions?  
    Thank you
    Karla Chouhan

    The D800 is supported in Camera Raw 7.1 and higher
    http://helpx.adobe.com/creative-suite/kb/camera-raw-plug-supported-cameras.html
    CS5 is not compatible with Camera Raw 7 and higher. You need CS6 (paid for upgrade or join the Adobe Cloud).
    http://helpx.adobe.com/x-productkb/global/camera-raw-compatible-applications.html
    Or stay with CS5 and use the free DNG converter to convert all D800 Raw files to DNG then edit the DNGs in Bridge and Photoshop
    http://www.adobe.com/products/photoshop/extend.displayTab2.html

Maybe you are looking for

  • How do I disable game center in macbook pro

    A couple of  apps I downloaded, a casino slot, want the game center to become involved.  I do not want to have anything to do with the game center. Other games e.g. solitaire card games do not cause the game center to pop up.  How do I disable this?

  • A brush pack i made can no longer be opened .

    made about 20 brushes and all were in one file , now pse says there is a program error and they cnnot be loaded , please explain this to me and explain why i have to pay for help when i already paid for a program that doesnt run right ... Yes i reboo

  • After being on for an hour FF starts using up to 1.6 GB of CPU

    This has been going on for a long time, but it is really annoying. I have to restart firefox all the time. If I don't it will just crash. The cpu use goes up to 1.6 GB and in general having more then 2 tabs makes it really slow [even with low cpu usa

  • Flash player plug in failure

    every day ( about every 3-5 hours ) my laptop freezes ...it usually starts on safari but has recently spread to applications like : itunes pages and even the desktop the screen goes all pixelated and a vertical section (the middle ) locks on that app

  • SPED inbound delivery creation, serial num not getting copied from out delv

    We enabled SPED to create inbound delivery against outbound delivery We observed Serial numbers are not getting copied from outbound delivery to inbound deliver can some one help Moderator message: Locked. Reason: duplicate. The new post: STO GR agai