About SOAP, and how to use it to be able to advertise wthin your .tel
To prevent "SOAP-ERROR", you should download the client.wsdl from your Telhosting provider,
Respectively:
To be able to advertise within your .tel, you need "internal SOAP API" form your .tel registrar.
Follow the instructions in the Telhosting_Client.php script:
With PHP, you MUST download the client.wsdl file from your provider, modify it a little bit, and then things will go fine. This information is contained at the top o the Telhosting_Client.php script.:
Code:
* 1. Download the client WSDL from YOUR registrar, save it in the same directory as this file and name the downloaded file: client.wsdl
*
* 1.5 Don't know where your registrar put the WSDL file? Open an command-line client on UNIX and write: dig _soap._nspapi.yourdomain.tel naptr where you replace yourdomain with your actual domain. Then take either the http or https url and append to it "?wsdl" (so it will end in "...client?wsdl")
* That's the url for your registrar's WSDL file.
*
* 2. Edit client.wsdl -- find the string: "http://www.w3.org/2003/05/soap/bindings/HTTP/" and replace it by: "http://schemas.xmlsoap.org/soap/http". If you don't do that, PHP will throw a fatal error: "SOAP-ERROR: Parsing WSDL: PHP-SOAP doesn't support transport 'http://www.w3.org/2003/05/soap/bindings/HTTP/'".
There's a very good PHP DNS library that you should be using. It's called gDNS, and it can be found at phpclasses.org.
It's used very effectively in the .tel WordPress plugin:
(If if you PHP haven't SSL support, try to use:
telhosting.domainmonster.com/client?wsdl=1 , with the http:// infront.)
Excursion:
WSDL 1.0 (Sept. 2000) has been developed by IBM, Microsoft and Ariba to describe Web Services for their SOAP toolkit.
WSDL 1.1, published on March 2001, is the formalization of WSDL 1.0. No major changes were introduced between 1.0 and 1.1.
WSDL 1.2 (June 2003) is still a working draft at W3C. According to W3C: WSDL 1.2 is easier and more flexible for developers than the previous version. WSDL 1.2 attempts to remove non-interoperable features and also defined the better HTTP 1.1 binding. WSDL 1.2 was not supported by most of the SOAP servers/vendors.
WSDL 2.0 became a W3C recommendation on June 2007. WSDL 1.2 was renamed to WSDL 2.0 because it has substantial differences from WSDL 1.1. The changes are:
* Adding further semantics to the description language
* Removal of message constructs
* No support for operator overloading
* PortTypes renamed to interfaces
* Ports renamed to endpoints.
There was some fit between WIDL and the XML-RPC system by UserLand. The former has since faded away, as message-based XML technologies have proven more popular than their procedural equivalents. The latter seems to be giving way to SOAP, which has support for message-oriented as well as procedural approaches.
SOAP describes envelope and message formats, and has a basic request/response handshake protocol. Additionally, Microsoft developed the SOAP Contract Language (SCL) earlier this year to provide a system for on-line service descriptions for SOAP-based applications. This work in SCL, in addition to other protocols and related work from IBM and Ariba, has pretty much been phased into WSDL.
Telnic Ltd. provides a Java-based TelHosting Software application. This application interacts with the DNS directly, and exposes a publicly available web service, using SOAP over HTTP as its protocol. Client applications implementing this SOAP interface can work with the TelHosting Software application to perform all .tel-related operations.
All APIs work by receiving request messages from the clients and sending response messages back to them unless the request message requires no response. All messages are expressed in XML, and their respective syntax is specified by an XML schema; see List of Schema Files. The messages must follow the specific format, see Message Format.
.[COLOR="Silver"]
[SIZE=1]---------- Post added at 08:30 AM ---------- Previous post was at 07:28 AM ----------[/SIZE]
[/COLOR].
Advertising records for advertising within .tel; "Request-response" principle:
[U]WSDL Operation Types[/U]
The request-response type is the most common operation type.
Type:
Request-response
Definition:
The operation can receive a request and will return a response.
In the example above, the port "glossaryTerms" defines a request-response operation called "getTerm".
The "getTerm" operation requires an input message called "getTermRequest" with a parameter called "term", and will return an output message called "getTermResponse" with a parameter called "value".
.
WSDL bindings defines the message format and protocol details for a web service.
[B]learn about SOAP and Web Services.[/B]
SOAP:
SOAP is a simple XML-based protocol that allows applications to exchange information over HTTP.
Or more simply: SOAP is a protocol for accessing a web service.
SOAP Tutorial:
SOAP HTTP Binding
This chapter is an introduction to the SOAP HTTP binding.
A SOAP method is an HTTP request/response that complies with the SOAP encoding rules.
HTTP + XML = SOAP
.
.
[COLOR="SeaGreen"]FINAL CONCLUSION FOR ADVERTISING WITHIN .TEL:
1.) You must use SOAP with 'storeRecord' for adding TXT ('.tad') with '_ad' as
owner.
2.) To be able to use SOAP: download the client.wsdl file from your provider, modify it a little bit.
3.) Save it in the same directory as the Telhosting_Client.php script, and name the downloaded file: client.wsdl.
4.) Edit client.wsdl, according to the Telhosting_Client.php script.
If if your PHP hasn''t SSL support: try to use:
telhosting.domainmonster.com/client?wsdl=1 , with the http:// infront.
5.) Create Advertisement TXT records for your .tel domain, according to the following syntax:
Example Advert:
Plumber
24 Hour Fast Response Plumbers
10% Book Online Discount Today!
xwww.ReactFast.co.uk/Plumbers
Syntax:
<typ:storeRecordRequest domainName=" stead.tel">
<typ:txt profiles="_all_" owner="_ad">
<typ:text>.tad</typ:text>
<typ:text>1</typ:text>
<typ:text>1</typ:text>
<typ:text>51</typ:text>
<typ:text>Plumber</typ:text>
<typ:text>xwww.ReactFast.co.uk/Plumbers</typ:text>
<typ:text>xxxx://www.reactfast.co.uk=243423543&z=42342343</typ:text>
<typ:text></typ:text>
<typ:text>desc</typ:text>
<typ:text>24 Hour Fast Response Plumbers</typ:text>
<typ:text>desc</typ:text>
<typ:text>10% Book Online Discount Today !</typ:text>
</typ:txt>
</typ:storeRecordRequest>
Scheme:
storeRecordRequest for Domain Name
Folder
Suffix
Position (Display Preference)
Location
Sort Sequence
Title
.
.
Etc.[/COLOR]
.
[COLOR="Red"]Good luck!:
Please send a feedback, about your achievements with advertising within your .tel domain.
Thank you, for your patience, and staying power, etc.
Your
MacTel[/COLOR] :wave:
.
P.S.:
To find the correct end-point for your .tel domain, use
DIG/nslookup commands and query _soap._nspapi.yourTelDomain.tel.
The returned records should point to the addresses of the endpoint, such as MyTelProvider:80/client
For more questions on SOAP, please consult our newly updated FAQ materials.
.
There is also a SOAP forum at the Telnic website.
.
[COLOR="Purple"]Each registrar has its own Telhosting platform, and therefore its own SOAP API entrypoint. You can find the SOAP entrypoints in http and https for your domain by simply querying the NAPTR records for:
_soap._nspapi.[YOUR-DOMAIN].tel
This is called "autoprovisioning", and you can use it to automagically find the right SOAP API entrypoints. Similarly, you can find the web interface (and therefore JSON) entrypoints with:
_web._nspapi.[YOUR-DOMAIN].tel
Please use your correct API url, it should work.
Here's an example in PHP of how to find a domain's SOAP API entrypoint, otherwise called "autoprovisioning":
<?php
$dom = 'MYDOMAIN.tel';
$pattern = "/(https:.+)!\" \.$/m";
$dig = shell_exec("dig @208.67.222.222 _soap._nspapi.${dom} naptr");
if (preg_match($pattern, $dig, $regs)) {
echo "The https URL for the SOAP API is: {$regs[1]}\n";
};
?>
[/COLOR]
.
Quote from Pierre:
"I confirm using the good WSDL will definitely help!
You have to be carefull with the WSDL. The PHP SOAP implementation is bugged, and it won't validate the transport binding URL (differences between SOAP 1.1 and SOAP 1.2). A bug report has been filled so you can expect it to be resolved in the next stable version of PHP. By the meantime, there is fortunately a workaround:
1. Download the client WSDL from your registrar, save it in the same directory than the TelHosting? class and name the downloaded file: client.wsdl.
2. Edit client.wsdl -- find the string: "http://www.w3.org/2003/05/soap/bindings/HTTP/" and replace it by: "http://schemas.xmlsoap.org/soap/http". If you don't do that, PHP will throw a fatal error: "SOAP-ERROR: Parsing WSDL: PHP-SOAP doesn't support transport 'http://www.w3.org/2003/05/soap/bindings/HTTP/'".
3. Edit the TelHosting? class -- look for: $config['wsdl'] (around line 173) and set the variable to: "./client.wsdl" instead of the full URL. PHP SOAP implementation uses fopen() to get the WSDL so you can specify a local file instead of an URL.
4. Retry, it should work! "
.
Sample PHP code at:
dev.telnic.org/trac/browser/apps/php/trunk
Update of the sample PHP code to support automatic de-duplication of keywords. Automatic de-duplication is on by default. You can turn it off by writing:
$client->set_search_data($domain, $keywords->searchData, FALSE);
.
BTW:
1993, 16 years ago, a IT speciallist commented:
"It would be useful to take advantage of the widespread use and scaleability of the DNS to store information that has not been previously defined."
Seven years later, ca. 2000, a company named "Telnic", picked up the idea, to create "dot tel".
Mind you: dot tel could of been create 20 years ago. Or 15, or 10 years ago. Anyway: It is here, now. Probably the best time, as people are crazy after iPhones, and nearly every kidd has a iPhone. Just whait and see...
.
.
Quote Henry:
"One last point: the TelHosting control panel won't support ad management, that's not its purpose. I inserted the ad above using the APIs, but I suspect that ad providers will be doing something even simpler by providing an ad DNS server."
Personal comment:
Henry, I do not agree with you in the slightest.
The TelHosting control panel should indeed support ad management.
Yes, oh yes, oh yes...
Users want to post their adverts in a easier way.
But, ok: Once they set up their internal SOAP API, and they now about the syntax rules, storing the advertisment records, should be quit easy, then.
But I guess, many users would be put off, by the complecated SOAP API stuff.
Give them something, that works aout of the box, and is easy to control, and to handle.
You can say, this, and that, Henry, but if it won't be good for business, it won't be good for business, and that is that.
You got to decide, if you want to be restrictive, because it is the concept, that has to be so, or if you want to give in, and adapt to what the community of .tel domain owners and users would like to use.
.
It is not cool, to have "Advertising within .tel" announced, by the world press, and then only a few developers, who have been struggling since five months, and finally grasped the proceeding, are capable of putting ads on the TelProxy. Only showing off with their achievments, but not wanting to help others, to troubleshoot.
It is another desaster, just like the "Contact Us" page (integrating .tel in your existing website), which is not applyable as intended by Telnic, because the LOC records are not working.
It is better to announce something that works 100%, than announce half developed things.
It is the sad truth, Henry, and it is your responsibility, to make things better in future.
We can't have a disaster every time, "average .tel user" wants to improve his .tel domain.
.
Edit:
kprobe's tool at mytel.me, is fine, but not all users want to only depend on the tool at mytel.me, even if it is a good tool: Users might want to be able to manage their advertisments by coding their TXT records, etc, by their own.
(An advertisment is a TXT record with the '.tad' prefix, placed in the '_ad sub-domain' of the current domain, such as '
_ad.mybusiness.tel'.
The syntax of the ad record, is specified by an XML schema.
To be able to advertise within your .tel, you need "
internal SOAP API" from your .tel registrar / provider:
SOAP is a simple XML-based protocol that allows applications to exchange information over HTTP.
HTTP + XML = SOAP
Or more simply: SOAP is a protocol for accessing a web service.
To be able to advertise within your .tel, you need
the client.wsdl file from your .tel registrar / provider:
WSDL bindings defines the message format and protocol details for a web service.
To store a ad record in the '_ad' folder, set its owner within the syntax of the ad record correctly to
owner="_ad". This way, you don't need to create a folder separately:
<typ:storeRecordRequest domainName="mybusiness.tel">
<typ:txt profiles="_all_" owner="_ad">
But: the TelHosting control panel won't support ad management. You have to inserted your ad by using the APIs,
Telnic Ltd. provides a Java-based TelHosting Software application. This application interacts with the DNS directly, and exposes a publicly available web service, using SOAP over HTTP as its protocol. Client applications implementing this SOAP interface can work with the TelHosting Software application to perform all .tel-related operations.
In addition to the client service API, the TelHosting Software exposes an internal API for administration purposes.
To be able to advertise within your .tel, you need "internal SOAP API", as well as client.wsdl file from your .tel registrar / provider, and then modify the file a little bit:
Find the string: "http://www.w3.org/2003/05/soap/bindings/HTTP/" and replace it by: "http://schemas.xmlsoap.org/soap/http".
Edit the TelHosting class: look for: $config['wsdl'] (around line 173) and set the variable to: "./client.wsdl" instead of the full URL.
And now, you can
insert your ad records by using the APIs.
And your advertisement should show up, on your TelProxy.)
.
It may be complecated, but that is how it is:
Currently, you can choose between doing it your self, or going to mytel.me. and use the tool, which is offered to use, and which is free.
The guys from Jepaa, will soon come up with a solution, which you will be able to find within TEL-MACHINE,
Have fun!
.