1 / 10

IDU0075 Veebiteenused

IDU0075 Veebiteenused. Tarvo Treier Tarvo.treier@gmail.com. Sisukord. JAX-WS Netbeans IDE & GlassFish server (install) Veebiteenuse loomise võimalused Kliendi loomine Javas. Java API for XML Web Service ( JAX-WS ). The world of JAX-WS.

Download Presentation

IDU0075 Veebiteenused

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IDU0075 Veebiteenused Tarvo Treier Tarvo.treier@gmail.com

  2. Sisukord • JAX-WS • Netbeans IDE & GlassFish server (install) • Veebiteenuse loomise võimalused • Kliendi loomine Javas Tarvo Treier tarvo.treier@gmail.com

  3. Java API for XML Web Service (JAX-WS) Tarvo Treier tarvo.treier@gmail.com

  4. The world of JAX-WS JAX-WS on kõrgtaseme API veebiteenuste pakkumiseks ja tarbimiseks. SAAJ (Attachments API for Java) – sellega saab SOAP sõnumitega manipuleerida (luua, muuta header, body elementi, lisada XML dokumente body sisse). JAX–WS (Java API for XML WS) – kasutab SAAJ ja on abstraktsioonikiht selle peal, et me ei peaks pisikeste detailidega mässama. Tarvo Treier tarvo.treier@gmail.com

  5. SAAJ vs JAX-WS Vaatame SAAJ nagu XML vaadet ja JAX-WS-i nagu objektivaadet SOAP sõnumitele. JAX-WS varjab meie eest XML struktuuri. (JAX-WS-i peamine komponent on javax.jws. Seal on ainult 6 annotatsiooni ja üks enum.) (JAX-WS asendab JAX-RPC API) Tarvo Treier tarvo.treier@gmail.com

  6. Netbeans IDE & GlassFish server • Soovituslik keskkond praktikumides ja projekti realiseerimiseks. • Installeerimisjuhendi viide: /idu0075/2014/Netbeansi installeerimise juhend.docx Tarvo Treier tarvo.treier@gmail.com

  7. Veebiteenuse loomise võimalused • WSDL ->Java • Java -> WSDL • Alustades Java-st ja WSDL-st korraga Tarvo Treier tarvo.treier@gmail.com

  8. JAVA->WSDL (JAX-WS) • Teenuse loomine kasutades ainult JAX-WS-i. Loome lihtsa java klassi suvalise vahendiga. import javax.jws.WebMethod; import javax.jws.WebService; @WebService public class HelloWorld { @WebMethod public String hello(String name){ return "Hello " +name; } } Tarvo Treier tarvo.treier@gmail.com

  9. Veebiteenuse publitseerimine localhost-s (JAX-WS) import javax.xml.ws.Endpoint; public class Main { public static void main(String[] args) {Endpoint.publish(“http://localhost:8088/WS/Greeting”, new HelloWorld()); } } Tarvo Treier tarvo.treier@gmail.com

  10. Veebiteenusele kliendi loomine (NetBeans) • Veebiteenuse kliendi genereerimine WSDL-i põhjal kasutades NetBeans-i. • Vihje: new ->webserviceclient... • Video: Consuming a Web Service using netbeans 7 Tarvo Treier tarvo.treier@gmail.com

More Related