Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
alx_20230801
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
alx_20230801
Commits
4cba7706
Commit
4cba7706
authored
Aug 04, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Klient Dispatcher z XSLT po stronie klienta c.d.
parent
0e8b412d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
3 deletions
+41
-3
.gitignore
OgloszeniaKlient/.gitignore
+1
-0
Klient3_Edycja.java
...lient/src/main/java/ogloszenia/klient/Klient3_Edycja.java
+0
-3
Klient6_DispatcherXSLT_Samowystarczalny.java
...skopoziomowy/Klient6_DispatcherXSLT_Samowystarczalny.java
+40
-0
No files found.
OgloszeniaKlient/.gitignore
View file @
4cba7706
...
@@ -34,3 +34,4 @@ build/
...
@@ -34,3 +34,4 @@ build/
### Mac OS ###
### Mac OS ###
.DS_Store
.DS_Store
/wynik.html
/wynik.html
/wyniki.html
OgloszeniaKlient/src/main/java/ogloszenia/klient/Klient3_Edycja.java
View file @
4cba7706
...
@@ -42,6 +42,3 @@ public class Klient3_Edycja {
...
@@ -42,6 +42,3 @@ public class Klient3_Edycja {
}
}
}
}
// alt+Enter intellij =~= Ctrl+1 w eclipse
OgloszeniaKlient/src/main/java/ogloszenia/klient_niskopoziomowy/Klient6_DispatcherXSLT_Samowystarczalny.java
0 → 100644
View file @
4cba7706
package
ogloszenia
.
klient_niskopoziomowy
;
import
jakarta.xml.ws.Dispatch
;
import
jakarta.xml.ws.Service
;
import
javax.xml.namespace.QName
;
import
javax.xml.transform.Source
;
import
javax.xml.transform.stream.StreamSource
;
import
java.io.StringReader
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
public
class
Klient6_DispatcherXSLT_Samowystarczalny
{
static
final
String
trescXML
=
"<o:readAll xmlns:o='http://soap.ogloszenia/'/>"
;
/* W tym przykładzie nie używamy wygenerowanych klas, to można zrobić "zawsze", nawet bez procedury wsimport */
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Startujemy..."
);
try
{
URL
wsdlUrl
=
new
URL
(
"http://localhost:8080/OgloszeniaSerwer/Ogloszenia?wsdl"
);
QName
serviceName
=
new
QName
(
"http://soap.ogloszenia/"
,
"OgloszeniaService"
);
QName
portName
=
new
QName
(
"http://soap.ogloszenia/"
,
"OgloszeniaPort"
);
Service
service
=
Service
.
create
(
wsdlUrl
,
serviceName
);
Dispatch
<
Source
>
dispatch
=
service
.
createDispatch
(
portName
,
Source
.
class
,
Service
.
Mode
.
PAYLOAD
);
System
.
out
.
println
(
"Mam Dispatchera "
+
dispatch
);
Source
src
=
new
StreamSource
(
new
StringReader
(
trescXML
));
System
.
out
.
println
(
"Wysyłam zapytanie"
);
Source
result
=
dispatch
.
invoke
(
src
);
System
.
out
.
println
(
"Mam wynik: "
+
result
);
Utils
utils
=
new
Utils
();
utils
.
xslt
(
result
,
"arkusz.xsl"
,
"wyniki.html"
);
System
.
out
.
println
(
"Gotowe"
);
}
catch
(
MalformedURLException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment