It is our intension that Object Reference URLs (O_URLs) follow standard URL syntax specifications. I am using the description given in the Internet Draft 06 of the Hypertext Transfer Protocol -- HTTP/1.1 (July 3, 1996). (An excerpt of this document is at the end of this note.) The basic scheme is to encode the following information in a URL.
We might also want to consider supporting an ldap scheme that would mean that the object is registered with an LDAP directory server. I will discuss the mapping for this scheme below.
<scheme>:<host>/<server>:<port>;<object key>? <object interface>:<method>The BNF for this is given in the following section. For LDAP scheme requests we might want to replace the <server> part with a LDAP key that names the server. Then the URL would be used to generate an LDAP request which would return <scheme>, <host> and <server> parts which could be used to construct a <http> or <iiop> URL for the object. For example:
ldap:<ldap host>:<ldap port>/<ldap server key>;<object key>? <object interface>:<method>would become (after resolving the <ldap server key> with the <ldap host>:<ldap port> server):
<returned scheme>:<returned host>:<returned port>/<returned server>; <object key>?<object interface>:<method>
URLs are just URIs with a scheme attached at the begriming. Right now we are only considering the schemes http and iiop, and maybe ldap.
A description of the BNF notation is also given in that document. (Note: "#" in front of a symbol means repeat it in a comma separated list.)
O_URI = o_relativeURI o_relativeURI = o_net_path | o_abs_path | o_rel_path o_net_path = "//" net_loc [ o_abs_path ] o_abs_path = "/" o_rel_path o_rel_path = [ path ] [ ";" o_key ] [ "?" o_i_m ] o_key = o_root_key | o_rel_key] o_root_key = ["/"] o_rel_key ; Root keys are absolute keys within the ; activation context of the client's ; connection the the server o_rel_key = o_key [ "/" o_key ] ; Relative keys are relative keys within ; the activation context of the client's ; connection to the server o_key = 1*pchar ; We might want to consider global root keys with a syntax like: ; o_global_key = "//" o_rel_key ; This would mean relative to some global ; directory (such as a LDAP server ; directory), but I am not sure that we ; need this as that is what the full URI is. o_i_m = [interface_name ":"] [ o_method_call ] o_interface_name = o_string o_method_call = o_regular_m_call | o_nv_m_call o_regular_m_call = o_method_name "(" [ #o_parm_value ] ")" o_method_name = o_string o_parm_value = o_string o_nv_m_call = 1#( o_nv_name : o_nv_value ) o_nv_name = o_string o_nv_value = o_string o_parm = o_string o_char = ALPHA | DIGIT | o_safe | national | escape o_safe = "$" | "_" | "." ; The safe characters without "-" o_string = 1*o_char
Net path:
//w3.austin.ibm.com/java-applet/Banking ;/AustinAccounts/78654987 ?COM.ibm.jaws.models.Account:deposit(100.00)
Abs path:
/java-applet/Banking ;/AustinAccounts/78654987 ?COM.ibm.jaws.models.Account:deposit(100.00)
Rel path (relative to the same servlet)
;/AustinAccounts/78654987 ?COM.ibm.jaws.models.Account:deposit(100.00)
Each of these specifies calling "deposit(100.00)" on the object "78654987" in the collection "AustinAccounts" in the root activation context of the Java servlet "Banking".
An object reference without a method call relative to the name context of the server connection.
;CheckingAccount?COM.ibm.jaws.models.Account:
This assumes that the servlet defines a default "CheckingAccount".
Excerpt from "Internet Draft 06 of the Hypertext Transfer Protocol -- HTTP/1.1 (July 3, 1996). The latest spec is: HTTP/1.1 - Proposed Standard.
3.2 Uniform Resource Identifiers URIs have been known by many names: WWW addresses, Universal Document Identifiers, Universal Resource Identifiers , and finally the combination of Uniform Resource Locators (URL) and Names (URN). As far as HTTP is concerned, Uniform Resource Identifiers are simply formatted strings which identify--via name, location, or any other characteristic- -a resource. 3.2.1 General Syntax URIs in HTTP can be represented in absolute form or relative to some known base URI, depending upon the context of their use. The two forms are differentiated by the fact that absolute URIs always begin with a scheme name followed by a colon. URI = ( absoluteURI | relativeURI ) [ "#" fragment ] absoluteURI = scheme ":" *( uchar | reserved ) relativeURI = net_path | abs_path | rel_path net_path = "//" net_loc [ abs_path ] abs_path = "/" rel_path rel_path = [ path ] [ ";" params ] [ "?" query ] path = fsegment *( "/" segment ) fsegment = 1*pchar segment = *pchar params = param *( ";" param ) param = *( pchar | "/" ) scheme = 1*( ALPHA | DIGIT | "+" | "-" | "." ) net_loc = *( pchar | ";" | "?" ) query = *( uchar | reserved ) fragment = *( uchar | reserved ) pchar = uchar | ":" | "@" | "&" | "=" | "+" uchar = unreserved | escape unreserved = ALPHA | DIGIT | safe | extra | national escape = "%" HEX HEX reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" extra = "!" | "*" | "'" | "(" | ")" | "," safe = "$" | "-" | "_" | "." unsafe = CTL | SP | <"> | "#" | "%" | "<" | ">" national =For definitive information on URL syntax and semantics, see RFC 1738 [4] and RFC 1808 [11]. The BNF above includes national characters not allowed in valid URLs as specified by RFC 1738, since HTTP servers are not restricted in the set of unreserved characters allowed to represent the rel_path part of addresses, and HTTP proxies may receive requests for URIs not defined by RFC 1738. The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15). Note: Servers should be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations may not properly support these lengths. 3.2.2 http URL The "http" scheme is used to locate network resources via the HTTP protocol. This section defines the scheme-specific syntax and semantics for http URLs. http_URL = "http:" "//" host [ ":" port ] [ abs_path ] host = port = *DIGIT If the port is empty or not given, port 80 is assumed. The semantics are that the identified resource is located at the server listening for TCP connections on that port of that host, and the Request-URI for the resource is abs_path. The use of IP addresses in URL's SHOULD be avoided whenever possible (see RFC 1900 [24]). If the abs_path is not present in the URL, it MUST be given as "/" when used as a Request-URI for a resource (section 5.1.2).