Forum OpenACS Q&A: Re: TCL RCP and Web services.

Collapse
Posted by Dan Wickstrom on
I tried it again, and I am able to get a token now. Here is a sample run, from nscp, where I use nsjava and apache-axis to access the google web service:


openacs4:nscp 3> set service [nsjava::new com.amazon.soap.axis.AmazonSearchServiceLocator]
nsjava0x2
openacs4:nscp 4> set url [nsjava::new {java.net.URL String} "http://soap.amazon.com/onca/soap"]
nsjava0x3
openacs4:nscp 5> set port [$service {getAmazonSearchPort java.net.URL} $url]
nsjava0x4
openacs4:nscp 6> set request [nsjava::new com.amazon.soap.axis.AuthorRequest]
nsjava0x5
openacs4:nscp 7> $request {setAuthor String} "philip greenspun"

openacs4:nscp 8> $request {setPage String} "1"

openacs4:nscp 9> $request {setMode String} "books"

openacs4:nscp 10> $request {setTag String} "webservices-20"

openacs4:nscp 11> $request {setType String} "lite"

openacs4:nscp 12> $request {setDevTag String} "D3XXXXXXXXXXX"

openacs4:nscp 13> set result [$port {authorSearchRequest com.amazon.soap.axis.AuthorRequest} $request]
nsjava0x6
openacs4:nscp 14> set details [$result getDetails]
nsjava0x7
openacs4:nscp 15> set detail0 [$details get 0]
nsjava0x8
openacs4:nscp 16> $detail0 getProductName
Philip and Alex's Guide to Web Publishing
openacs4:nscp 17> set authors [$detail0 getAuthors]
nsjava0x9
openacs4:nscp 18> $authors get 0
Philip Greenspun
openacs4:nscp 19> $detail0 getReleaseDate
April, 1999
openacs4:nscp 20> $detail0 getListPrice
$44.95
openacs4:nscp 21> 
openacs4:nscp 22> set detail1 [$details get 1]
nsjava0xa
openacs4:nscp 23> $detail1 getProductName
Travels with Samantha
openacs4:nscp 24> set detail2 [$details get 2]
nsjava0xb
openacs4:nscp 25> $detail2 getProductName
Database Backed Web Sites: The Thinking Person's Guide to Web Publishing
openacs4:nscp 26> 

It's also interesting to note I was able to access amazon's web service from behind a firewall using the proxy support that is built into apache axis.