Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions src/main/java/https/www_w3schools_com/xml/CelsiusToFahrenheit.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

package https.www_w3schools_com.xml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.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>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Celsius" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"celsius"
})
@XmlRootElement(name = "CelsiusToFahrenheit")
public class CelsiusToFahrenheit {

@XmlElement(name = "Celsius")
protected String celsius;

/**
* Gets the value of the celsius property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCelsius() {
return celsius;
}

/**
* Sets the value of the celsius property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCelsius(String value) {
this.celsius = value;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

package https.www_w3schools_com.xml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.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>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="CelsiusToFahrenheitResult" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"celsiusToFahrenheitResult"
})
@XmlRootElement(name = "CelsiusToFahrenheitResponse")
public class CelsiusToFahrenheitResponse {

@XmlElement(name = "CelsiusToFahrenheitResult")
protected String celsiusToFahrenheitResult;

/**
* Gets the value of the celsiusToFahrenheitResult property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCelsiusToFahrenheitResult() {
return celsiusToFahrenheitResult;
}

/**
* Sets the value of the celsiusToFahrenheitResult property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCelsiusToFahrenheitResult(String value) {
this.celsiusToFahrenheitResult = value;
}

}
22 changes: 22 additions & 0 deletions src/main/java/https/www_w3schools_com/xml/ClientTemp.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package https.www_w3schools_com.xml;

import javax.xml.namespace.QName;
import javax.xml.soap.SOAPException;
import javax.xml.ws.Service;
import java.io.IOException;
import java.net.URL;

public class ClientTemp {
private static final String ADDRESS = "https://www.w3schools.com/xml/tempconvert.asmx?WSDL";

public ClientTemp() {
}

public String result(String convert) throws SOAPException, IOException {
URL url = new URL(ADDRESS);
QName qName = new QName("https://www.w3schools.com/xml/", "TempConvert");
Service service = Service.create(url, qName);
TempConvertSoap hello = service.getPort(TempConvertSoap.class);
return hello.celsiusToFahrenheit(convert);
}
}
64 changes: 64 additions & 0 deletions src/main/java/https/www_w3schools_com/xml/FahrenheitToCelsius.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

package https.www_w3schools_com.xml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.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>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Fahrenheit" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"fahrenheit"
})
@XmlRootElement(name = "FahrenheitToCelsius")
public class FahrenheitToCelsius {

@XmlElement(name = "Fahrenheit")
protected String fahrenheit;

/**
* Gets the value of the fahrenheit property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFahrenheit() {
return fahrenheit;
}

/**
* Sets the value of the fahrenheit property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFahrenheit(String value) {
this.fahrenheit = value;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

package https.www_w3schools_com.xml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.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>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="FahrenheitToCelsiusResult" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"fahrenheitToCelsiusResult"
})
@XmlRootElement(name = "FahrenheitToCelsiusResponse")
public class FahrenheitToCelsiusResponse {

@XmlElement(name = "FahrenheitToCelsiusResult")
protected String fahrenheitToCelsiusResult;

/**
* Gets the value of the fahrenheitToCelsiusResult property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFahrenheitToCelsiusResult() {
return fahrenheitToCelsiusResult;
}

/**
* Sets the value of the fahrenheitToCelsiusResult property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFahrenheitToCelsiusResult(String value) {
this.fahrenheitToCelsiusResult = value;
}

}
77 changes: 77 additions & 0 deletions src/main/java/https/www_w3schools_com/xml/ObjectFactory.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

package https.www_w3schools_com.xml;

import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;


/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the https.www_w3schools_com.xml 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 _String_QNAME = new QName("https://www.w3schools.com/xml/", "string");

/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: https.www_w3schools_com.xml
*
*/
public ObjectFactory() {
}

/**
* Create an instance of {@link CelsiusToFahrenheit }
*
*/
public CelsiusToFahrenheit createCelsiusToFahrenheit() {
return new CelsiusToFahrenheit();
}

/**
* Create an instance of {@link FahrenheitToCelsius }
*
*/
public FahrenheitToCelsius createFahrenheitToCelsius() {
return new FahrenheitToCelsius();
}

/**
* Create an instance of {@link FahrenheitToCelsiusResponse }
*
*/
public FahrenheitToCelsiusResponse createFahrenheitToCelsiusResponse() {
return new FahrenheitToCelsiusResponse();
}

/**
* Create an instance of {@link CelsiusToFahrenheitResponse }
*
*/
public CelsiusToFahrenheitResponse createCelsiusToFahrenheitResponse() {
return new CelsiusToFahrenheitResponse();
}

/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
@XmlElementDecl(namespace = "https://www.w3schools.com/xml/", name = "string")
public JAXBElement<String> createString(String value) {
return new JAXBElement<String>(_String_QNAME, String.class, null, value);
}

}
Loading