...
We must implement our service in java. In directory src/main/java/org/apache/servicemix/examples is generated java file ExampleService.java.
So, we must rename this file to HelloImpl.java and change its content on this:
Code Block | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
package org.apache.servicemix.examples; import javax.jws.WebService; import javax.xml.ws.Holder; import org.apache.servicemix.examples.types.SayHello; import org.apache.servicemix.examples.types.SayHelloResponse; @WebService(serviceName = "HelloService", targetNamespace = "http://servicemix.apache.org/examples", endpointInterface = "org.apache.servicemix.examples.Hello") public class HelloImpl implements Hello { public void sayHello(Holder<String> name) throws UnknownWordFault { if (name.value == null || name.value.length() == 0) { org.apache.servicemix.examples.types.UnknownWordFault fault = new org.apache.servicemix.examples.types.UnknownWordFault(); throw new UnknownWordFault(null, fault); } name.value = "Hi " + name.value; } } |
...