Commit 4cb3ff27 by Patryk Czarnik

KalkulatoBare

parent 70e69c5a
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
/.idea/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store
\ 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>pl.alx.kjava</groupId>
<artifactId>KalkulatorBare</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
package kalkulator;
import java.util.ArrayList;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="arg" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"arg"
})
@XmlRootElement(name = "avg-req")
public class AvgReq {
@XmlElement(type = Integer.class)
protected List<Integer> arg;
/**
* Gets the value of the arg property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a {@code set} method for the arg property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getArg().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Integer }
*
*
* @return
* The value of the arg property.
*/
public List<Integer> getArg() {
if (arg == null) {
arg = new ArrayList<>();
}
return this.arg;
}
}
package kalkulator;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="result" type="{http://www.w3.org/2001/XMLSchema}float"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"result"
})
@XmlRootElement(name = "avg-resp")
public class AvgResp {
protected float result;
/**
* Gets the value of the result property.
*
*/
public float getResult() {
return result;
}
/**
* Sets the value of the result property.
*
*/
public void setResult(float value) {
this.result = value;
}
}
package kalkulator;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="quotient" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="rest" type="{http://www.w3.org/2001/XMLSchema}int"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"quotient",
"rest"
})
@XmlRootElement(name = "div-resp")
public class DivResp {
protected int quotient;
protected int rest;
/**
* Gets the value of the quotient property.
*
*/
public int getQuotient() {
return quotient;
}
/**
* Sets the value of the quotient property.
*
*/
public void setQuotient(int value) {
this.quotient = value;
}
/**
* Gets the value of the rest property.
*
*/
public int getRest() {
return rest;
}
/**
* Sets the value of the rest property.
*
*/
public void setRest(int value) {
this.rest = value;
}
}
package kalkulator;
import jakarta.xml.ws.WebFault;
/**
* This class was generated by Apache CXF 4.0.0
* 2023-08-02T16:09:27.091+02:00
* Generated source version: 4.0.0
*/
@WebFault(name = "zeroDivisionError", targetNamespace = "http://www.example.org/Kalkulator/")
public class DivZero extends Exception {
private kalkulator.ZeroDivisionError faultInfo;
public DivZero() {
super();
}
public DivZero(String message) {
super(message);
}
public DivZero(String message, java.lang.Throwable cause) {
super(message, cause);
}
public DivZero(String message, kalkulator.ZeroDivisionError zeroDivisionError) {
super(message);
this.faultInfo = zeroDivisionError;
}
public DivZero(String message, kalkulator.ZeroDivisionError zeroDivisionError, java.lang.Throwable cause) {
super(message, cause);
this.faultInfo = zeroDivisionError;
}
public kalkulator.ZeroDivisionError getFaultInfo() {
return this.faultInfo;
}
}
package kalkulator;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* Typ obejmuje dwie liczby całkowite
*
* <p>Java class for DwaInty complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="DwaInty">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="arg1" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="arg2" type="{http://www.w3.org/2001/XMLSchema}int"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DwaInty", propOrder = {
"arg1",
"arg2"
})
public class DwaInty {
protected int arg1;
protected int arg2;
/**
* Gets the value of the arg1 property.
*
*/
public int getArg1() {
return arg1;
}
/**
* Sets the value of the arg1 property.
*
*/
public void setArg1(int value) {
this.arg1 = value;
}
/**
* Gets the value of the arg2 property.
*
*/
public int getArg2() {
return arg2;
}
/**
* Sets the value of the arg2 property.
*
*/
public void setArg2(int value) {
this.arg2 = value;
}
}
package kalkulator;
import jakarta.jws.WebMethod;
import jakarta.jws.WebParam;
import jakarta.jws.WebResult;
import jakarta.jws.WebService;
import jakarta.jws.soap.SOAPBinding;
import jakarta.xml.bind.annotation.XmlSeeAlso;
/**
* This class was generated by Apache CXF 4.0.0
* 2023-08-02T16:09:27.143+02:00
* Generated source version: 4.0.0
*
*/
@WebService(targetNamespace = "http://www.example.org/Kalkulator/", name = "Kalkulator")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Kalkulator {
@WebMethod(action = "http://www.example.org/Kalkulator/sub")
@WebResult(name = "sub-resp", targetNamespace = "http://www.example.org/Kalkulator/", partName = "parameters")
public WynikInt sub(
@WebParam(partName = "parameters", name = "sub-req", targetNamespace = "http://www.example.org/Kalkulator/")
DwaInty parameters
);
/**
* Operacja dodaje dwie liczby.
*
*/
@WebMethod(action = "http://www.example.org/Kalkulator/add")
@WebResult(name = "add-resp", targetNamespace = "http://www.example.org/Kalkulator/", partName = "parameters")
public WynikInt add(
@WebParam(partName = "parameters", name = "add-req", targetNamespace = "http://www.example.org/Kalkulator/")
DwaInty parameters
);
@WebMethod(action = "http://www.example.org/Kalkulator/div")
@WebResult(name = "div-resp", targetNamespace = "http://www.example.org/Kalkulator/", partName = "parameters")
public DivResp div(
@WebParam(partName = "parameters", name = "div-req", targetNamespace = "http://www.example.org/Kalkulator/")
DwaInty parameters
) throws DivZero;
@WebMethod(action = "http://www.example.org/Kalkulator/avg")
@WebResult(name = "avg-resp", targetNamespace = "http://www.example.org/Kalkulator/", partName = "parameters")
public AvgResp avg(
@WebParam(partName = "parameters", name = "avg-req", targetNamespace = "http://www.example.org/Kalkulator/")
AvgReq parameters
);
@WebMethod(action = "http://www.example.org/Kalkulator/mul")
@WebResult(name = "mul-resp", targetNamespace = "http://www.example.org/Kalkulator/", partName = "parameters")
public WynikInt mul(
@WebParam(partName = "parameters", name = "mul-req", targetNamespace = "http://www.example.org/Kalkulator/")
DwaInty parameters
);
}
package kalkulator;
import jakarta.jws.WebService;
@WebService(endpointInterface = "kalkulator.Kalkulator"
, serviceName = "Kalkulator"
, portName = "KalkulatorSOAP"
, targetNamespace = "http://www.example.org/Kalkulator/"
, wsdlLocation = "/WEB-INF/wsdl/kalkulator.wsdl")
public class KalkulatorImpl implements Kalkulator {
@Override
public WynikInt sub(DwaInty parameters) {
WynikInt wynik = new WynikInt();
wynik.setResult(parameters.getArg1() - parameters.getArg2());
return wynik;
}
@Override
public WynikInt add(DwaInty parameters) {
// TODO Auto-generated method stub
return null;
}
@Override
public DivResp div(DwaInty parameters) throws DivZero {
DivResp wynik = new DivResp();
wynik.setQuotient(parameters.getArg1() / parameters.getArg2());
wynik.setRest(parameters.getArg1() % parameters.getArg2());
return wynik;
}
@Override
public AvgResp avg(AvgReq parameters) {
// TODO Auto-generated method stub
return null;
}
@Override
public WynikInt mul(DwaInty parameters) {
// TODO Auto-generated method stub
return null;
}
}
package kalkulator;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import jakarta.xml.ws.WebEndpoint;
import jakarta.xml.ws.WebServiceClient;
import jakarta.xml.ws.WebServiceFeature;
import jakarta.xml.ws.Service;
/**
* This class was generated by Apache CXF 4.0.0
* 2023-08-02T16:09:27.159+02:00
* Generated source version: 4.0.0
*
*/
@WebServiceClient(name = "Kalkulator",
wsdlLocation = "file:/home/patryk/praca/alx/byle_kursy/20230801-Soap_Samsung/alx_20230801/KalkulatorBare/src/main/webapp/WEB-INF/wsdl/kalkulator.wsdl",
targetNamespace = "http://www.example.org/Kalkulator/")
public class Kalkulator_Service extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://www.example.org/Kalkulator/", "Kalkulator");
public final static QName KalkulatorSOAP = new QName("http://www.example.org/Kalkulator/", "KalkulatorSOAP");
static {
URL url = null;
try {
url = new URL("file:/home/patryk/praca/alx/byle_kursy/20230801-Soap_Samsung/alx_20230801/KalkulatorBare/src/main/webapp/WEB-INF/wsdl/kalkulator.wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(Kalkulator_Service.class.getName())
.log(java.util.logging.Level.INFO,
"Can not initialize the default wsdl from {0}", "file:/home/patryk/praca/alx/byle_kursy/20230801-Soap_Samsung/alx_20230801/KalkulatorBare/src/main/webapp/WEB-INF/wsdl/kalkulator.wsdl");
}
WSDL_LOCATION = url;
}
public Kalkulator_Service(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}
public Kalkulator_Service(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public Kalkulator_Service() {
super(WSDL_LOCATION, SERVICE);
}
public Kalkulator_Service(WebServiceFeature ... features) {
super(WSDL_LOCATION, SERVICE, features);
}
public Kalkulator_Service(URL wsdlLocation, WebServiceFeature ... features) {
super(wsdlLocation, SERVICE, features);
}
public Kalkulator_Service(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
super(wsdlLocation, serviceName, features);
}
/**
*
* @return
* returns Kalkulator
*/
@WebEndpoint(name = "KalkulatorSOAP")
public Kalkulator getKalkulatorSOAP() {
return super.getPort(KalkulatorSOAP, Kalkulator.class);
}
/**
*
* @param features
* A list of {@link jakarta.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns Kalkulator
*/
@WebEndpoint(name = "KalkulatorSOAP")
public Kalkulator getKalkulatorSOAP(WebServiceFeature... features) {
return super.getPort(KalkulatorSOAP, Kalkulator.class, features);
}
}
package kalkulator;
import javax.xml.namespace.QName;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.annotation.XmlElementDecl;
import jakarta.xml.bind.annotation.XmlRegistry;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the kalkulator package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _AddReq_QNAME = new QName("http://www.example.org/Kalkulator/", "add-req");
private final static QName _AddResp_QNAME = new QName("http://www.example.org/Kalkulator/", "add-resp");
private final static QName _SubReq_QNAME = new QName("http://www.example.org/Kalkulator/", "sub-req");
private final static QName _SubResp_QNAME = new QName("http://www.example.org/Kalkulator/", "sub-resp");
private final static QName _MulReq_QNAME = new QName("http://www.example.org/Kalkulator/", "mul-req");
private final static QName _MulResp_QNAME = new QName("http://www.example.org/Kalkulator/", "mul-resp");
private final static QName _DivReq_QNAME = new QName("http://www.example.org/Kalkulator/", "div-req");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: kalkulator
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link DwaInty }
*
* @return
* the new instance of {@link DwaInty }
*/
public DwaInty createDwaInty() {
return new DwaInty();
}
/**
* Create an instance of {@link WynikInt }
*
* @return
* the new instance of {@link WynikInt }
*/
public WynikInt createWynikInt() {
return new WynikInt();
}
/**
* Create an instance of {@link DivResp }
*
* @return
* the new instance of {@link DivResp }
*/
public DivResp createDivResp() {
return new DivResp();
}
/**
* Create an instance of {@link ZeroDivisionError }
*
* @return
* the new instance of {@link ZeroDivisionError }
*/
public ZeroDivisionError createZeroDivisionError() {
return new ZeroDivisionError();
}
/**
* Create an instance of {@link AvgReq }
*
* @return
* the new instance of {@link AvgReq }
*/
public AvgReq createAvgReq() {
return new AvgReq();
}
/**
* Create an instance of {@link AvgResp }
*
* @return
* the new instance of {@link AvgResp }
*/
public AvgResp createAvgResp() {
return new AvgResp();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link DwaInty }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link DwaInty }{@code >}
*/
@XmlElementDecl(namespace = "http://www.example.org/Kalkulator/", name = "add-req")
public JAXBElement<DwaInty> createAddReq(DwaInty value) {
return new JAXBElement<>(_AddReq_QNAME, DwaInty.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link WynikInt }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link WynikInt }{@code >}
*/
@XmlElementDecl(namespace = "http://www.example.org/Kalkulator/", name = "add-resp")
public JAXBElement<WynikInt> createAddResp(WynikInt value) {
return new JAXBElement<>(_AddResp_QNAME, WynikInt.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link DwaInty }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link DwaInty }{@code >}
*/
@XmlElementDecl(namespace = "http://www.example.org/Kalkulator/", name = "sub-req")
public JAXBElement<DwaInty> createSubReq(DwaInty value) {
return new JAXBElement<>(_SubReq_QNAME, DwaInty.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link WynikInt }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link WynikInt }{@code >}
*/
@XmlElementDecl(namespace = "http://www.example.org/Kalkulator/", name = "sub-resp")
public JAXBElement<WynikInt> createSubResp(WynikInt value) {
return new JAXBElement<>(_SubResp_QNAME, WynikInt.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link DwaInty }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link DwaInty }{@code >}
*/
@XmlElementDecl(namespace = "http://www.example.org/Kalkulator/", name = "mul-req")
public JAXBElement<DwaInty> createMulReq(DwaInty value) {
return new JAXBElement<>(_MulReq_QNAME, DwaInty.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link WynikInt }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link WynikInt }{@code >}
*/
@XmlElementDecl(namespace = "http://www.example.org/Kalkulator/", name = "mul-resp")
public JAXBElement<WynikInt> createMulResp(WynikInt value) {
return new JAXBElement<>(_MulResp_QNAME, WynikInt.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link DwaInty }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link DwaInty }{@code >}
*/
@XmlElementDecl(namespace = "http://www.example.org/Kalkulator/", name = "div-req")
public JAXBElement<DwaInty> createDivReq(DwaInty value) {
return new JAXBElement<>(_DivReq_QNAME, DwaInty.class, null, value);
}
}
package kalkulator;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for WynikInt complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="WynikInt">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="result" type="{http://www.w3.org/2001/XMLSchema}int"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WynikInt", propOrder = {
"result"
})
public class WynikInt {
protected int result;
/**
* Gets the value of the result property.
*
*/
public int getResult() {
return result;
}
/**
* Sets the value of the result property.
*
*/
public void setResult(int value) {
this.result = value;
}
}
package kalkulator;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "zeroDivisionError")
public class ZeroDivisionError {
}
@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://www.example.org/Kalkulator/")
package kalkulator;
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions name="Kalkulator"
targetNamespace="http://www.example.org/Kalkulator/"
xmlns:tns="http://www.example.org/Kalkulator/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
<wsdl:types>
<xsd:schema targetNamespace="http://www.example.org/Kalkulator/">
<xsd:element name="add-req" type="tns:DwaInty"/>
<xsd:element name="add-resp" type="tns:WynikInt"/>
<xsd:element name="sub-req" type="tns:DwaInty"/>
<xsd:element name="sub-resp" type="tns:WynikInt"/>
<xsd:element name="mul-req" type="tns:DwaInty"/>
<xsd:element name="mul-resp" type="tns:WynikInt"/>
<xsd:element name="div-req" type="tns:DwaInty"/>
<xsd:element name="div-resp">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="quotient" type="xsd:int"/>
<xsd:element name="rest" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="zeroDivisionError">
<xsd:complexType>
<xsd:sequence/>
</xsd:complexType>
</xsd:element>
<xsd:element name="avg-req">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="arg" type="xsd:int" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="avg-resp">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="result" type="xsd:float"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="DwaInty">
<xsd:annotation>
<xsd:documentation>Typ obejmuje dwie liczby całkowite</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="arg1" type="xsd:int"/>
<xsd:element name="arg2" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="WynikInt">
<xsd:sequence>
<xsd:element name="result" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="addRequest">
<wsdl:part element="tns:add-req" name="parameters"/>
</wsdl:message>
<wsdl:message name="addResponse">
<wsdl:part element="tns:add-resp" name="parameters"/>
</wsdl:message>
<wsdl:message name="subRequest">
<wsdl:part element="tns:sub-req" name="parameters"/>
</wsdl:message>
<wsdl:message name="subResponse">
<wsdl:part element="tns:sub-resp" name="parameters"/>
</wsdl:message>
<wsdl:message name="mulRequest">
<wsdl:part element="tns:mul-req" name="parameters"/>
</wsdl:message>
<wsdl:message name="mulResponse">
<wsdl:part element="tns:mul-resp" name="parameters"/>
</wsdl:message>
<wsdl:message name="divRequest">
<wsdl:part element="tns:div-req" name="parameters"/>
</wsdl:message>
<wsdl:message name="divResponse">
<wsdl:part element="tns:div-resp" name="parameters"/>
</wsdl:message>
<wsdl:message name="divZero">
<wsdl:part element="tns:zeroDivisionError" name="parameters"/>
</wsdl:message>
<wsdl:message name="avgRequest">
<wsdl:part element="tns:avg-req" name="parameters"/>
</wsdl:message>
<wsdl:message name="avgResponse">
<wsdl:part element="tns:avg-resp" name="parameters"/>
</wsdl:message>
<wsdl:portType name="Kalkulator">
<wsdl:operation name="add">
<wsdl:documentation>
Operacja dodaje dwie liczby.
</wsdl:documentation>
<wsdl:input message="tns:addRequest"/>
<wsdl:output message="tns:addResponse"/>
</wsdl:operation>
<wsdl:operation name="sub">
<wsdl:input message="tns:subRequest"/>
<wsdl:output message="tns:subResponse"/>
</wsdl:operation>
<wsdl:operation name="mul">
<wsdl:input message="tns:mulRequest"/>
<wsdl:output message="tns:mulResponse"/>
</wsdl:operation>
<wsdl:operation name="div">
<wsdl:input message="tns:divRequest"/>
<wsdl:output message="tns:divResponse"/>
<wsdl:fault name="divError" message="tns:divZero"/>
</wsdl:operation>
<wsdl:operation name="avg">
<wsdl:input message="tns:avgRequest"/>
<wsdl:output message="tns:avgResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="KalkulatorSOAP" type="tns:Kalkulator">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="add">
<soap:operation soapAction="http://www.example.org/Kalkulator/add"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="sub">
<soap:operation soapAction="http://www.example.org/Kalkulator/sub"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="mul">
<soap:operation soapAction="http://www.example.org/Kalkulator/mul"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="div">
<soap:operation soapAction="http://www.example.org/Kalkulator/div"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="divError">
<soap:fault name="divError" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="avg">
<soap:operation soapAction="http://www.example.org/Kalkulator/avg"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Kalkulator">
<wsdl:port binding="tns:KalkulatorSOAP" name="KalkulatorSOAP">
<soap:address location="http://localhost:8080/Kalkulator/Kalkulator"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
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