rookie questions

154 views
Skip to first unread message

Desmond Ching

unread,
Jun 17, 2014, 8:56:37 PM6/17/14
to infoconnect-deve...@googlegroups.com
hi everybody, i just got access to the treis data, and i am just looking to see if anyone would be kind enough to give me an extremely basic and simple rundown of how to implement it please. [and apologies for the bad grammer, my shift keys appear to be out of action, i only have lower case...]

Jo - Mesh|net

unread,
Jun 17, 2014, 10:57:07 PM6/17/14
to infoconnect-deve...@googlegroups.com, nzs...@gmail.com, bombe...@gmail.com
Hi Desmond (and probably Siva too)

If you're doing it via the TREIS REST interface you can see the data schema at https://infoconnect1.highwayinfo.govt.nz/ic/jbi/TREIS/SOAP/FeedService/main.wsdl (via your browser)

To query the interface and get the events you need to GET from https://infoconnect1.highwayinfo.govt.nz/ic/jbi/TREIS/REST/FeedService/  the trick is to add a HTTP header with your username and password

e.g. using curl:

curl --insecure --header "username: YOURUSERNAME" --header "password: YOURPASSWORD"  https://infoconnect1.highwayinfo.govt.nz:443/ic/jbi/TREIS/REST/FeedService/
(I use the insecure option to save having to store/validate certs)

A request might look like this:

Accept-Encoding: gzip,deflate
username: YOURUSERNAME
password: YOURPASSWORD
Connection: Keep-Alive
User-Agent: EdgeFrontier/6.2


If you're using SOAP you need a WSSE header added with your API username and password. The wsdl doesn't explicitly ask for it.

eg:


   <soapenv:Header>
         <wsse:UsernameToken>
            <wsse:Username>YOURUSERNAME</wsse:Username>
            <wsse:Password Type="PasswordText">YOURPASSWORD</wsse:Password>
          </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <tre:GetTreisInfoRequest/>
   </soapenv:Body>
</soapenv:Envelope>


I hope these get you started.

Jo Booth - Mesh|net
Connecting Communities



On 18 June 2014 12:56, Desmond Ching <bombe...@gmail.com> wrote:
hi everybody, i just got access to the treis data, and i am just looking to see if anyone would be kind enough to give me an extremely basic and simple rundown of how to implement it please. [and apologies for the bad grammer, my shift keys appear to be out of action, i only have lower case...]

--
You received this message because you are subscribed to the Google Groups "InfoConnect Developers Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infoconnect-developers...@googlegroups.com.
To post to this group, send email to infoconnect-deve...@googlegroups.com.
Visit this group at http://groups.google.com/group/infoconnect-developers-discussion.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages