URL Schemes
From RemObjects Wiki
This is a RemObjects SDK Architecture topic
Feel free to add your notes to this topic below.
URL Schema Definition
URL schema is the unified way to encode all parameters required to establish connection to the server into the string as specified in RFCs 1808, 1738, and 2732. These parameters include protocol type, host name or IP address (both IPv4 and IPv6 are supported), port and message type identifier (dispatcher). In the generalized form such URL can be written as:
The URL parts meaning and possible values are:
- protocol - the protocol used to communicate with the server. Currently the following protocols are supported:
| | | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| http | Plain HTTP Channel | https | Plain HTTP Channel, SSL-enabled | superhttp | Super HTTP Channel | superhttps | Super HTTP Channel, SSL-enabled | tcp | Plain TCP channel | supertcp | Super TCP channel |
- host - host name or IP address to connect to. IPv6 addresses (which contain colons) must be surrounded with square brackets. Square brackets are also allowed for IPv4 addresses and host names but not required.
- port - a decimal number specifying the TCP port to connect to.
- message - a string identifier of the message type used to communicate with the server. Currently supported messages:
| | | ||||
|---|---|---|---|---|---|
| bin | RO binary message | soap | SOAP Message | json | JSON Message |
Usage
URL schemas are currently supported by RO/Xcode only. Other platforms support is work in progress.

(TODO: coming soon)

(TODO: coming soon)

According to the Foundation design principles URL values are stored in NSURL objects. All class members referring URLs as strings are deprecated since Feb11 release. So the first thing to do here is to create a NSURL instance containing the URL we are going to use, e.g.:
NSURL *targetUrl = [NSURL urlWithString:@"superhttp://192.168.1.9:8099/bin"]
All three fundamental entities responsible for communication have class methods accepting a NSURL instance as a parameter and returning an instance according to the URL passed.
To create a client channel call:
ROClientChannel *channel = [ROClientChannel channelWithTargetURL:targetURL];
To create a message call:
ROMessage *message = [ROMessage messageMatchingTargetURL:targetURL];
Or just create a service proxy, corresponding channel and message instance will be created implicitly (assuming we have ConcreteProxy class defined for the service proxy):
ConcreteProxy *proxy = [[ConcreteProxy alloc] initWithURL:targetUrl];
Here are more rules of URL schemas usage:
- channelWithTargetURL: and messageMatchingTargetURL: class methods also work for concrete channel and message classes but they always create an instance of own class disregarding the URL.
- Attempting to call channelWithTargetURL: for unsupported protocol type will cause an exception to be thrown.
- Attempting to call messageMatchingTargetURL: for unsupported message identifier will cause ROBinMessage to be created.
Note for iOS users
SOAP messaging support (ROSoapMessage instances creation) is not possible under iOS unless the libxml2 is linked. Please set up necessary linker options in your project if you plan to support SOAP messaging. Read more.
See Also
- Lists
- Namespace Lists for .NET — Java
- Interface Lists for .NET — Delphi — Java
- Protocol List for Xcode
- Class Lists for .NET — Xcode — Delphi — Java
- Object List for JavaScript
- Enum Lists for .NET — Xcode — Delphi — Java
- Alias Lists for Xcode — Delphi
- Implements Lists for .NET — Xcode — Delphi — Java
- Data Types
- File Types
Product: RemObjects SDK
Available Editions: RemObjects SDK for .NET, Delphi, Xcode, Java and JavaScript
Glossary — Architecture — Articles — Features — Library — Samples