cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aki Yoshida (Confluence)" <conflue...@apache.org>
Subject [CONF] Apache CXF Documentation > WebSocket
Date Fri, 08 Aug 2014 13:57:00 GMT
<html>
    <head>
        <meta name="viewport" content="width=device-width" />
        <base href="https://cwiki.apache.org/confluence" />
        <style type="text/css">
    body, #email-content, #email-content-inner { font-family: Arial,FreeSans,Helvetica,sans-serif;
}
    body, p, blockquote, pre, code, td, th, li, dt, dd { font-size: 13px; }
    small { font-size: 11px; }

    body { width:100% !important; -webkit-font-smoothing: antialiased; }

    body,
    #email-wrapper { background-color: #f0f0f0; }
    #email-wrapper-inner { padding: 20px; text-align: center; }
    #email-content-inner { background-color: #fff; border: 1px solid #bbb; color: $menuTxtColour;
padding:20px; text-align:left; }
    #email-wrapper-inner > table { width: 100%; }
    #email-wrapper-inner.thin > table { margin: 0 auto; width: 50%; }
    #email-footer { padding: 0 16px 32px 16px; margin: 0; }

    .email-indent { margin: 8px 0 16px 0; }
    .email-comment { margin: 0 0 0 56px; }
    .email-comment.removed { background-color: #ffe7e7; border: 1px solid #df9898; padding:
0 8px;}

    #email-title-avatar { text-align: left; vertical-align: top; width: 48px; padding-right:
8px; }
    #email-title-flavor { margin: 0; padding: 0 0 4px 0; }
    #email-title-heading { font-size: 16px; line-height: 20px; min-height: 20px; margin: 0;
padding: 0; }
    #email-title .icon { border: 0; padding: 0 5px 0 0; text-align: left; vertical-align:
middle; }

    #email-actions { border-top: 1px solid #bbb; color: #505050; margin: 8px 0 0 0; padding:
