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
034f25ad
Commit
034f25ad
authored
Aug 03, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pierwsze operacje na krajach
parent
c160bf13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
+55
-0
Petla.java
Countries_JAXWS/src/main/java/alx/przyklady/Petla.java
+24
-0
PytanieOJedenKraj.java
..._JAXWS/src/main/java/alx/przyklady/PytanieOJedenKraj.java
+31
-0
No files found.
Countries_JAXWS/src/main/java/alx/przyklady/Petla.java
0 → 100644
View file @
034f25ad
package
alx
.
przyklady
;
import
org.oorsprong.websamples.ArrayOftCountryCodeAndName
;
import
org.oorsprong.websamples.TCountryCodeAndName
;
import
org.oorsprong.websamples.TCountryInfo
;
import
org.oorsprong.websamples.TLanguage
;
import
org.oorsprong.websamples_countryinfo.CountryInfoService
;
import
org.oorsprong.websamples_countryinfo.CountryInfoServiceSoapType
;
import
javax.swing.*
;
public
class
Petla
{
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Startujemy"
);
CountryInfoService
service
=
new
CountryInfoService
();
CountryInfoServiceSoapType
proxy
=
service
.
getCountryInfoServiceSoap
();
System
.
out
.
println
(
"Pobieram info o krajach"
);
ArrayOftCountryCodeAndName
arrayOftCountryCodeAndName
=
proxy
.
listOfCountryNamesByCode
();
for
(
TCountryCodeAndName
codeAndName
:
arrayOftCountryCodeAndName
.
getTCountryCodeAndName
())
{
System
.
out
.
println
(
codeAndName
.
getSISOCode
()
+
" "
+
codeAndName
.
getSName
());
}
}
}
Countries_JAXWS/src/main/java/alx/przyklady/PytanieOJedenKraj.java
0 → 100644
View file @
034f25ad
package
alx
.
przyklady
;
import
org.oorsprong.websamples.TCountryInfo
;
import
org.oorsprong.websamples.TLanguage
;
import
org.oorsprong.websamples_countryinfo.CountryInfoService
;
import
org.oorsprong.websamples_countryinfo.CountryInfoServiceSoapType
;
import
javax.swing.*
;
public
class
PytanieOJedenKraj
{
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Startujemy"
);
CountryInfoService
service
=
new
CountryInfoService
();
CountryInfoServiceSoapType
proxy
=
service
.
getCountryInfoServiceSoap
();
System
.
out
.
println
(
"Mam obiekt proxy: "
+
proxy
);
String
kodKraju
=
JOptionPane
.
showInputDialog
(
"Podaj kod kraju"
);
System
.
out
.
println
(
"Wysyłam zapytanie"
);
TCountryInfo
countryInfo
=
proxy
.
fullCountryInfo
(
kodKraju
);
System
.
out
.
println
(
"Mam odpowiedź: "
+
countryInfo
);
System
.
out
.
println
(
countryInfo
.
getSISOCode
()
+
" "
+
countryInfo
.
getSName
());
System
.
out
.
println
(
"Stolica: "
+
countryInfo
.
getSCapitalCity
());
System
.
out
.
println
(
"Waluta: "
+
countryInfo
.
getSCurrencyISOCode
());
System
.
out
.
println
(
"Prefix tel: "
+
countryInfo
.
getSPhoneCode
());
System
.
out
.
println
(
"Języki:"
);
for
(
TLanguage
lang
:
countryInfo
.
getLanguages
().
getTLanguage
())
{
System
.
out
.
println
(
" * "
+
lang
.
getSISOCode
()
+
" "
+
lang
.
getSName
());
}
}
}
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