ADQLTranslator
Click here for a complete list of operations.
SQLtoADQL
Take an SQL string and convert it to the XML parsetree in ADQL
Test
To test the operation using the HTTP POST protocol, click the 'Invoke' button.SOAP
The following is a sample SOAP request and response. The placeholders shown need to be replaced with actual values.
POST /AdqlTranslator/ADQLTrans.asmx HTTP/1.1 Host: openskyquery.net Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://ws.parser.adql.ivoa.net/SQLtoADQL" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SQLtoADQL xmlns="http://ws.parser.adql.ivoa.net/"> <sql>string</sql> </SQLtoADQL> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SQLtoADQLResponse xmlns="http://ws.parser.adql.ivoa.net/"> <Select xmlns="http://www.ivoa.net/xml/ADQL/v0.7.4"> <Allow Option="All or DISTINCT" /> <Restrict Top="unsignedInt" /> <SelectionList> <Item /> <Item /> </SelectionList> <InTo> <TableName>string</TableName> </InTo> <From> <Table /> <Table /> </From> <Where> <Condition /> </Where> <GroupBy> <Column Table="string" Name="string" xpathName="string" /> <Column Table="string" Name="string" xpathName="string" /> </GroupBy> <Having> <Condition /> </Having> <OrderBy> <Item> <Expression xsi:nil="true" /> <Order xsi:nil="true" /> </Item> <Item> <Expression xsi:nil="true" /> <Order xsi:nil="true" /> </Item> </OrderBy> <StartComment>string</StartComment> <EndComment>string</EndComment> </Select> </SQLtoADQLResponse> </soap:Body> </soap:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /AdqlTranslator/ADQLTrans.asmx/SQLtoADQL?sql=string HTTP/1.1 Host: openskyquery.net
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <Select xmlns="http://www.ivoa.net/xml/ADQL/v0.7.4"> <Allow Option="All or DISTINCT" /> <Restrict Top="unsignedInt" /> <SelectionList> <Item /> <Item /> </SelectionList> <InTo> <TableName>string</TableName> </InTo> <From> <Table /> <Table /> </From> <Where> <Condition /> </Where> <GroupBy> <Column Table="string" Name="string" xpathName="string" /> <Column Table="string" Name="string" xpathName="string" /> </GroupBy> <Having> <Condition /> </Having> <OrderBy> <Item> <Expression /> <Order Direction="ASC or DESC" /> </Item> <Item> <Expression /> <Order Direction="ASC or DESC" /> </Item> </OrderBy> <StartComment>string</StartComment> <EndComment>string</EndComment> </Select>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /AdqlTranslator/ADQLTrans.asmx/SQLtoADQL HTTP/1.1 Host: openskyquery.net Content-Type: application/x-www-form-urlencoded Content-Length: length sql=string
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <Select xmlns="http://www.ivoa.net/xml/ADQL/v0.7.4"> <Allow Option="All or DISTINCT" /> <Restrict Top="unsignedInt" /> <SelectionList> <Item /> <Item /> </SelectionList> <InTo> <TableName>string</TableName> </InTo> <From> <Table /> <Table /> </From> <Where> <Condition /> </Where> <GroupBy> <Column Table="string" Name="string" xpathName="string" /> <Column Table="string" Name="string" xpathName="string" /> </GroupBy> <Having> <Condition /> </Having> <OrderBy> <Item> <Expression /> <Order Direction="ASC or DESC" /> </Item> <Item> <Expression /> <Order Direction="ASC or DESC" /> </Item> </OrderBy> <StartComment>string</StartComment> <EndComment>string</EndComment> </Select>