Binary Socket Security

Hello,
The documentation is a bit sparse on what to do with binary sockets and the security model.  Particularily what it means to 'return a cross domain policy file' ( See Section 1.4.3 and 1.5.6 of Cross Domain Policy File Documentation http://learn.adobe.com/wiki/download/attachments/64389123/CrossDomain_PolicyFile_Specifica tion.pdf?version=1 )
This is what my socket server code looks like in PHP:
(PHP)
if (strcmp( substr($input,0,22), "<policy-file-request/>") == 0 ){              
     socket_write($socket,"<?xml version=\"1.0\"?>\n<!DOCTYPE cross-domain-policy SYSTEM\n\"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd\">\n<cross-domain-policy>\n<allow-access-from domain=\"*\" to-ports=\"4041\"/>\n</cross-domain-policy>\n\n");
When I run my AS3 code
var socket:Socket = new Socket();      
socket.endian = Endian.BIG_ENDIAN;
socket.addEventListener(Event.CLOSE, close);
socket.addEventListener(Event.CONNECT, connected);
socket.addEventListener(IOErrorEvent.IO_ERROR, io_error );
socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, security_error );
socket.addEventListener(ProgressEvent.SOCKET_DATA, socket_data);   
socket.addEventListener(Event.DEACTIVATE, close);
socket.timeout = 3000;
socket.connect(host,4041);      
The client does ask for the security file,  but after the server writes the security file to the socket the client socket shuts down and returns a security error.
What am I doing wrong?  Should the server be outputting a URL where the crossdomain.xml is located instead?  I don't understand what nuance I am missing.
Could someone please explain what I am missing?
Thanks

My problem was that I was sending binary data through the socket previous to sending the policy file.  I just sent the policy file immediately upon connect and everything worked out fine.   I had to add a chr(0) to the end of the policy file as well.
Thanks for your time.

Similar Messages

  • Socket security layer for 8330 curve

    With no warning my company added socket security layering on our e-mail exchange server.  Now all of us with blackberries cannot receive our mail on our phone.  I have a 8330 curve.  I'm not able to figure out if there is a setting for this.  Please help!

        Hi Mike8330!
    I'm sorry to learn of these error messages! Let's get to the bottom of this, OK? You have "8330" in your screen name, so I'm assuming you have the Curve 8330?  I did a little research on the error code you're receiving, and I recommend a master reset of the device, so the error code goes away. Here are the steps:
    http://vz.to/19ILeEB
    Please let me know how this goes for you, I'd like to make sure you're no longer having this issue.
    Have you checked out the new Blackberry devices we offer? Ready to upgrade? Just dial #UPG send to check your upgrade eligibilty. Check out our line up here: vzw.com/products
    Thank You,
    ChristinaB_VZW
    VZW Support
    Follow us on Twitter @VZWSupport

  • Socket security issues

    Hello,
    I am developing an messaging application, similar to MSN or AIM. so only text messages are passed over a socket.
    Does anybody know of any socket security issues there are when opening a socket on a particular port in java?
    If so then does anybody know if there is any documentation out there that i can look at?
    Thanks

    psamatt wrote:
    Hello,
    I am developing an messaging application, similar to MSN or AIM. so only text messages are passed over a socket.
    Does anybody know of any socket security issues there are when opening a socket on a particular port in java?
    If so then does anybody know if there is any documentation out there that i can look at?
    Simple sockets are wide open - there is no security. Secure sockets are implemented as a layer on top of simple sockets using JSSE - http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html .

  • Connect to POP server using Binary Sockets

    Hi there,
    I've just been following the (as of today) latest tutorial on
    http://www.gotoandlearn.com
    about "Binary Sockets" and this all works fine and dandy using
    "leebrimelow.com, 110" for the socket connection (full code below).
    But when I try my own domain "storm-media.co.uk, 110" I get
    the following error message....
    Error #2044: Unhandled IOErrorEvent:. text=Error #2031:
    Socket Error.
    at Pop3_fla::MainTimeline/frame1()
    But if I try using my own gmail account "gmail.com, 110" (or
    "googlemail.com, 110") nothing happens? It just sits there and
    doesn't do anything?
    Any ideas?
    Thanks in advance!
    Kind regards,
    M.

    Thanks for the reply, I changed it to pop3.storm-media.co.uk
    and I managed to connect to the pop server.
    But now I'm onto the next stage of my problem.
    When I run the below code I get a response back from the
    server that says...
    +OK POP3 server ready
    <112d3161-ee1b-4535-a82e-ff63a1d3075a>
    ...but after that nothing happens, even though I'm sending
    another command (in this case my username) to the server to respond
    to?
    Any ideas why the server would not be sending a response?
    My updated code is attached.
    Many thanks for your help so far.
    Kind regards,
    M.

  • Binary Socket Connection Interruption? bytes lost?

    Hi,
    I am starting with a short introduction: I am currently working on a project, which involves a server application written in .NET (C#) and a flash gui app as client (standalone flash player 10 [code is written in Actionscript 3.0]). The server constantly sends bitmaps to the client (up to 30fps). The connection is established using binary sockets and data ist streamed to avoid socket open/close/reconnection problems.
    The bitmaps sent to the client are marked with begin- and end-tags. A length field was added as well, to optimise the following parsing process. The client buffers the received data up to the point where an end-tag is found. The client reassambles the bitmaps on the screen by parsing the current buffer. Parsing means looking for begin-tags and length fields and/or end-tags of pictures packages. The resulting bitmap data is copied into a byte array and will loaded into a movieclip using the flash.display.Loader class ( bytePictureLoader.loadBytes( byteArray ); ).
    Basically looks/works like this:
    [SERVER]--->[BEGIN-TAG][LENGTH][BITMAPDATA][END-TAG]-[BEGIN-TAG][LENGTH][BITMAPDATA][END-T AG]-...--->[CLIENT]
    While testing, I found out that in some cases the data stream becomes currupted, i.e. data is lost and/or the transmittion is incomplete.
    A good thing is that this error is reproducable.
    It seems that as soon as the Flash Application Window is dragged (moved on Windows Desktop) the stream lacks data.
    The same error occurs, if too much data is sent to the client. The results are performance problems, data loss and other strange effects. The more data is sent on the stream, the more data has to be parsed and the more data gets lost somehow. Sometimes this leads to a memory problem, because Begin- and End-Tags aren't transmitted correctly. In order to fix (counteract) that, I discard data as long as there is no Begin-tag found and the buffer is cleared when the size exceeds 1Mb.
    It works so far, but the application lacks performance and stability.
    I.e. If 20 bitmaps per second with 620x390px are sent to the client, the client only receives 16 to 17 bitmaps, if the application does nothing else.
    If 30 bitmaps per second with 620x390px are sent to the client, the client only receives about 20 to 21 bitmaps.
    I am wondering, if there is actually a better solution the solve this problem.
    I am guessing that using actuall video streams would be better, then sending one bitmap at a time in a byte stream.
    Is there a proper example on how to build a client app in flash to receive/parse a binary data stream??
    Does anyone else has recognized the lost-data problem or the interruption of streams?? And is there a solution to this problem?
    thanks a lot for your attention hope you can help me out here!
    cu
    Tobi

    Hi Hakan,
    thx, but this doesn't work. I think flash struggels with the amount of data to parse. I tested sending images twice, but now i receive only 9 to 12 bitmaps out of 25 bitmaps sent.
    Strange thing is, the problem only occurs if the flash player is maximised. As soon as I minimize the flash player window, the parsing works fine, but the image is not being loaded. Guess that's a performance feature of the flash player to not render actuall screen elements as long as the windows window of the flash player is not visible.

  • Problem with socket security

    Hi,
    I'm trying to make socket connection from within air application, but no way. I'm browsing google for almost 2 days, follow all possible solutions, but avidently I dont understund somthing cause I'm not able to do anything.
    Every time sandbox security violation.....  I need make some simple socket data exchange between my air, and OS. I do not have any web server and no any other kind of network ability. I write down stupid socket server, which is waiting for policy request, and for my other requests (it function 100%, tested with Telnet, so no way to have problem on my socket server side).
    The strange thing is that my application do not produce any request for socket policy file, neither at 843 port (for default), neither at my custom location with namual
    Security.loadPolicyFile("xmlsocket://ip:port"); call
    This is my primitive code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical">
        <mx:Script>
            <![CDATA[
                private var s:XMLSocket = null;
                private function test():void{
                    Security.loadPolicyFile("xmlsocket://127.0.0.1:25013");
                    if(!s){
                        s = new XMLSocket();
                        s.addEventListener(DataEvent.DATA, onData);
                        s.addEventListener(Event.ACTIVATE, onActivate);
                        s.addEventListener(Event.CONNECT, onConnect);
                        s.addEventListener(Event.DEACTIVATE, onDeactivate);
                        s.addEventListener(IOErrorEvent.IO_ERROR, onError);
                        s.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurity);
                    s.connect("127.0.0.1", 25013);
                private function onActivate(e:Event):void{
                    debug.text += "Activated\r";
                private function onConnect(e:Event):void{
                    debug.text += "Connected\r";
                    var o:XML = <request cmd="10"/>;
                    s.send(o);
                private function onDeactivate(e:Event):void{
                    debug.text += "Deactivated\r";
                private function onError(e:IOErrorEvent):void{
                    debug.text += e.text + "\r";
                private function onSecurity(e:SecurityErrorEvent):void{
                    debug.text += e.text + "\r";
                private function onData(e:DataEvent):void{
                    debug.text += e.data;
                    s.close();
            ]]>
        </mx:Script>
        <mx:Button label="Test" click="test()"/>
        <mx:TextArea id="debug" width="100%" height="100%"/>
    </mx:WindowedApplication>
    Any help will be apresciated.
    Ladislav.

    Hi,
    It pass some time but if i remember well, my problem was that i did
    not terminate stream output form my server vs air application, and it
    returns this security error.
    When I send  '\0' at the end of my message it work correctly. Yes the
    server was my own written socket server (c++ using boost libraries).
    Laco.
    Sorry late response I'm on hollydays
    Staney G ha scritto:
    So, how did you walk around the problem?  Did you have a control on how server responds?
    My test case failed similarly.  However, the target server is a public web service.
    Will appreciate your answers!
    >

  • Socket security error problem

    Hi all,
    My program is a client program using socket to connect to a
    server program. It is success to connect server in local PC. But
    when I deploy to IIS server, the client program would fail to
    connect to server program using browser to run it. It show
    SOCKET_SECURITY_ERROR, how can I solve it?
    I tired to add trusted.cfg in
    C:\WINDOWS\system32\Macromed\Flash\FlashPlayerTrust and
    C:\Documents and Settings\Lit\Application Data\Macromedia\Flash
    Player\#Security\FlashPlayerTrust. But it is fail too.
    Thanks

    Hi Flex-Issac,
    According to the new standards your server should be able to
    supply socket policy file on port 843.
    His means that when you create XMLSocket object and do
    connect() (no need in Security.loadPolicy() if policy file is
    located on the same server) FP tries to get policy file from the
    server.
    Server should be able to process the following request:
    <policy-file request/>\0
    and send back the policy file.
    After FP gets the file which allows the connection on the
    given port it makes the connection.
    You can see what is going on in the policy.log.
    How to turn the logging on is described here:
    http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_05.html#_Using_Logging
    So first thing you have to do - add more functionality to you
    server and serve this socket policy file.
    If you have more questions -you are welcome to ask. I am
    currently doing the same thing :)
    Cheers,
    Dmitri.

  • Air + sockets = security error

    Hello All,
    I'm trying to create a socket connection to a java progam locally, I'm able to connect to the java sockets locally with flex, but when I build Air with the same piece of code, I'm not able to go and get a connection, as it has security restrictions, I read somewhere that an application which is local to the file system, it cannot call sockets, but, how do I make it local to file system + networking? I mean atleast get the sockets to work?
    Thanks much!

    bump!

  • Socket Security Error 2048

    Hi,
    I'm trying to make a socket connection using AS3. I am aware
    of the new Security policies. I've read all the articles and set up
    a socket policy file server and a socket server to handle the
    socket.connect().
    Im calling
    Security.loadPolicyFile("xmlsocket://myhost.com:843") but
    continually get this message in the debugger:
    Error: Failed to load policy file from
    xmlsocket://myhost.com:843 // why did it fail?? the file is there
    and port is open
    and then:
    Error: Request for resource at xmlsocket://myhost.com:11500
    by requestor from
    http://myhost.com/myswf.swf
    has failed because the server cannot be reached. // why can't the
    server be reached?? the port is open
    I've made sure I have no firewall blocking the port, no
    SELinux enabled policies, and I've verified port 843 and 11500 are
    actually open using a custom php script.
    Also when I type nmap localhost port 843 shows up as open
    using tcp. It does however say that the service is unknown. I don't
    understand that since I have edited the /etc/services file and
    created the service "flashpolicy" in /etc/xinetd.d and restarted
    inetd using: /etc/rc.d/init.d/xinetd restart.
    Heres the string my socket policy file server is suppose to
    return when it receives <policy-file-request/> :
    <cross-domain-policy><site-control
    permitted-cross-domain-policies="master-only"/><allow-access-from
    domain="myhost.com" to-ports="11500"
    /></cross-domain-policy>\0
    Can anyone give me some clues as to what I'm doing wrong? I
    think I've read every article out there regarding this subject. I
    even see that there are two bugs listed for the flash player:
    http://bugs.adobe.com/jira/browse/FP-67
    and
    https://bugs.adobe.com/jira/browse/FP-269.
    But it seems likes someone out there has achieved socket
    connections with AS3.
    Thank You

    You might try to force Flash to load the policy file first:
    Security.allowDomain(“*”);
    Security.loadPolicyFile(“http://server.com/crossdomain.xml”);

  • AppletViewer Socket security policies in Netbeans -

    I'm developing a database applet using NetBeans IDE 4.0, jre 1.5.0. To make this easier, I set up a database server on my desktop with a dummy database to work with. I'm having a great deal of trouble getting the applet to connect to the database from AppletViewer. It throws the following error:
    java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
    I believe this is an applet security issue - the default of the JVM being not to allow connections to network resources located anywhere other than where the applet came from (or that are signed). The applet works ok if I move it over to the production web/db server, which confirms this suspicion. This is precisely the problem I was hoping to circumvent by setting up a db server on the localhost.
    I've tried changing the code to point the connection to "localhost", the fqdn, and the actual IP of the machine. This just gives me the expected respective versions of the same error message. I've also tried adding items to the java.policy, to no avail.
    I'm really hoping to be able to work on this thing without having to copy it over to the server and/or sign the applet every time I compile and test it. Any suggestions?

    No - the setup with the database on the local machine is just meant as a convenience while I'm developing it. When it's deployed all clients will hit the same DB, which is hosted on the same server that the web server serving the applet is on. This, actually, already worked. The trouble was with getting the local db to work while I'm developing.
    I actually figured out a workaround. NetBeans' built in webserver has to be configured in the runtime options to load its own policy file. I added the socket permissions to that file and reloaded the server. Now when I compile/run the applet fromt the IDE it works.
    Still doesn't work directly from the stand-alone AppletViewer, but this will do.

  • How To Avoid Socket Security Erros

    Hi,
    I have to connect to a remote IP camera server from flash through socket connections.
    It is working fine while testing in  Flash IDE, but not working when I upload to my server.
    I know it is due to security restrictions  that you cannot access other domains.
    Kindly suggest is there any other way to connect to the remote server to which u cannot add any cross domain files.
    If it is proxy route, suggest some of them.
    I have tried with RFC2417 socket  posted here
    http://blogs.adobe.com/cantrell/archives/2006/07/a_proxy-savvy_s.html
    I got Bad request error when i use this class.
    One of the friends in this forum suggested java proxy posted here
    http://coderslike.us/2009/01/23/flash-socket-code-and-crossdomain-policy-serving/
    How to connect flash and java ???
    I am trying for a solution for the past 1 month!!!
    Any help is hight appreciated.

    Ur error might be related to "UNSUFFICIENT PERMISSION" at the Server side to create a File or for any other task....check it out
    hope it helps,
    Cheers,
    Manja

  • About the socket security problem,Plese help.

    I use the port 843 server to send xml to swf.But not work. Please help. My Code is:
    Server:
    //HelloTest.java
    import java.io.IOException;
    import java.net.ServerSocket;
    import java.net.Socket;
    //让其继承线程类是为了更好控制 其余的线程
    public class HelloTest extends Thread {
    * @param args
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    //发送策略的服务器
    new HelloTest().start();
    //这个是用的fuq
    new Thread(new QtServer()).start();
    @Override
    public void run()
    System.out.println("策略服务器启动");
      boolean lising=true;
    ServerSocket ss;
    try {
    ss = new ServerSocket(843);
    while(lising)
    try {
    //得到socket服务器
      Socket sc=ss.accept();
    SendPolicyFile sp=new SendPolicyFile(sc);
    System.out.println("为什么呢");
    new Thread(sp).start();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    ss.close();
    } catch (IOException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.io.PrintWriter;
    import java.net.Socket;
    //SendPolicyFile.java
    public class SendPolicyFile implements Runnable {
    private Socket soc;
    private OutputStream _socketOut;
    private InputStream _socketIn;
    public SendPolicyFile(Socket s) throws IOException
    this.soc=s;
    _socketOut=s.getOutputStream();
    _socketIn=s.getInputStream();
    //设置超时的限制
    //soc.setSoTimeout(1000);
    public void run() {
    // TODO Auto-generated method stub
        try {
    readRandSp();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    @SuppressWarnings("unused")
    private void readRandSp() throws IOException
      if(read().equals("<policy-file-request/>"))
      System.out.println("write Policy to flash");
      writePolicy();
            //close stream and socket
      close();
    //写策略文件的方法
    private void writePolicy() throws IOException
       String string1="<?xml version=\"utf-8\" ?><cross-domain-policy><site-control permitted-cross-domain-policies=\"master-only\"/><allow-access-from domain=\"*\" to-ports=\"8001\"/></cross-domain-policy>"+"\u0000";
    PrintWriter pw=new PrintWriter(_socketOut);
    pw.println(string1+"\u0000");
    pw.flush();
    pw.close();
    System.out.println(string1+"\u0000");
    //关闭流
    //关闭socket
    public void close()
      if(_socketOut!=null)
    try {
    _socketOut.close();
    if(_socketIn!=null)
      _socketIn.close();
      if(soc!=null)
      soc.close();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    _socketIn=null;
    _socketOut=null;
    soc=null;
    //发送两个Socket
    private String read() throws IOException
    System.out.println("这里也执行吗");
    StringBuffer buffer=new StringBuffer();
    int codePoint;
    boolean zeroByteRead=false;
    do{
    //这个地方阻塞了
    codePoint=this._socketIn.read();
    //如果接受到的codePoint为null那证明客户端与我们失去连接了
    if(codePoint==0)
      zeroByteRead=true;
    else
    buffer.appendCodePoint(codePoint);
    while(!zeroByteRead && buffer.length()<30);
    return buffer.toString();

    I use the port 843 server to send xml to swf.But not work. Please help. My Code is:
    Server:
    //HelloTest.java
    import java.io.IOException;
    import java.net.ServerSocket;
    import java.net.Socket;
    //让其继承线程类是为了更好控制 其余的线程
    public class HelloTest extends Thread {
    * @param args
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    //发送策略的服务器
    new HelloTest().start();
    //这个是用的fuq
    new Thread(new QtServer()).start();
    @Override
    public void run()
    System.out.println("策略服务器启动");
      boolean lising=true;
    ServerSocket ss;
    try {
    ss = new ServerSocket(843);
    while(lising)
    try {
    //得到socket服务器
      Socket sc=ss.accept();
    SendPolicyFile sp=new SendPolicyFile(sc);
    System.out.println("为什么呢");
    new Thread(sp).start();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    ss.close();
    } catch (IOException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.io.PrintWriter;
    import java.net.Socket;
    //SendPolicyFile.java
    public class SendPolicyFile implements Runnable {
    private Socket soc;
    private OutputStream _socketOut;
    private InputStream _socketIn;
    public SendPolicyFile(Socket s) throws IOException
    this.soc=s;
    _socketOut=s.getOutputStream();
    _socketIn=s.getInputStream();
    //设置超时的限制
    //soc.setSoTimeout(1000);
    public void run() {
    // TODO Auto-generated method stub
        try {
    readRandSp();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    @SuppressWarnings("unused")
    private void readRandSp() throws IOException
      if(read().equals("<policy-file-request/>"))
      System.out.println("write Policy to flash");
      writePolicy();
            //close stream and socket
      close();
    //写策略文件的方法
    private void writePolicy() throws IOException
       String string1="<?xml version=\"utf-8\" ?><cross-domain-policy><site-control permitted-cross-domain-policies=\"master-only\"/><allow-access-from domain=\"*\" to-ports=\"8001\"/></cross-domain-policy>"+"\u0000";
    PrintWriter pw=new PrintWriter(_socketOut);
    pw.println(string1+"\u0000");
    pw.flush();
    pw.close();
    System.out.println(string1+"\u0000");
    //关闭流
    //关闭socket
    public void close()
      if(_socketOut!=null)
    try {
    _socketOut.close();
    if(_socketIn!=null)
      _socketIn.close();
      if(soc!=null)
      soc.close();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    _socketIn=null;
    _socketOut=null;
    soc=null;
    //发送两个Socket
    private String read() throws IOException
    System.out.println("这里也执行吗");
    StringBuffer buffer=new StringBuffer();
    int codePoint;
    boolean zeroByteRead=false;
    do{
    //这个地方阻塞了
    codePoint=this._socketIn.read();
    //如果接受到的codePoint为null那证明客户端与我们失去连接了
    if(codePoint==0)
      zeroByteRead=true;
    else
    buffer.appendCodePoint(codePoint);
    while(!zeroByteRead && buffer.length()<30);
    return buffer.toString();

  • How to generate web svc data control from WSDL in 10.1.3 to secure web svc

    When I try to connect to web service via https, I get the error:
    WARNING: Unable to connect to URL: https://remove.site.com/service
    java.security.PrivilegedActionException: javax.xml.soap.SOAPException:
    Message send failed: javax.net.ssl.SSLException: SSL handshake failed:
    X509CertChainIncompleteErr Exceptionjava.rmi.RemoteException: ; nested exception is: HTTP transport error: javax.xml.soap.SOAPException:
    java.security.PrivilegedActionException: javax.xml.soap.SOAPException:
    Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
    Process exited with exit code 0.
    There does appear to be this dependency on Oracle Wallet, which I saw when I set:
    System.setProperty("HTTPClient.log.level","1");
    which showed Using Wallet:
    and nothing after it.
    AFTER I set:
    System.setProperty("javax.net.ssl.Keystore", "f:\ewallet.p12");
    System.setProperty("javax.net.ssl.KeyStorePassword","mywallet12");
    I saw the "wallet" being used, but still ended up with the same error. I'm only trying to use the "test client" that the web service "generate web service proxy" produces.
    The stack trace was:
    java.rmi.RemoteException: ; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
         at model.runtime.ProcessOrderBinding_Stub.processOrder(ProcessOrderBinding_Stub.java:95)
         at model.ProcessOrderPortClient.processOrder(ProcessOrderPortClient.java:177)
         at model.ProcessOrderPortClient.main(ProcessOrderPortClient.java:143)
    Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
         at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(HttpClientTransport.java:144)
         at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(HttpClientTransport.java:120)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:169)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:110)
         at model.runtime.ProcessOrderBinding_Stub.processOrder(ProcessOrderBinding_Stub.java:78)
         ... 2 moreIronically, the same certificates that I loaded into the java keystore using Keytool and 10.1.2 connect to the same service without an error, using the notes as described here:
    http://andrej.racchvs.com/archives/2004/04/
    and
    http://radio.weblogs.com/0132036/2004/02/13.html
    When I created the data control for the WSDL in 10.1.2 (jdev), I didn't end up with as many files and only needed to set two system properties, and change the following lines to use Apache SOAP and I could invoke the web service as a data control as well:
    1. references to OracleSOAPHTTPConnection changed to:
    SOAPHTTPConnection
    // import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import org.apache.soap.transport.http.SOAPHTTPConnection;
    2. comment out:
    setTransportProperties
    getTransportProperties
    How can you connect to a remote web service using HTTPS with JDeveloper 10g and use the Oracle wallet?
    Can someone provide specific steps to get it working based on having a WSDL file to start with?
    Thanks!

    Hello,
    I have the same problem. I am trying to consume a CRM On Demand's Web Service from JDeveloper 10 g (version 10.1.3).
    The main method from my Client is:
    System.setProperty("HTTPClient.log.level","1");
    System.setProperty("javax.net.ssl.Keystore", "C:\\jdevstudio1013\\jdk\\jre\\lib\\security");
    System.setProperty("javax.net.ssl.KeyStorePassword",PASSWORD_KEYSTORE);
    crmod.DefaultClient myPort = new crmod.DefaultClient();
    ListOfContact list= new ListOfContact();
    ListOfContact outList= new ListOfContact();
    Contact[] contacts=new Contact[2];
    Contact contact=new Contact();
    // Login WS (HTTPS)
    idSesionFull=conexionWS_CRM.logon(constantes.URL,constantes.USER,constantes.PASSWORD);
    System.setProperty("javax.xml.rpc.service.endpoint.address", URL);
    System.setProperty("javax.xml.rpc.security.auth.username", USER);
    System.setProperty("javax.xml.rpc.security.auth.password", PASSWORD);
    System.setProperty("javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY", URL);
    // Add contacts
    for (int i = 0; i < contacts.length; i++) {
    contact.setContactId("WSCRM"+i);
    contact.setContactFirstName("JDeveloper"+i);
    contact.setContactLastName("prove"+i);
    contact.setCellularPhone("77777777"+i);
    contact.setExternalSystemId("1234"+i);
    contacts=contact;
    list.setContact(contacts);
    outList=myPort.contactInsert(list,"OFF");
    Contact[] results = new Contact[2];
    Contact result = new Contact();
    for (int i = 0; i < contacts.length; i++) {
    results=outList.getContact();
    System.out.println("Add contact with ID:"+results[i].getContactId()+" nom:"+results[i].getContactFirstName());
    // Logout WS (HTTPS)
    conexionWS_CRM.logoff(constantes.URL, idSesion);
    } catch (Exception ex) {
    System.out.println("error: "+ex);
    ex.printStackTrace();
    conexionWS_CRM.logoff(constantes.URL, idSesion);
    The JDeveloper's log is:
    LOGIN OK!!
    sessionString:JSESSIONID=8d928b0b231c911e83d79ff74b9eaa7795b54d784b1b.e3iRbxmNaNb0ahqLa34LbhiMe0; path=/Services; secure URL:https://secure-ausomxgfa.crmondemand.com/Services
    System.setProperty("HTTPClient.log.level","1"), print the following:
    {Thread-10} [0:50:39.15] Version: Oracle HTTPClient Version 10h
    {Thread-10} [0:50:39.46] Conn: Nagle's Algorithm is disabled
    {Thread-10} [0:50:39.46] Conn: Setting Socket Idle Timeout to 10 seconds
    {Thread-10} [0:50:39.46] Conn: Setting Maximum Authorization retries to 4
    {Thread-10} [0:50:39.62] Conn: added module HTTPClient.RetryModule
    {Thread-10} [0:50:39.93] Conn: added module HTTPClient.CookieModule
    {Thread-10} [0:50:39.93] Conn: added module HTTPClient.RedirectionModule
    {Thread-10} [0:50:39.93] Conn: added module HTTPClient.AuthorizationModule
    {Thread-10} [0:50:39.93] Conn: added module HTTPClient.DefaultModule
    {Thread-10} [0:50:39.109] Conn: added module HTTPClient.TransferEncodingModule
    {Thread-10} [0:50:39.109] Conn: added module HTTPClient.ContentMD5Module
    {Thread-10} [0:50:39.125] Conn: added module HTTPClient.ContentEncodingModule
    {Thread-10} [0:50:39.156] Conn: chunking set to true
    {Thread-10} [0:50:39.156] Conn: chunk size set to 4.096
    {Thread-10} [0:50:39.171] URLC: (https:secure-ausomxgfa.crmondemand.com:443) Setting request method: POST
    {Thread-10} [0:50:39.171] URLC: (https:secure-ausomxgfa.crmondemand.com:443) Setting request property: Content-type : application/x-www-form-urlencoded
    {Thread-10} [0:50:39.171] URLC: (https:secure-ausomxgfa.crmondemand.com:443) creating output stream
    {Thread-10} [0:50:39.171] URLC: (https:secure-ausomxgfa.crmondemand.com:443) Setting request property: SOAPAction : "document/urn:crmondemand/ws/contact/10/2004:ContactInsert"
    {Thread-10} [0:50:39.171] URLC: (https:secure-ausomxgfa.crmondemand.com:443) Setting request property: Content-Type : text/xml; charset=UTF-8
    {Thread-10} [0:50:39.171] URLC: (https:secure-ausomxgfa.crmondemand.com:443) Setting request property: Content-Length : 1173
    {Thread-10} [0:50:39.171] URLC: (https:secure-ausomxgfa.crmondemand.com:443) Connecting ...
    {Thread-10} [0:50:39.218] Conn: Creating Socket: secure-ausomxgfa.crmondemand.com:443
    {Thread-10} [0:50:39.453] Conn: using SSL version Oracle
    {Thread-10} [0:50:39.515] Using wallet:
    {Thread-10} [0:50:39.796] Conn:
    {Thread-10} [0:50:39.796] Conn: Retrying request
    {Thread-10} [0:50:39.796] Conn: Creating Socket: secure-ausomxgfa.crmondemand.com:443
    {Thread-10} [0:50:40.31] Using wallet:
    {Thread-10} [0:50:40.265] Conn:
    {Thread-10} [0:50:40.265] Conn: Retrying request
    {Thread-10} [0:50:40.265] Conn: Creating Socket: secure-ausomxgfa.crmondemand.com:443
    {Thread-10} [0:50:40.500] Using wallet:
    {Thread-10} [0:50:40.734] Conn:
    {Thread-10} [0:50:40.734] URLC: (https:secure-ausomxgfa.crmondemand.com:443) Disconnecting ...
    Unable to connect to URL: https://secure-ausomxgfa.crmondemand.com/Services/Integration due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
    error: java.rmi.RemoteException: ; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
    java.rmi.RemoteException: ; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
         at crmod.runtime.Default_Binding_Stub.contactInsert(Default_Binding_Stub.java:506)
         at crmod.DefaultClient.contactInsert(DefaultClient.java:210)
         at crmod.DefaultClient.main(DefaultClient.java:138)
    Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
         at oracle.j2ee.ws.common.util.exception.JAXRPCExceptionBase.<init>(JAXRPCExceptionBase.java:93)
         at oracle.j2ee.ws.common.util.exception.JAXRPCExceptionBase.<init>(JAXRPCExceptionBase.java:89)
         at oracle.j2ee.ws.client.ClientTransportException.<init>(ClientTransportException.java:33)
         at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(HttpClientTransport.java:144)
         at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(HttpClientTransport.java:121)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:169)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:111)
         at crmod.runtime.Default_Binding_Stub.contactInsert(Default_Binding_Stub.java:490)
         ... 2 more
    Process exited with exit code 0.
    And I am working without Proxy Server.
    The steps I have done to obtain the keystore are:
    1) Obtain the certificate from https://secure-ausomxgfa.crmondemand.com/Services/Integration and save as .cer
    2) With this certificate I have generated the keystore:
    C:\jdevstudio1013\jdk\jre\bin keytool -import -v -f DIR_CERTIFICATE_DOWNLOADED -keystore server.keystore -keypass PASS -storepass PASS_FROM_server.keystore
    PASS=I have put an invented password
    Any idea to solve the error? Is necessary a certificate with a keystore to connect HTTPS Web Service from JDeveloper 10g?
    Thank you an regards.
    Edited by: user2349857 on 05-nov-2009 4:18
    Edited by: user2349857 on 05-nov-2009 4:25

  • Socket connections / smtp

    I have a form that sends mail (smtp) through a socket
    connection (actionscript), which I picked up here,
    http://www.bytearray.org/?p=27
    Tested and works fine locally, but when posted online and
    tested, it quietly fails.
    I am trying to send mail from my domain, to the mail function
    within my host server. (same domain).
    Tried both "local" and "network" publishing options.
    I have read the article on socket security at
    http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04.html
    but I do not have the option to place a crossdomain.xml file
    at port 843 since I am on a shared server.
    I've read everything that I can online but because policy
    changes from player 9,0,115,0 on, it seems that older posts may not
    be relevant, so is there another way to approach this matter?
    Is it possible for me to hard code the cross domain policy
    into my scripts or .fla?
    Thanks,
    Key.

    I seem to be having the same problems, I can't make a
    connection using the newest player and I have my crossdomain file
    on the root of the server, does anyone have any clue how to solve
    this.

  • Flex == Socklet Policy  == Security sandbox violation ?!?!?!?!

    Please help me with this problem. I'v had this problem for
    over a month
    I'm trying to connect to my C# server through my Flex client.
    Flex client in running on IIS (c:/inetpub/wwwroot)
    the policy file in on the root folder of IIS
    <?xml
    version="1.0"?>
    <cross-domain-policy>
    <allow-access-from domain="*" to-ports="*" secure="false"
    />
    </cross-domain-policy>
    1: I tried to use the loadPolicy method before i connect
    through sockets
    Security.loadPolicyFile("h ttp://localhost/crossdomain.xml");
    (space does not exist in real code)
    2: flex sends this message to server side while connecting
    ("<policy-file-request/>") so as soon as i get this message
    on server side i read the policy text from crossdomain.xml and i
    send ti back to the client.
    eventhough i get a security error the client is still able to
    connect to the server and send messages but it cannot receive any
    message
    I get the following security error:
    [SecurityErrorEvent
    type="securityError" bubbles=false cancelable=false eventPhase=2
    text="Error #2048: Security sandbox violation:
    file:///C:/Inetpub/wwwroot/ClientFlex/bin-debug/Client.swf cannot
    load data from 10.0.0.3:8000."]Error #2048: Security sandbox
    violation:
    file:///C:/Inetpub/wwwroot/ClientFlex/bin-debug/Client.swf cannot
    load data from 10.0.0.3:8000.
    y am i still getting this error???????????
    some people suggested to read the log files: but i followed
    all adobe tutorials to turn os loggin, but couldn't get it to work.
    mm.cfg does not exist, log folder for flash player does not exist,
    log.txt for flash player does not exists.

    Hi,
    In the move from Flash Player 9 to 10, Adobe increased the security constraints on sockets. If you are using sockets to connect to an "un-trusted" server, then you will still need a Cross-Domain Policy file, however that policy file must also be served up through sockets (not through HTTP).
    You will need to run a socket server on the server you are connecting to in order to serve up the appropriate XML document through port 843 (by default). This socket server can be implemented in any number of ways, but I use a Java socket server that Thomas over at LessRain has posted on their blog. You can find it here: http://www.blog.lessrain.com/as3-java-socket-connections-to-ports-below-1024/
    Good luck,
    Taylor
    4Point Solutions Ltd.
    http://blogs.4point.com/taylor.bastien/

Maybe you are looking for

  • Photoshop CS2: Zwei Fragen

    Hallo *! Ich habe seit gestern auf CS2 upgegradet. Es haben sich für mich zwei Fragen ergeben: 1) Ich wollte die aktuelle Camera Raw Version einstellen und bin, wie auf der Adobe HP beschrieben, vorgegangen. Entgegen der Beschreibung befand sich in m

  • Could i Hook up my 360 to an imac?

    i want to use my imac as a display for my 360 elite, is this even possible? i have the new Anodized Aluminum imac with the extreme.

  • Global Variables in BI

    Hi, Can anyone explain me the steps to create global variables in BI with out using Query designer? I do not have the infoobject in my cube but still I need a variable i.e for currency translation with out the need of adding the infoobject to the cub

  • MIRO referred to a PO is showing all position, even if completely invoiced

    Hi gurus, when I execute MIRO referred to a PO, the system shows me all the position of the PO, even if they are already invoiced. The system doesn't let me elaborate them but my Client doesn't want to see them. If I click CTRL+F5 the open positions

  • LSMW DOUBT WITH IDOC

    Hi everybody . I am using idoc with LSMW for uploading the data . I am going step by step all is working and displaying well but when i go for the step "START IDOC GENERATION " it is giving me an error like <b>'066_BUS_TRANS_QUOTATION.lsmw.conv' File