0; }
    #email-actions td { padding-top: 8px; }
    #email-actions .left { max-width: 45%; text-align: left; }
    #email-actions .right { text-align: right; }
    .email-reply-divider { border-top: 1px solid #bbb; color: #505050; margin: 32px 0 8px
0; padding: 8px 0; }
    .email-section-title { border-bottom: 1px solid #bbb; margin: 8px 0; padding: 8px 0 0
0; }

    .email-metadata { color: #505050; }

    a { color: #326ca6; text-decoration: none; }
    a:hover { color: #336ca6; text-decoration: underline; }
    a:active {color: #326ca6; }

    a.email-footer-link { color: #505050; font-size: 11px; }

    .email-item-list { list-style: none; margin: 4px 0; padding-left: 0; }
    .email-item-list li { list-style: none; margin: 0; padding: 4px 0; }
    .email-list-divider { color: #505050; padding: 0 0.35em; }
    .email-operation-icon { padding-right: 5px; }

    .avatar { -ms-interpolation-mode: bicubic; border-radius: 3px;}
    .avatar-link { margin: 2px; }

    .tableview th { border-bottom: 1px solid #69C; font-weight: bold; text-align: left; }
    .tableview td { border-bottom: 1px solid #bbbbbb; text-align: left; padding: 4px 16px
4px 0; }

    .aui-message {  margin: 1em 0; padding: 8px; }
    .aui-message.info { background-color: #e0f0ff; border: 1px solid #9eb6d4; }
    .aui-message.success { background-color: #ddfade; border: 1px solid #93c49f; }
    .aui-message.error,
    .aui-message.removed { background-color: #ffe7e7; border: 1px solid #df9898; color: #000;
}

    .call-to-action-table { margin: 10px 1px 1px 1px;}
    .call-to-cancel-container, .call-to-action-container { padding: 5px 20px; }
    .call-to-cancel-container { border: 1px solid #aaa; background-color: #eee; border-radius:
3px; }
    .call-to-cancel-container a.call-to-cancel-button { background-color: #eee; font-size:
14px; line-height: 1; padding: 0; margin: 0; color: #666; font-family: sans-serif;}
    .call-to-action-container { border: 1px solid #486582;  background-color: #3068A2; border-radius:
3px; padding: 4px 10px; }
    .call-to-action-container a.call-to-action-button { background-color: #3068A2; font-size:
14px; line-height: 1; padding: 0; margin: 0; color: #fff; font-weight: bold; font-family:
sans-serif; }

    /** The span around the inline task checkbox image */
    .diff-inline-task-overlay {
        display: inline-block;
        text-align: center;
        height: 1.5em;
        padding: 5px 0px 1px 5px;
        margin-right: 5px;
        /** Unfortunately, the negative margin-left is stripped out in gmail */
        margin-left: -5px;
    }

            @media handheld, only screen and (max-device-width: 480px) {
        div, a, p, td, th, li, dt, dd { -webkit-text-size-adjust: auto; }
        small, small a { -webkit-text-size-adjust: 90%; }

        td[id=email-wrapper-inner] { padding: 2px !important; }
        td[id=email-content-inner] { padding: 8px !important; }
        td[id="email-wrapper-inner"][class="thin"] > table { text-align: left !important;
width: 100% !important; }
        td[id=email-footer] { padding: 8px 12px !important; }
        div[class=email-indent] { margin: 8px 0px !important; }
        div[class=email-comment] { margin: 0 !important; }

        p[id=email-title-flavor] a { display: block; } /* puts the username and the action
on separate lines */
        p[id=email-permalink] { padding: 4px 0 0 0 !important; }

        table[id=email-actions] td { padding-top: 0 !important; }
        table[id=email-actions] td.right { text-align: right !important; }
        table[id=email-actions] .email-list-item { display: block; margin: 1em 0 !important;
word-wrap: normal !important; }
        span[class=email-list-divider] { display: none; }
    }



        </style>
    </head>
    <body style="font-family: Arial, FreeSans, Helvetica, sans-serif; font-size: 13px;
width: 100%; -webkit-font-smoothing: antialiased; background-color: #f0f0f0">
        <table id="email-wrapper" width="100%" cellspacing="0" cellpadding="0" border="0"
style="background-color: #f0f0f0">
            <tbody>
                <tr valign="middle">
                    <td id="email-wrapper-inner" style="font-size: 13px; padding: 20px;
text-align: center">
                        <table id="email-content" cellspacing="0" cellpadding="0" border="0"
style="font-family: Arial, FreeSans, Helvetica, sans-serif; width: 100%">
                            <tbody>
                                <tr valign="top">
                                    <td id="email-content-inner" align="left" style="font-family:
Arial, FreeSans, Helvetica, sans-serif; font-size: 13px; background-color: #fff; border: 1px
solid #bbb; padding: 20px; text-align: left">
                                        <table id="email-title" cellpadding="0" cellspacing="0"
border="0" width="100%">
                                            <tbody>
                                                <tr>
                                                    <td id="email-title-avatar" rowspan="2"
style="font-size: 13px; text-align: left; vertical-align: top; width: 48px; padding-right:
8px"> <img class="avatar" src="cid:avatar_67c5aaf21f27c4f400585db9606d39a5" border="0"
height="48" width="48" style="-ms-interpolation-mode: bicubic; border-radius: 3px" /> </td>
                                                    <td valign="top" style="font-size:
13px">
                                                        <div id="email-title-flavor" class="email-metadata"
style="margin: 0; padding: 0 0 4px 0; color: #505050">
                                                            <a href="    https://cwiki.apache.org/confluence/display/~ay
" style="color:#326ca6;text-decoration:none;; color: #326ca6; text-decoration: none">Aki
Yoshida</a> edited the page:
                                                        </div> </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" style="font-size:
13px"> <h2 id="email-title-heading" style="font-size: 16px; line-height: 20px; min-height:
20px; margin: 0; padding: 0"> <a href="https://cwiki.apache.org/confluence/display/CXF20DOC/WebSocket"
style="color: #326ca6; text-decoration: none"> <img class="icon" src="cid:page-icon"
alt="" style="border: 0; padding: 0 5px 0 0; text-align: left; vertical-align: middle" />
<strong style="font-size:16px;line-height:20px;vertical-align:top;">WebSocket</strong>
</a> </h2> </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                        <div class="email-indent" style="margin: 8px 0
16px 0">
                                            <div class="email-diff">
                                                <div id="page-diffs" class="wiki-content">
                                                    <p class="diff-context-placeholder"
style="font-size: 13px">...</p>
                                                    <h1 id="WebSocket-CurrentStatus" class="diff-block-context">Current
Status</h1>
                                                    <h3 id="WebSocket-Shortsummary" class="diff-block-context">Short
summary</h3>
                                                    <ul style="list-style-type: square;"
class="diff-block-target">
                                                        <li style="font-size: 13px">
<span class="diff-html-removed" id="removed-diff-0" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">the </span><span class="diff-html-added"
id="added-diff-0" style="font-size: 100%; background-color: #ddfade;">The </span>code
resides in rt/transport/http-websocket and it enables cxf services to be invoked over websockets.</li>
                                                        <li style="font-size: 13px">
<span class="diff-html-removed" id="removed-diff-1" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">it </span><span class="diff-html-added"
id="added-diff-1" style="font-size: 100%; background-color: #ddfade;">It </span>supports
both the embedded mode and the servlet container mode. The former can be used in the standalone
setup that uses an embedded jetty server and the latter can be used in the container setup
that uses the servlet container provided by the container.</li>
                                                        <li style="font-size: 13px">
<span class="diff-html-removed" id="removed-diff-2" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">some </span><span class="diff-html-added"
id="added-diff-2" style="font-size: 100%; background-color: #ddfade;">Some </span>test
cases are located in systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket&nbsp;and
<span class="diff-html-removed" id="removed-diff-3" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">there </span><span class="diff-html-added"
id="added-diff-3" style="font-size: 100%; background-color: #ddfade;">systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/websocket.
There </span>is also a browser based demo at&nbsp;distribution/src/main/release/samples/jax_rs/websocket.</li>
                                                        <li style="font-size: 13px">
<span class="diff-html-removed" id="removed-diff-4" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">it requires several </span><span class="diff-html-added"
id="added-diff-4" style="font-size: 100%; background-color: #ddfade;">&nbsp;Several
</span>additional libraries <span class="diff-html-added" id="added-diff-5" style="font-size:
100%; background-color: #ddfade;">are required </span>to enable this feature depending
on the usage. Concretely, <span class="diff-html-removed" id="removed-diff-5" style="font-size:
100%; background-color: #ffe7e7; text-decoration: line-through;">it will require </span>jetty-websocket
<span class="diff-html-added" id="added-diff-6" style="font-size: 100%; background-color:
#ddfade;">is required </span>for the embedded standalone mode (i.e., the endpoint
is given with the host and port part as in address=&quot;<a href="ws://hostport" rel="nofollow"
style="color: #326ca6; text-decoration: none">ws://host:port/path</a>&quot;).
For the servlet mode (i.e., the endpoint is given using a relative path (i.e., address=&quot;/path&quot;),
it <span class="diff-html-removed" id="removed-diff-6" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">will </span><span class="diff-html-added"
id="added-diff-7" style="font-size: 100%; background-color: #ddfade;">requires </span>either
<span class="diff-html-removed" id="removed-diff-7" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">require </span>jetty-websocket to use jetty
or <span class="diff-html-removed" id="removed-diff-8" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">require </span>atmosphere-runtime and a
specific websocket implementation such as jetty-websocket or tomcat-websocket to use that
specific container<span class="diff-html-added" id="added-diff-8" style="font-size: 100%;
background-color: #ddfade;">'s websocket capability</span>.</li>
                                                    </ul>
                                                    <h3 id="WebSocket-UsagePatterns" class="diff-block-context">Usage
Patterns</h3>
                                                    <p class="diff-block-context" style="font-size:
13px"> <span style="font-size: 14.0px;line-height: 1.4285715;">We have the following
message exchange patterns to use this websocket transport for cxf service invocation.</span>
</p>
                                                    <p class="diff-context-placeholder"
style="font-size: 13px">...</p>
                                                    <ul style="list-style-type: square;"
class="diff-block-target">
                                                        <li style="font-size: 13px">if
the client and the service want to explicitly exchange a sequence of requests and responses,
they are responsible in passing some id and ref-id in the exchanged message's headers so that
each response can be correlated to its request.</li>
                                                        <li style="font-size: 13px">
<span class="diff-html-added" id="added-diff-9" style="font-size: 100%; background-color:
#ddfade;">for correlating requests and their responses that are send back asynchronously,
the request message may include the RequestId header and the corresponding response may set
this value in its ResponseId header.</span> </li>
                                                        <li style="font-size: 13px">
<span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">asynchronous
web service calls that are performed using a decoupled endpoint using the http transport can
be performed using the websocket transport without using a decoupled endpoint.&nbsp;</span>
</li>
                                                    </ul>
                                                    <h3 id="WebSocket-Openquestions" class="diff-block-context">Open
questions</h3>
                                                    <ul style="list-style-type: square;"
class="diff-block-target diff-block-context">
                                                        <li style="font-size: 13px">the
content-length header is not used to determine the length of the message, as the message end
can be determined for a websocket message using other means (i.e., either its length when
used a block-mode or the fragment's indicator). So it is not clear whether we can filter out
the content-length.</li>
                                                        <li style="font-size: 13px">the
<span class="diff-html-removed" id="removed-diff-9" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">referencing mechanism is needed for correlating
requests and their responses that are sent back asynchronously or even continuously. This
means we need to add something like message-id in the request and message-ref-id in the response
headers.the </span>protocol format needs to be clarified (see above regarding the protocol
format used currently) and possibly to several variations binding variations.</li>
                                                    </ul>
                                                    <p class="diff-context-placeholder"
style="font-size: 13px">...</p>
                                                    <p class="diff-block-context" style="font-size:
13px">Currently, strings are converted into utf-8 bytes and sent using the byte transfer
mode of websocket. We could add the native string/text transfer as websocket supports it.
However, this should be allowed only when the entity body is absent or of string/text.</p>
                                                    <ul class="diff-block-target diff-block-context">
                                                        <li style="font-size: 13px">add
<span class="diff-html-removed" id="removed-diff-10" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">message-ref-id part 1</span> </li>
                                                    </ul>
                                                    <p class="diff-block-target diff-block-context"
style="font-size: 13px"> <span class="diff-html-removed" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">see above &quot;open question&quot;.</span>
</p>
                                                    <ul class="diff-block-target diff-block-context">
                                                        <li style="font-size: 13px">
<span class="diff-html-removed" style="font-size: 100%; background-color: #ffe7e7; text-decoration:
line-through;">add message-ref-id part 2</span> </li>
                                                    </ul>
                                                    <p class="diff-block-target diff-block-context"
style="font-size: 13px"> <span class="diff-html-removed" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">we might want to link this mechanism to cxf's
current decoupled request/response correlation.</span> </p>
                                                    <ul class="diff-block-target diff-block-context">
                                                        <li style="font-size: 13px">
<span class="diff-html-removed" style="font-size: 100%; background-color: #ffe7e7; text-decoration:
line-through;">add some </span><span class="diff-html-added" id="added-diff-10"
style="font-size: 100%; background-color: #ddfade;">more </span>browser based sample
client applications</li>
                                                    </ul>
                                                    <p class="diff-block-target" style="font-size:
13px">we can <span class="diff-html-removed" id="removed-diff-11" style="font-size:
100%; background-color: #ffe7e7; text-decoration: line-through;">add some js examples or
</span>update the logbrowser sample. There is a browser based demo in the samples collection
(see above). This demo uses the current default binding which is not javascript friendly.
To support browser based applications, we need different bindings.</p>
                                                    <p class="diff-context-placeholder"
style="font-size: 13px">...</p>
                                                    <ul class="diff-block-target">
                                                        <li style="font-size: 13px">supporting
a direct output stream connection from the client application to the service application.
Currently, from the service application to the client, a direct output stream can be kept
open after the initial call from the client to the service takes place. Thus, the service
can continue to push data directly to the client over this output stream. Similarly, it would
be interesting to establish a direct output stream from the client to the service so that
the client can continue to push data directly to the service.</li>
                                                        <li style="font-size: 13px">
<span class="diff-html-removed" id="removed-diff-12" style="font-size: 100%; background-color:
#ffe7e7; text-decoration: line-through;">use a websocket instead of a decoupled endpoint
to receive decoupled responses</span> </li>
                                                    </ul>
                                                    <p class="diff-block-context" style="font-size:
13px">&nbsp;</p>
                                                    <p class="diff-block-context" style="font-size:
13px">&nbsp;</p>
                                                    <p class="diff-block-context" style="font-size:
13px">&nbsp;</p>
                                                </div>
                                            </div>
                                        </div>
                                        <table id="email-actions" class="email-metadata"
cellspacing="0" cellpadding="0" border="0" width="100%" style="border-top: 1px solid #bbb;
color: #505050; margin: 8px 0 0 0; padding: 0; color: #505050">
                                            <tbody>
                                                <tr>
                                                    <td class="left" valign="top" style="font-size:
13px; padding-top: 8px; max-width: 45%; text-align: left"> <span class="email-list-item"><a
href="https://cwiki.apache.org/confluence/display/CXF20DOC/WebSocket" style="color: #326ca6;
text-decoration: none">View Online</a> </span> <span class="email-list-divider"
style="color: #505050; padding: 0 0.350em">&middot;</span> <span class="email-list-item"><a
href="https://cwiki.apache.org/confluence/plugins/likes/like.action?contentId=39621544" style="color:
#326ca6; text-decoration: none">Like</a> </span> <span class="email-list-divider"
style="color: #505050; padding: 0 0.350em">&middot;</span> <span class="email-list-item"><a
href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=39621544&amp;revisedVersion=5&amp;originalVersion=4"
style="color: #326ca6; text-decoration: none">View Changes</a> </span> </td>
                                                    <td class="right" width="50%" valign="top"
style="font-size: 13px; padding-top: 8px; text-align: right"> <span class="email-list-item"><a
href="https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=CXF20DOC"
style="color: #326ca6; text-decoration: none">Stop watching space</a> </span>
<span class="email-list-divider" style="color: #505050; padding: 0 0.350em">&middot;</span>
<span class="email-list-item"><a href="https://cwiki.apache.org/confluence/users/editmyemailsettings.action"
style="color: #326ca6; text-decoration: none">Manage Notifications</a> </span>
</td>
                                                </tr>
                                            </tbody>
                                        </table> </td>
                                </tr>
                            </tbody>
                        </table> </td>
                </tr>
                <tr>
                    <td id="email-footer" align="center" style="font-size: 13px; padding:
0 16px 32px 16px; margin: 0"> <small style="font-size: 11px"> This message was sent
by <a class="email-footer-link" style="color:#505050;font-size:11px;text-decoration:none;;
color: #326ca6; text-decoration: none; color: #505050; font-size: 11px" href="http://www.atlassian.com/software/confluence">Atlassian
Confluence</a> 5.0.3, <a class="email-footer-link" style="color:#505050;font-size:11px;text-decoration:none;;
color: #326ca6; text-decoration: none; color: #505050; font-size: 11px" href="http://www.atlassian.com/software/confluence/overview/team-collaboration-software?utm_source=email-footer">Team
Collaboration Software</a> </small> </td>
                </tr>
            </tbody>
        </table>
    </body>
</html>
Mime
View raw message