File tree Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22mkdir -p " build" && \
33echo " Building services..." && \
4- javac -d " build" -classpath " build" $( echo ` pwd` ) /src/org/cackharot/services/ HelloService.java && \
5- javac -d " build" -classpath " build" $( echo ` pwd` ) /src/org/cackharot/services/publisher/ HelloServicePublisher.java && \
6- java -classpath " build" org.cackharot.services.publisher. HelloServicePublisher
4+ javac -d " build" -classpath " build" $( echo ` pwd` ) /src/org/HelloService.java && \
5+ javac -d " build" -classpath " build" $( echo ` pwd` ) /src/org/HelloServicePublisher.java && \
6+ java -classpath " build" org.HelloServicePublisher
Original file line number Diff line number Diff line change 1- package org . cackharot . services ;
1+ package org ;
22
33import javax .jws .WebMethod ;
44import javax .jws .WebService ;
55
66@ WebService
77public class HelloService {
8- private String message = new String ("Hello, " );
9-
10- public void Hello () {}
11-
128 @ WebMethod
139 public String sayHello (String name ) {
14- return message + name + "." ;
10+ return String . format ( "Hello, %s!" , name ) ;
1511 }
1612
1713 @ WebMethod
Original file line number Diff line number Diff line change 1- package org .cackharot .services .publisher ;
1+ package org ;
2+
3+ import org .HelloService ;
24
35import com .sun .net .httpserver .BasicAuthenticator ;
46import com .sun .net .httpserver .HttpContext ;
57import com .sun .net .httpserver .HttpServer ;
6- import org .cackharot .services .HelloService ;
78
8- import javax .xml .ws .Binding ;
99import javax .xml .ws .Endpoint ;
10- import javax .xml .ws .handler .Handler ;
11- import javax .xml .ws .handler .MessageContext ;
1210import java .io .IOException ;
1311import java .net .InetSocketAddress ;
14- import java .util .ArrayList ;
15- import java .util .List ;
1612
1713public class HelloServicePublisher {
1814 public static void main (String [] args ) throws IOException {
@@ -39,5 +35,4 @@ private static void printInfo(String url) {
3935 System .out .println (String .format ("Starting the service at %s" , url ));
4036 System .out .println (String .format ("See WSDL at %s?wsdl" , url ));
4137 }
42-
4338}
You can’t perform that action at this time.
0 commit comments