Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
java_dzienna_15_09
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
java_dzienna_15_09
Commits
95dd728f
Commit
95dd728f
authored
Oct 06, 2022
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adnotacje wpływające na nazwy parametrów
parent
df898c7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
PierwszaUsluga.java
PC32-SoapSerwer/src/main/java/hello/PierwszaUsluga.java
+10
-2
No files found.
PC32-SoapSerwer/src/main/java/hello/PierwszaUsluga.java
View file @
95dd728f
...
@@ -2,6 +2,8 @@ package hello;
...
@@ -2,6 +2,8 @@ package hello;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
javax.jws.WebParam
;
import
javax.jws.WebResult
;
import
javax.jws.WebService
;
import
javax.jws.WebService
;
@WebService
@WebService
...
@@ -16,15 +18,21 @@ public class PierwszaUsluga {
...
@@ -16,15 +18,21 @@ public class PierwszaUsluga {
* JAX-WS to technologia Javy, która służy do tworzenia usług typu SOAP (oraz klientów tych usług).
* JAX-WS to technologia Javy, która służy do tworzenia usług typu SOAP (oraz klientów tych usług).
*/
*/
public
String
powitaj
(
String
imie
)
{
@WebResult
(
name
=
"komunikat"
)
public
String
powitaj
(
@WebParam
(
name
=
"imie"
)
String
imie
)
{
return
"Witaj "
+
imie
+
"!"
;
return
"Witaj "
+
imie
+
"!"
;
}
}
@WebResult
(
name
=
"data_i_czas"
)
public
String
ktoraGodzina
()
{
public
String
ktoraGodzina
()
{
return
LocalDateTime
.
now
().
toString
();
return
LocalDateTime
.
now
().
toString
();
}
}
public
long
oblicz
(
long
liczba1
,
long
liczba2
,
String
operacja
)
{
@WebResult
(
name
=
"wynik"
)
public
long
oblicz
(
@WebParam
(
name
=
"arg1"
)
long
liczba1
,
@WebParam
(
name
=
"arg2"
)
long
liczba2
,
@WebParam
(
name
=
"operacja"
)
String
operacja
)
{
switch
(
operacja
)
{
switch
(
operacja
)
{
case
"+"
:
return
liczba1
+
liczba2
;
case
"+"
:
return
liczba1
+
liczba2
;
case
"-"
:
return
liczba1
-
liczba2
;
case
"-"
:
return
liczba1
-
liczba2
;
...
...
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