Commit a7f35985 by Patryk Czarnik

PiatekKlient i wysyłanie błędnych danych

parent b25451cc
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>PiatekKlient</artifactId>
<version>1.0-SNAPSHOT</version>
<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>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>4.0.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package usluga.generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for dane complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="dane">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="numer" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="wiadomosc" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="czas" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "dane", propOrder = {
"numer",
"wiadomosc",
"czas"
})
public class Dane {
protected int numer;
protected String wiadomosc;
protected String czas;
/**
* Gets the value of the numer property.
*
*/
public int getNumer() {
return numer;
}
/**
* Sets the value of the numer property.
*
*/
public void setNumer(int value) {
this.numer = value;
}
/**
* Gets the value of the wiadomosc property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getWiadomosc() {
return wiadomosc;
}
/**
* Sets the value of the wiadomosc property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setWiadomosc(String value) {
this.wiadomosc = value;
}
/**
* Gets the value of the czas property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCzas() {
return czas;
}
/**
* Sets the value of the czas property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCzas(String value) {
this.czas = value;
}
}
package usluga.generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for NoSuchElementException complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="NoSuchElementException">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="message" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "NoSuchElementException", propOrder = {
"message"
})
public class NoSuchElementException {
protected String message;
/**
* Gets the value of the message property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMessage() {
return message;
}
/**
* Sets the value of the message property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMessage(String value) {
this.message = value;
}
}
package usluga.generated;
import jakarta.xml.ws.WebFault;
/**
* This class was generated by Apache CXF 4.0.0
* 2023-08-04T15:29:07.198+02:00
* Generated source version: 4.0.0
*/
@WebFault(name = "NoSuchElementException", targetNamespace = "http://soap.pcz/")
public class NoSuchElementException_Exception extends Exception {
private usluga.generated.NoSuchElementException faultInfo;
public NoSuchElementException_Exception() {
super();
}
public NoSuchElementException_Exception(String message) {
super(message);
}
public NoSuchElementException_Exception(String message, java.lang.Throwable cause) {
super(message, cause);
}
public NoSuchElementException_Exception(String message, usluga.generated.NoSuchElementException noSuchElementException) {
super(message);
this.faultInfo = noSuchElementException;
}
public NoSuchElementException_Exception(String message, usluga.generated.NoSuchElementException noSuchElementException, java.lang.Throwable cause) {
super(message, cause);
this.faultInfo = noSuchElementException;
}
public usluga.generated.NoSuchElementException getFaultInfo() {
return this.faultInfo;
}
}
package usluga.generated;
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 usluga.generated 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 _PobierzDane_QNAME = new QName("http://soap.pcz/", "pobierzDane");
private final static QName _PobierzDaneResponse_QNAME = new QName("http://soap.pcz/", "pobierzDaneResponse");
private final static QName _PobierzOsobe_QNAME = new QName("http://soap.pcz/", "pobierzOsobe");
private final static QName _PobierzOsobeResponse_QNAME = new QName("http://soap.pcz/", "pobierzOsobeResponse");
private final static QName _Zarejestruj_QNAME = new QName("http://soap.pcz/", "zarejestruj");
private final static QName _ZarejestrujResponse_QNAME = new QName("http://soap.pcz/", "zarejestrujResponse");
private final static QName _NoSuchElementException_QNAME = new QName("http://soap.pcz/", "NoSuchElementException");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: usluga.generated
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link PobierzDane }
*
* @return
* the new instance of {@link PobierzDane }
*/
public PobierzDane createPobierzDane() {
return new PobierzDane();
}
/**
* Create an instance of {@link PobierzDaneResponse }
*
* @return
* the new instance of {@link PobierzDaneResponse }
*/
public PobierzDaneResponse createPobierzDaneResponse() {
return new PobierzDaneResponse();
}
/**
* Create an instance of {@link PobierzOsobe }
*
* @return
* the new instance of {@link PobierzOsobe }
*/
public PobierzOsobe createPobierzOsobe() {
return new PobierzOsobe();
}
/**
* Create an instance of {@link PobierzOsobeResponse }
*
* @return
* the new instance of {@link PobierzOsobeResponse }
*/
public PobierzOsobeResponse createPobierzOsobeResponse() {
return new PobierzOsobeResponse();
}
/**
* Create an instance of {@link Zarejestruj }
*
* @return
* the new instance of {@link Zarejestruj }
*/
public Zarejestruj createZarejestruj() {
return new Zarejestruj();
}
/**
* Create an instance of {@link ZarejestrujResponse }
*
* @return
* the new instance of {@link ZarejestrujResponse }
*/
public ZarejestrujResponse createZarejestrujResponse() {
return new ZarejestrujResponse();
}
/**
* Create an instance of {@link NoSuchElementException }
*
* @return
* the new instance of {@link NoSuchElementException }
*/
public NoSuchElementException createNoSuchElementException() {
return new NoSuchElementException();
}
/**
* Create an instance of {@link Osoba }
*
* @return
* the new instance of {@link Osoba }
*/
public Osoba createOsoba() {
return new Osoba();
}
/**
* Create an instance of {@link Dane }
*
* @return
* the new instance of {@link Dane }
*/
public Dane createDane() {
return new Dane();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link PobierzDane }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link PobierzDane }{@code >}
*/
@XmlElementDecl(namespace = "http://soap.pcz/", name = "pobierzDane")
public JAXBElement<PobierzDane> createPobierzDane(PobierzDane value) {
return new JAXBElement<>(_PobierzDane_QNAME, PobierzDane.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link PobierzDaneResponse }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link PobierzDaneResponse }{@code >}
*/
@XmlElementDecl(namespace = "http://soap.pcz/", name = "pobierzDaneResponse")
public JAXBElement<PobierzDaneResponse> createPobierzDaneResponse(PobierzDaneResponse value) {
return new JAXBElement<>(_PobierzDaneResponse_QNAME, PobierzDaneResponse.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link PobierzOsobe }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link PobierzOsobe }{@code >}
*/
@XmlElementDecl(namespace = "http://soap.pcz/", name = "pobierzOsobe")
public JAXBElement<PobierzOsobe> createPobierzOsobe(PobierzOsobe value) {
return new JAXBElement<>(_PobierzOsobe_QNAME, PobierzOsobe.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link PobierzOsobeResponse }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link PobierzOsobeResponse }{@code >}
*/
@XmlElementDecl(namespace = "http://soap.pcz/", name = "pobierzOsobeResponse")
public JAXBElement<PobierzOsobeResponse> createPobierzOsobeResponse(PobierzOsobeResponse value) {
return new JAXBElement<>(_PobierzOsobeResponse_QNAME, PobierzOsobeResponse.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Zarejestruj }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link Zarejestruj }{@code >}
*/
@XmlElementDecl(namespace = "http://soap.pcz/", name = "zarejestruj")
public JAXBElement<Zarejestruj> createZarejestruj(Zarejestruj value) {
return new JAXBElement<>(_Zarejestruj_QNAME, Zarejestruj.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ZarejestrujResponse }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ZarejestrujResponse }{@code >}
*/
@XmlElementDecl(namespace = "http://soap.pcz/", name = "zarejestrujResponse")
public JAXBElement<ZarejestrujResponse> createZarejestrujResponse(ZarejestrujResponse value) {
return new JAXBElement<>(_ZarejestrujResponse_QNAME, ZarejestrujResponse.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link NoSuchElementException }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link NoSuchElementException }{@code >}
*/
@XmlElementDecl(namespace = "http://soap.pcz/", name = "NoSuchElementException")
public JAXBElement<NoSuchElementException> createNoSuchElementException(NoSuchElementException value) {
return new JAXBElement<>(_NoSuchElementException_QNAME, NoSuchElementException.class, null, value);
}
}
package usluga.generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for osoba complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="osoba">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="imie" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="nazwisko" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="nrButa" type="{http://soap.pcz/}NumerButa" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "osoba", propOrder = {
"imie",
"nazwisko",
"nrButa"
})
public class Osoba {
@XmlElement(required = true)
protected String imie;
@XmlElement(required = true)
protected String nazwisko;
protected Integer nrButa;
/**
* Gets the value of the imie property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getImie() {
return imie;
}
/**
* Sets the value of the imie property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setImie(String value) {
this.imie = value;
}
/**
* Gets the value of the nazwisko property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNazwisko() {
return nazwisko;
}
/**
* Sets the value of the nazwisko property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNazwisko(String value) {
this.nazwisko = value;
}
/**
* Gets the value of the nrButa property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getNrButa() {
return nrButa;
}
/**
* Sets the value of the nrButa property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setNrButa(Integer value) {
this.nrButa = value;
}
}
package usluga.generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for pobierzDane complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="pobierzDane">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="imie" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "pobierzDane", propOrder = {
"imie"
})
public class PobierzDane {
protected String imie;
/**
* Gets the value of the imie property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getImie() {
return imie;
}
/**
* Sets the value of the imie property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setImie(String value) {
this.imie = value;
}
}
package usluga.generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for pobierzDaneResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="pobierzDaneResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="dane" type="{http://soap.pcz/}dane" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "pobierzDaneResponse", propOrder = {
"dane"
})
public class PobierzDaneResponse {
protected Dane dane;
/**
* Gets the value of the dane property.
*
* @return
* possible object is
* {@link Dane }
*
*/
public Dane getDane() {
return dane;
}
/**
* Sets the value of the dane property.
*
* @param value
* allowed object is
* {@link Dane }
*
*/
public void setDane(Dane value) {
this.dane = value;
}
}
package usluga.generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for pobierzOsobe complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="pobierzOsobe">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="nr" type="{http://www.w3.org/2001/XMLSchema}int"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "pobierzOsobe", propOrder = {
"nr"
})
public class PobierzOsobe {
protected int nr;
/**
* Gets the value of the nr property.
*
*/
public int getNr() {
return nr;
}
/**
* Sets the value of the nr property.
*
*/
public void setNr(int value) {
this.nr = value;
}
}
package usluga.generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for pobierzOsobeResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="pobierzOsobeResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="osoba" type="{http://soap.pcz/}osoba" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "pobierzOsobeResponse", propOrder = {
"osoba"
})
public class PobierzOsobeResponse {
protected Osoba osoba;
/**
* Gets the value of the osoba property.
*
* @return
* possible object is
* {@link Osoba }
*
*/
public Osoba getOsoba() {
return osoba;
}
/**
* Sets the value of the osoba property.
*
* @param value
* allowed object is
* {@link Osoba }
*
*/
public void setOsoba(Osoba value) {
this.osoba = value;
}
}
package usluga.generated;
import jakarta.jws.WebMethod;
import jakarta.jws.WebParam;
import jakarta.jws.WebResult;
import jakarta.jws.WebService;
import jakarta.xml.bind.annotation.XmlSeeAlso;
import jakarta.xml.ws.RequestWrapper;
import jakarta.xml.ws.ResponseWrapper;
/**
* This class was generated by Apache CXF 4.0.0
* 2023-08-04T15:29:07.243+02:00
* Generated source version: 4.0.0
*
*/
@WebService(targetNamespace = "http://soap.pcz/", name = "Usluga")
@XmlSeeAlso({ObjectFactory.class})
public interface Usluga {
@WebMethod
@RequestWrapper(localName = "pobierzOsobe", targetNamespace = "http://soap.pcz/", className = "usluga.generated.PobierzOsobe")
@ResponseWrapper(localName = "pobierzOsobeResponse", targetNamespace = "http://soap.pcz/", className = "usluga.generated.PobierzOsobeResponse")
@WebResult(name = "osoba", targetNamespace = "")
public usluga.generated.Osoba pobierzOsobe(
@WebParam(name = "nr", targetNamespace = "")
int nr
) throws NoSuchElementException_Exception;
@WebMethod
@RequestWrapper(localName = "zarejestruj", targetNamespace = "http://soap.pcz/", className = "usluga.generated.Zarejestruj")
@ResponseWrapper(localName = "zarejestrujResponse", targetNamespace = "http://soap.pcz/", className = "usluga.generated.ZarejestrujResponse")
public void zarejestruj(
@WebParam(name = "osoba", targetNamespace = "")
usluga.generated.Osoba osoba
);
@WebMethod
@RequestWrapper(localName = "pobierzDane", targetNamespace = "http://soap.pcz/", className = "usluga.generated.PobierzDane")
@ResponseWrapper(localName = "pobierzDaneResponse", targetNamespace = "http://soap.pcz/", className = "usluga.generated.PobierzDaneResponse")
@WebResult(name = "dane", targetNamespace = "")
public usluga.generated.Dane pobierzDane(
@WebParam(name = "imie", targetNamespace = "")
java.lang.String imie
);
}
package usluga.generated;
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-04T15:29:07.260+02:00
* Generated source version: 4.0.0
*
*/
@WebServiceClient(name = "UslugaService",
wsdlLocation = "http://localhost:8080/PiatekSerwer/UslugaService?wsdl",
targetNamespace = "http://soap.pcz/")
public class UslugaService extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://soap.pcz/", "UslugaService");
public final static QName UslugaPort = new QName("http://soap.pcz/", "UslugaPort");
static {
URL url = null;
try {
url = new URL("http://localhost:8080/PiatekSerwer/UslugaService?wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(UslugaService.class.getName())
.log(java.util.logging.Level.INFO,
"Can not initialize the default wsdl from {0}", "http://localhost:8080/PiatekSerwer/UslugaService?wsdl");
}
WSDL_LOCATION = url;
}
public UslugaService(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}
public UslugaService(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public UslugaService() {
super(WSDL_LOCATION, SERVICE);
}
public UslugaService(WebServiceFeature ... features) {
super(WSDL_LOCATION, SERVICE, features);
}
public UslugaService(URL wsdlLocation, WebServiceFeature ... features) {
super(wsdlLocation, SERVICE, features);
}
public UslugaService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
super(wsdlLocation, serviceName, features);
}
/**
*
* @return
* returns Usluga
*/
@WebEndpoint(name = "UslugaPort")
public Usluga getUslugaPort() {
return super.getPort(UslugaPort, Usluga.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 Usluga
*/
@WebEndpoint(name = "UslugaPort")
public Usluga getUslugaPort(WebServiceFeature... features) {
return super.getPort(UslugaPort, Usluga.class, features);
}
}
package usluga.generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for zarejestruj complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="zarejestruj">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="osoba" type="{http://soap.pcz/}osoba" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "zarejestruj", propOrder = {
"osoba"
})
public class Zarejestruj {
protected Osoba osoba;
/**
* Gets the value of the osoba property.
*
* @return
* possible object is
* {@link Osoba }
*
*/
public Osoba getOsoba() {
return osoba;
}
/**
* Sets the value of the osoba property.
*
* @param value
* allowed object is
* {@link Osoba }
*
*/
public void setOsoba(Osoba value) {
this.osoba = value;
}
}
package usluga.generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for zarejestrujResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="zarejestrujResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "zarejestrujResponse")
public class ZarejestrujResponse {
}
@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://soap.pcz/")
package usluga.generated;
package usluga.klient;
import jakarta.xml.ws.soap.SOAPFaultException;
import usluga.generated.Osoba;
import usluga.generated.Usluga;
import usluga.generated.UslugaService;
public class Klient1_Normalny {
public static void main(String[] args) {
UslugaService service = new UslugaService();
Usluga proxy = service.getUslugaPort();
Osoba ala = new Osoba();
ala.setImie("Ala");
ala.setNazwisko("Dodatnia");
ala.setNrButa(30);
System.out.println("Rejestruję 1");
try {
proxy.zarejestruj(ala);
System.out.println("Zarejetrowane 1");
} catch (SOAPFaultException e) {
System.out.println("Serwer odrzucił zapytanie. " + e);
} catch (Exception e) {
System.out.println("Inny błąd: " + e);
}
Osoba ola = new Osoba();
ola.setImie("Ala");
ola.setNazwisko("Dodatnia");
ola.setNrButa(-30);
System.out.println("Rejestruję 2");
try {
proxy.zarejestruj(ola);
System.out.println("Zarejetrowane 2");
} catch (SOAPFaultException e) {
System.out.println("Serwer odrzucił zapytanie. " + e);
} catch (Exception e) {
System.out.println("Inny błąd: " + e);
}
System.out.println("Gotowe");
}
}
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