Programming:
XPath:
SoapUI (if you want to test classic web services - not required this week)
If you're working on a lab computer, you can unzip Linux installation package directly from my account
tar xfzv ~czarnik/xml/soapui-4.6.0-linux-bin.tar.gz
JBoss (version 6.1)
If you're working on a lab computer, you can unzip Linux installation package directly from my account
unzip ~czarnik/xml/jboss-as-distribution-6.1.0.Final.zip
Eclipse
JBoss Tools
and choose a version for your Eclipse. From the list of packages select only JAX-RS Tools, JBossWS Tools and JBoss AS Tools.
Start the JBoss server and run the project REST in it (e.g. Servers / Add and Remove). Test for example hello?who=Ja.
Go to class Kalkulator
, test it (using web browser). Then add more arithmetic operations accessible in the same way as addition.
Go to class XPath
, test it (using web browser).
Add new parameter xpath
and make the method return the result of the given expression
(it should evaluate to a single node). If the parameter is not given (or empty), return the whole document, as it is now.
All right, there are some technical issues. If you don't know how to manage them, here is an example solution.
Test the service. Note that slash signs /
must be replaced with %2F
in URLs.
Jeśli starczy czasu, można zacząć zajmować się samym XPath (za tydzień będzie XPath i XQuery). Można tu użyć stworzonej właśnie usługi, albo okienka XPath w Eclipse (perspektywa "XML").
Za pomocą XPath wybierz określone elementy dokumentu przyklad.xml lub wyraź określone konstrukcje.
E4
,wyr
,