
1. Open a socket with
xapi-test.covad.com, port 80 for the test site,
- or -
xapi.covad.com, port 80 for production
2. Send an HTTP request like this one:
![]()
POST /servlet/MainVCAServlet HTTP/1.0
Content-Type: text/xml
User-Agent: xLinkClient
Content-length: 544
<?xml version="1.0" standalone="no"?>
<!DOCTYPE request SYSTEM "http://xapi.covad.com/dtd/request.dtd">
<request>
<header>
<sender>
<key>
<login>YOUR LOGIN ID</login>
<password>YOUR PASSWORD</password>
</key>
</sender>
</header>
<body>
<subrequest type="serviceavailability">
<serviceavailabilityrequest>
<address>
<street1>1016 Asbury Way</street1>
<city>Mountain View</city>
<state>CA</state>
<zip>94043</zip>
</address>
</serviceavailabilityrequest>
</subrequest>
</body>
</request>
2.1 The first line lists the action, resource and protocol.
You'll use the same first line
2.2 Content-type. Our server supports various formats,
but text/xml is the easiest for posting XML.
2.3 User-agent. This should be the name of your client program.
2.4 Content-length. This is the number of bytes in your content
(XML request), not including these header lines.
It's very important to get this number right.
2.5 Blank line. Marks the end of the header.
Content (XML request) begins with the next line.
Content-length should be the number of bytes following
the blank line (end-of-header). This must be accurate.
3. Read from the socket until end-of-file.
You'll receive something like this:
![]()
HTTP/1.0 200 OK
Server: WebLogic 4.0.4 08/31/1999 16:41:16 #51196 - internal build by br on client br.santiago
Content-Type: text/xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE response SYSTEM "http://xapi.covad.com/dtd/response.dtd" >
...
![]()
3.1 Protocol version, response code and response string.
3.2 Server information
3.3 Return content type
3.4 Blank line, followed by content (XML response)