https://github.com/sjas/swingset3 If you like to try SwingSet3, please do the following: You should have Java installed Download SwingSet3.jnlp file and save it locally Click on SwingSet3.jnlp to start the application If security restrictions does not allow to run it Open control panel Find and open Java entry Navigate to Security tab In the Exception Site List add mlapshin.com using Edit Site List button Try to launch the application again
<xsd:schema> <xsd:import namespace="http://service.zdpp.pwr.edu.pl/" schemaLocation="http://localhost:8080/WS/Gazetomat?xsd=1"></xsd:import> </xsd:schema>co oznacza, że typy danych wykorzystywanych w metodach serwisu (klasa Item) wydzielono do osobnego schematu xsd (serwowanego pod linkiem w schemaLocation).
<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e. --><xs:schema xmlns:tns="http://service.zdpp.pwr.edu.pl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://service.zdpp.pwr.edu.pl/"> <xs:element name="getItems" type="tns:getItems"></xs:element> <xs:element name="getItemsResponse" type="tns:getItemsResponse"></xs:element> <xs:complexType name="getItems"> <xs:sequence></xs:sequence> </xs:complexType> <xs:complexType name="getItemsResponse"> <xs:sequence> <xs:element name="return" type="tns:item" minOccurs="0" maxOccurs="unbounded"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="item"> <xs:sequence> <xs:element name="count" type="xs:int" minOccurs="0"></xs:element> <xs:element name="name" type="xs:string" minOccurs="0"></xs:element> </xs:sequence> </xs:complexType> </xs:schema>Ponadto należało zmienić linijkę:
<port name="GazetomatImplPort" binding="tns:GazetomatImplPortBinding">na:
<port name="Gazetomat" binding="tns:GazetomatImplPortBinding">Oczywiście można byłoby jeszcze poustwiać właściwe domeny w pojawiających się urlach, ale i bez tego podejscie TopDown się powiedzie. Wystarczy utworzyć projekt DynamicWeb, potem wrzucić do niego skorygowany plik wsdl, uruchomić wizarda generującego kod serwera w podejściu TopDown (wskazując mu ten właście plik). Jeśli nie popełni się błędów, wizard gerenuje kod serwera.
The servlets named [AxisServlet] and [cxf] are both mapped to the url-pattern [/services/*] which is not permitted
wsimport.exe -s . http://localhost:8081/WS/Gazetomat?wsdlKomendę wydano po wcześniejszym uruchomieniu serwisu (który generował wsdl). Narzędzie wsimport występuje w dystrybucji jdk8 (usunięto je z późniejszych dystrybucji jdk).
java --module-path PATH_TO_YOUR_JAVAFX_LIB_FOLDER --add-modules javafx.controls,javafx.fxml,javafx.graphics,javafx.web -jar yourJar.jarPrzypomniano o zagadnieniach bezpieczeństwa (znaczenie parametrów: java -Djava.security.manager -Djava.security.policy=/path/to/other.policy, sprawdzanie zezwoleń w standardowych klasach Javy: jdk-11.0.1\lib\src.zip\java.base\java\io\ObjectInputStream.java).
@WebService(targetNamespace = "http://example.org/lab08", portName = "DatabaseConnectionPort", serviceName = "DatabaseConnectionService") public class DatabaseConnection implements DatabaseInterface { private Connection connection = null; private String databaseName = "database.db"; private String url = null; public DatabaseConnection() throws ClassNotFoundException, SQLException { Class.forName("org.sqlite.JDBC"); try { url = "jdbc:sqlite:" + URLDecoder.decode(this.getClass().getClassLoader().getResource("").getPath(), "UTF-8") + "../" + databaseName; connection = DriverManager.getConnection(url); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } }
Java Web Start, Java Plugin, and Java Control Panel are not available in JDK. See Removal of the Deployment Stack. https://docs.oracle.com/en/java/javase/11/migrate/index.html#JSMIG-GUID-4B3D2D73-359C-4ADA-937E-BAEA79CFDF0F Problemy: https://community.oracle.com/thread/4091911 I raised a support ticket with Oracle. Their answer was: Java SE 8 is the recommended and only supported version of the deployment stack. Web Start will be supported in Java 8 until 2022 (Premier Support) and 2025 (Extended Support). Java 8 is the release to be on for using Web Start in a production environment. There's no date yet for when the Web Start software might be removed from later JDKs (as opposed to just not recommended). I agree the documentation definitely needs to be clarified and I raised this point with them. Usunięte w JDK11 https://dzone.com/articles/apis-to-be-removed-from-java-11 https://blog.viadee.de/jaxb-und-soap-in-java-11 https://crunchify.com/java-jdk-11-and-details-on-deprecated-java-ee-modules-including-jaxb-jax-ws-jaf-jta-corba/
Jeśli nie oznaczono inaczej, ta strona internetowa wraz z zawartością podlegają licencji Uznanie autorstwa-Użycie niekomercyjne-Na tych samych warunkach 3.0 Polska (CC BY-NC-SA 3.0 PL).