Commit 1f0036c7 authored by Administrator's avatar Administrator

Initial commit

parents
/target/
.classpath
.settings
.project
This diff is collapsed.
# Ejemplos básicos de Servicios Web
Ejemplos de Servicios Web incluidos en el Tema 6.1 de la asignatura DAI.
\ No newline at end of file
GET /ts?wsdl HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: localhost:9876
User-Agent: libwww-perl/6.03
\ No newline at end of file
HTTP/1.1 200 OK
Transfer-encoding: chunked
Content-type: text/xml;charset="utf-8"
<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is
JAX-WS RI 2.1.6 in JDK 6. -->
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is
JAX-WS RI 2.1.6 in JDK 6. -->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://ts.ws.dai.esei.uvigo.es/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ts.ws.dai.esei.uvigo.es/"
name="TimeServiceImplService">
<types>
</types>
<message name="getTimeAsString">
</message>
<message name="getTimeAsStringResponse">
<part name="return" type="xsd:string">
</part>
</message>
<message name="getTimeAsElapsed">
</message>
<message name="getTimeAsElapsedResponse">
<part name="return" type="xsd:long">
</part>
</message>
<portType name="TimeService">
<operation name="getTimeAsString">
<input message="tns:getTimeAsString">
</input>
<output message="tns:getTimeAsStringResponse">
</output>
</operation>
<operation name="getTimeAsElapsed">
<input message="tns:getTimeAsElapsed">
</input>
<output message="tns:getTimeAsElapsedResponse">
</output>
</operation>
</portType>
<binding name="TimeServiceImplPortBinding" type="tns:TimeService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="rpc">
</soap:binding>
<operation name="getTimeAsString">
<soap:operation soapAction="">
</soap:operation>
<input>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/">
</soap:body>
</input>
<output>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/">
</soap:body>
</output>
</operation>
<operation name="getTimeAsElapsed">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/"></soap:body>
</input>
<output>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/"></soap:body>
</output>
</operation>
</binding>
<service name="TimeServiceImplService">
<port name="TimeServiceImplPort" binding="tns:TimeServiceImplPortBinding">
<soap:address location="http://localhost:9876/ts"></soap:address>
</port>
</service>
</definitions>
\ No newline at end of file
HTTP/1.1 200 OK
Transfer-encoding: chunked
Content-type: text/xml;charset="utf-8"
<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is
JAX-WS RI 2.1.6 in JDK 6. -->
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is
JAX-WS RI 2.1.6 in JDK 6. -->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://ts.ws.dai.esei.uvigo.es/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ts.ws.dai.esei.uvigo.es/"
name="TimeServiceImplService">
<types>
</types>
<message name="getTimeAsString">
</message>
<message name="getTimeAsStringResponse">
<part name="return" type="xsd:string">
</part>
</message>
<message name="getTimeAsElapsed">
</message>
<message name="getTimeAsElapsedResponse">
<part name="return" type="xsd:long">
</part>
</message>
<portType name="TimeService">
<operation name="getTimeAsString">
<input message="tns:getTimeAsString">
</input>
<output message="tns:getTimeAsStringResponse">
</output>
</operation>
<operation name="getTimeAsElapsed">
<input message="tns:getTimeAsElapsed">
</input>
<output message="tns:getTimeAsElapsedResponse">
</output>
</operation>
</portType>
<binding name="TimeServiceImplPortBinding" type="tns:TimeService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="rpc">
</soap:binding>
<operation name="getTimeAsString">
<soap:operation soapAction="">
</soap:operation>
<input>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/">
</soap:body>
</input>
<output>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/">
</soap:body>
</output>
</operation>
<operation name="getTimeAsElapsed">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/"></soap:body>
</input>
<output>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/"></soap:body>
</output>
</operation>
</binding>
<service name="TimeServiceImplService">
<port name="TimeServiceImplPort" binding="tns:TimeServiceImplPortBinding">
<soap:address location="http://localhost:9876/ts"></soap:address>
</port>
</service>
</definitions>
\ No newline at end of file
POST /ts HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Host: localhost:9876
User-Agent: SOAP::Lite/Perl/0.714
Content-Length: 449
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://ts.ws.dai.esei.uvigo.es/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<tns:getTimeAsString xsi:nil="true" />
</soap:Body>
</soap:Envelope>
\ No newline at end of file
HTTP/1.1 200 OK
Transfer-encoding: chunked
Content-type: text/xml;charset="utf-8"
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getTimeAsStringResponse xmlns:ns2="http://ts.ws.dai.esei.uvigo.es/">
<return>Sun Set 16 19:44:41 CET 2012</return>
</ns2:getTimeAsStringResponse>
</S:Body>
</S:Envelope>
\ No newline at end of file
HTTP/1.1 500 Internal Server Error
Transfer-encoding: chunked
Content-type: text/xml;charset="utf-8"
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Server</faultcode>
<faultstring>Error produced</faultstring>
<detail>
<ns2:TimeException xmlns:ns2="http://ts.ws.dai.esei.uvigo.es/">
<faultInfo>Forced error</faultInfo>
<message>Error produced</message>
</ns2:TimeException>
<ns2:exception xmlns:ns2="http://jax-ws.dev.java.net/"
class="es.uvigo.esei.dai.ws.ts.TimeException"
note="To disable this feature, set com.sun.xml.internal.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false">
<message>Error produced</message>
<ns2:stackTrace>
<ns2:frame class="es.uvigo.esei.dai.ws.ts.TimeServiceImpl"
file="TimeServiceImpl.java" line="23" method="faultOperation" />
<ns2:frame class="sun.reflect.NativeMethodAccessorImpl"
file="NativeMethodAccessorImpl.java" line="native" method="invoke0" />
<ns2:frame class="sun.reflect.NativeMethodAccessorImpl"
file="NativeMethodAccessorImpl.java" line="39" method="invoke" />
<ns2:frame class="sun.reflect.DelegatingMethodAccessorImpl"
file="DelegatingMethodAccessorImpl.java" line="25" method="invoke" />
<ns2:frame class="java.lang.reflect.Method" file="Method.java"
line="597" method="invoke" />
<ns2:frame class="com.sun.xml.internal.ws.api.server.InstanceResolver$1"
file="InstanceResolver.java" line="235" method="invoke" />
<ns2:frame class="com.sun.xml.internal.ws.server.InvokerTube$2"
file="InvokerTube.java" line="135" method="invoke" />
<ns2:frame
class="com.sun.xml.internal.ws.server.sei.EndpointMethodHandler"
file="EndpointMethodHandler.java" line="246" method="invoke" />
<ns2:frame class="com.sun.xml.internal.ws.server.sei.SEIInvokerTube"
file="SEIInvokerTube.java" line="82" method="processRequest" />
<ns2:frame class="com.sun.xml.internal.ws.api.pipe.Fiber"
file="Fiber.java" line="587" method="__doRun" />
<ns2:frame class="com.sun.xml.internal.ws.api.pipe.Fiber"
file="Fiber.java" line="546" method="_doRun" />
<ns2:frame class="com.sun.xml.internal.ws.api.pipe.Fiber"
file="Fiber.java" line="531" method="doRun" />
<ns2:frame class="com.sun.xml.internal.ws.api.pipe.Fiber"
file="Fiber.java" line="428" method="runSync" />
<ns2:frame class="com.sun.xml.internal.ws.server.WSEndpointImpl$2"
file="WSEndpointImpl.java" line="232" method="process" />
<ns2:frame
class="com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpToolkit"
file="HttpAdapter.java" line="460" method="handle" />
<ns2:frame class="com.sun.xml.internal.ws.transport.http.HttpAdapter"
file="HttpAdapter.java" line="233" method="handle" />
<ns2:frame
class="com.sun.xml.internal.ws.transport.http.server.WSHttpHandler"
file="WSHttpHandler.java" line="95" method="handleExchange" />
<ns2:frame
class="com.sun.xml.internal.ws.transport.http.server.WSHttpHandler"
file="WSHttpHandler.java" line="80" method="handle" />
<ns2:frame class="com.sun.net.httpserver.Filter$Chain"
file="Filter.java" line="65" method="doFilter" />
<ns2:frame class="sun.net.httpserver.AuthFilter" file="AuthFilter.java"
line="65" method="doFilter" />
<ns2:frame class="com.sun.net.httpserver.Filter$Chain"
file="Filter.java" line="68" method="doFilter" />
<ns2:frame class="sun.net.httpserver.ServerImpl$Exchange$LinkHandler"
file="ServerImpl.java" line="555" method="handle" />
<ns2:frame class="com.sun.net.httpserver.Filter$Chain"
file="Filter.java" line="65" method="doFilter" />
<ns2:frame class="sun.net.httpserver.ServerImpl$Exchange"
file="ServerImpl.java" line="527" method="run" />
<ns2:frame class="java.util.concurrent.ThreadPoolExecutor$Worker"
file="ThreadPoolExecutor.java" line="886" method="runTask" />
<ns2:frame class="java.util.concurrent.ThreadPoolExecutor$Worker"
file="ThreadPoolExecutor.java" line="908" method="run" />
<ns2:frame class="java.lang.Thread" file="Thread.java"
line="662" method="run" />
</ns2:stackTrace>
</ns2:exception>
</detail>
</S:Fault>
</S:Body>
</S:Envelope>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net.
RI's version is JAX-WS RI 2.1.6 in JDK 6. -->
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net.
RI's version is JAX-WS RI 2.1.6 in JDK 6. -->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://ts.ws.dai.esei.uvigo.es/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ts.ws.dai.esei.uvigo.es/"
name="TimeServiceImplService">
<types>
<xsd:schema>
<xsd:import namespace="http://ts.ws.dai.esei.uvigo.es/"
schemaLocation="http://localhost:9876/ts?xsd=1"></xsd:import>
</xsd:schema>
</types>
<message name="getTimeAsString">
<part name="parameters" element="tns:getTimeAsString"></part>
</message>
<message name="getTimeAsStringResponse">
<part name="parameters" element="tns:getTimeAsStringResponse"></part>
</message>
<message name="getTimeAsElapsed">
<part name="parameters" element="tns:getTimeAsElapsed"></part>
</message>
<message name="getTimeAsElapsedResponse">
<part name="parameters" element="tns:getTimeAsElapsedResponse"></part>
</message>
<portType name="TimeService">
<operation name="getTimeAsString">
<input message="tns:getTimeAsString"></input>
<output message="tns:getTimeAsStringResponse"></output>
</operation>
<operation name="getTimeAsElapsed">
<input message="tns:getTimeAsElapsed"></input>
<output message="tns:getTimeAsElapsedResponse"></output>
</operation>
</portType>
<binding name="TimeServiceImplPortBinding" type="tns:TimeService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"></soap:binding>
<operation name="getTimeAsString">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
<operation name="getTimeAsElapsed">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
</binding>
<service name="TimeServiceImplService">
<port name="TimeServiceImplPort" binding="tns:TimeServiceImplPortBinding">
<soap:address location="http://localhost:9876/ts"></soap:address>
</port>
</service>
</definitions>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net.
RI's version is JAX-WS RI 2.1.6 in JDK 6. -->
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net.
RI's version is JAX-WS RI 2.1.6 in JDK 6. -->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://ts.ws.dai.esei.uvigo.es/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ts.ws.dai.esei.uvigo.es/"
name="TimeServiceImplService">
<types></types>
<message name="getTimeAsString"></message>
<message name="getTimeAsStringResponse">
<part name="return" type="xsd:string"></part>
</message>
<message name="getTimeAsElapsed"></message>
<message name="getTimeAsElapsedResponse">
<part name="return" type="xsd:long"></part>
</message>
<portType name="TimeService">
<operation name="getTimeAsString">
<input message="tns:getTimeAsString"></input>
<output message="tns:getTimeAsStringResponse"></output>
</operation>
<operation name="getTimeAsElapsed">
<input message="tns:getTimeAsElapsed"></input>
<output message="tns:getTimeAsElapsedResponse"></output>
</operation>
</portType>
<binding name="TimeServiceImplPortBinding" type="tns:TimeService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="rpc"></soap:binding>
<operation name="getTimeAsString">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/"></soap:body>
</input>
<output>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/"></soap:body>
</output>
</operation>
<operation name="getTimeAsElapsed">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/"></soap:body>
</input>
<output>
<soap:body use="literal" namespace="http://ts.ws.dai.esei.uvigo.es/"></soap:body>
</output>
</operation>
</binding>
<service name="TimeServiceImplService">
<port name="TimeServiceImplPort" binding="tns:TimeServiceImplPortBinding">
<soap:address location="http://localhost:9876/ts"></soap:address>
</port>
</service>
</definitions>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net.
RI's version is JAX-WS RI 2.1.6 in JDK 6. -->
<xs:schema xmlns:tns="http://ts.ws.dai.esei.uvigo.es/"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0"
targetNamespace="http://ts.ws.dai.esei.uvigo.es/">
<xs:element name="getTimeAsElapsed" type="tns:getTimeAsElapsed"></xs:element>
<xs:element name="getTimeAsElapsedResponse" type="tns:getTimeAsElapsedResponse"></xs:element>
<xs:element name="getTimeAsString" type="tns:getTimeAsString"></xs:element>
<xs:element name="getTimeAsStringResponse" type="tns:getTimeAsStringResponse"></xs:element>
<xs:complexType name="getTimeAsElapsed">
<xs:sequence></xs:sequence>
</xs:complexType>
<xs:complexType name="getTimeAsElapsedResponse">
<xs:sequence>
<xs:element name="return" type="xs:long"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="getTimeAsString">
<xs:sequence></xs:sequence>
</xs:complexType>
<xs:complexType name="getTimeAsStringResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>es.uvigo.esei.dai.ws</groupId>
<artifactId>time_service</artifactId>
<version>1.0.0</version>
<name>Ejemplos de DAI - Servicios Web: Time Service</name>
<inceptionYear>2014</inceptionYear>
<url>https://sing-group.org/dt/gitlab/dai-2324/ws-time-service</url>
<developers>
<developer>
<name>Miguel Reboiro-Jato</name>
<organization>Escola Superior de Enxeñaría Informática -
Universidade de Vigo</organization>
<organizationUrl>https://esei.uvigo.es/</organizationUrl>
<email>mrjato@uvigo.gal</email>
</developer>
</developers>
<licenses>
<license>
<name>GNU GENERAL PUBLIC LICENSE, Version 3</name>
<url>http://www.gnu.org/licenses/gpl.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Dependencies versions -->
<jax-ws.version>4.0.1</jax-ws.version>
<!-- Plugin versions -->
<license-maven-plugin.version>2.2.0</license-maven-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<!-- license-maven-plugin configuration -->
<license.licenseName>gpl_v3</license.licenseName>
<license.copyrightOwners>Miguel Reboiro Jato</license.copyrightOwners>
<license.organizationName>Universidade de Vigo</license.organizationName>
<license.addJavaLicenseAfterPackage>false</license.addJavaLicenseAfterPackage>
</properties>
<contributors>
<contributor>
<name>Miguel Reboiro Jato</name>
<email>mrjato@uvigo.gal</email>
<organization>Escola Superior de Enxeñaría Informática -
Universidade de Vigo</organization>
<organizationUrl>https://esei.uvigo.es/</organizationUrl>
<roles>
<role>author</role>
<role>professor</role>
</roles>
</contributor>
</contributors>
<dependencies>
<!-- API -->
<!-- Realmente no hace falta esta dependencia, ya que es transitiva de jaxws-rt,
pero hay entornos (p.ej. Jakarta EE/Java EE) en los que se debe importar esta
dependencia y no jaxws-rt, pues esta última será proporcionada por el contenedor.
-->
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>${jax-ws.version}</version>
</dependency>
<!-- Runtime -->
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>${jax-ws.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
<executions>
<execution>
<id>first</id>
<goals>
<goal>update-file-header</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
package es.uvigo.esei.dai.ws.ts;
public class TimeException extends Exception {
private static final long serialVersionUID = 1L;
private final String faultInfo;
public TimeException(String message) {
super(message);
this.faultInfo = "";
}
public TimeException(String message, String faultInfo) {
super(message);
this.faultInfo = faultInfo;
}
public String getFaultInfo() {
return faultInfo;
}
}
package es.uvigo.esei.dai.ws.ts;
import jakarta.xml.ws.Endpoint;
public class TimeServer {
public static void main(String[] args) {
Endpoint.publish(
"http://localhost:9876/ts",
new TimeServiceImpl()
);
}
}
package es.uvigo.esei.dai.ws.ts;
import jakarta.jws.WebMethod;
import jakarta.jws.WebService;
import jakarta.jws.soap.SOAPBinding;
import jakarta.jws.soap.SOAPBinding.Style;
@WebService
// @SOAPBinding(style = Style.RPC)
public interface TimeService {
@WebMethod
public String getTimeAsString();
@WebMethod
public long getTimeAsElapsed();
}
package es.uvigo.esei.dai.ws.ts;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import jakarta.xml.ws.Service;
public class TimeServiceClient {
public static void main(String[] args) throws MalformedURLException {
URL url = new URL("http://localhost:9876/ts?wsdl");
QName name = new QName(
"http://ts.ws.dai.esei.uvigo.es/",
"TimeServiceImplService"
);
Service service = Service.create(url, name);
TimeService ts = service.getPort(TimeService.class);
System.out.println(ts.getTimeAsString());
System.out.println(ts.getTimeAsElapsed());
}
}
package es.uvigo.esei.dai.ws.ts;
import java.util.Date;
import jakarta.jws.WebService;
@WebService(endpointInterface = "es.uvigo.esei.dai.ws.ts.TimeService")
public class TimeServiceImpl implements TimeService {
@Override
public String getTimeAsString() {
return new Date().toString();
}
@Override
public long getTimeAsElapsed() {
return new Date().getTime();
}
}
#!/usr/bin/perl -w
use SOAP::Lite;
$SOAP::Constants::PREFIX_ENV = 'SOAP-ENV';
my $url = 'http://localhost:9876/ts?wsdl';
my $service = SOAP::Lite->service($url);
print "\nCurrent time is: ", $service->getTimeAsString();
print "\nElased milliseconds from the epoch: ", $service->getTimeAsElapsed();
print "\n";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment