Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
20230403
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
20230403
Commits
b9f90288
Commit
b9f90288
authored
May 26, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ujednolicenie definicji namespace-ów i WSDL
parent
861ce5fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
75 deletions
+59
-75
Sklep.java
...ielomodulowy/soap_api/src/main/java/sklep/soap/Sklep.java
+4
-1
SklepService.java
.../soap_klient/src/main/java/sklep/klient/SklepService.java
+51
-73
SklepImpl.java
...ulowy/soap_serwer/src/main/java/sklep/soap/SklepImpl.java
+4
-1
No files found.
PC39-Wielomodulowy/soap_api/src/main/java/sklep/soap/Sklep.java
View file @
b9f90288
...
@@ -13,8 +13,11 @@ import sklep.model.Order;
...
@@ -13,8 +13,11 @@ import sklep.model.Order;
import
sklep.model.Product
;
import
sklep.model.Product
;
// Na taki interfejs mówi się "service endpoint interface" (SEI)
// Na taki interfejs mówi się "service endpoint interface" (SEI)
@WebService
@WebService
(
name
=
"Sklep"
,
targetNamespace
=
Sklep
.
NAMESPACE
)
public
interface
Sklep
{
public
interface
Sklep
{
static
final
String
NAMESPACE
=
"http://sklep.alx.pl/"
;
@WebResult
(
name
=
"product"
)
@WebResult
(
name
=
"product"
)
List
<
Product
>
wszystkieProdukty
()
throws
DBException
;
List
<
Product
>
wszystkieProdukty
()
throws
DBException
;
...
...
PC39-Wielomodulowy/soap_klient/src/main/java/sklep/klient/SklepService.java
View file @
b9f90288
...
@@ -11,80 +11,58 @@ import jakarta.xml.ws.WebServiceClient;
...
@@ -11,80 +11,58 @@ import jakarta.xml.ws.WebServiceClient;
import
jakarta.xml.ws.WebServiceFeature
;
import
jakarta.xml.ws.WebServiceFeature
;
import
sklep.soap.Sklep
;
import
sklep.soap.Sklep
;
/**
@WebServiceClient
(
name
=
"SklepService"
,
* This class was generated by Apache CXF 3.5.2-jbossorg-4
wsdlLocation
=
SklepService
.
ADRES_WSDL
,
* 2023-05-24T16:08:33.585+02:00
targetNamespace
=
Sklep
.
NAMESPACE
)
* Generated source version: 3.5.2-jbossorg-4
*
*/
@WebServiceClient
(
name
=
"SklepService"
,
wsdlLocation
=
"http://localhost:8080/PC31-SoapSerwer/Sklep?wsdl"
,
targetNamespace
=
"http://soap.sklep/"
)
public
class
SklepService
extends
Service
{
public
class
SklepService
extends
Service
{
public
final
static
URL
WSDL_LOCATION
;
final
static
String
ADRES_WSDL
=
"http://localhost:8080/soap_serwer/SklepService?wsdl"
;
public
final
static
URL
WSDL_LOCATION
;
public
final
static
QName
SERVICE
=
new
QName
(
"http://soap.sklep/"
,
"SklepService"
);
public
final
static
QName
SklepPort
=
new
QName
(
"http://soap.sklep/"
,
"SklepPort"
);
public
final
static
QName
SERVICE
=
new
QName
(
Sklep
.
NAMESPACE
,
"SklepService"
);
static
{
public
final
static
QName
SklepPort
=
new
QName
(
Sklep
.
NAMESPACE
,
"SklepPort"
);
URL
url
=
null
;
static
{
try
{
URL
url
=
null
;
url
=
new
URL
(
"http://localhost:8080/PC31-SoapSerwer/Sklep?wsdl"
);
try
{
}
catch
(
MalformedURLException
e
)
{
url
=
new
URL
(
ADRES_WSDL
);
java
.
util
.
logging
.
Logger
.
getLogger
(
SklepService
.
class
.
getName
())
}
catch
(
MalformedURLException
e
)
{
.
log
(
java
.
util
.
logging
.
Level
.
INFO
,
System
.
err
.
println
(
"Can not initialize the default wsdl from "
+
ADRES_WSDL
);
"Can not initialize the default wsdl from {0}"
,
"http://localhost:8080/PC31-SoapSerwer/Sklep?wsdl"
);
}
}
WSDL_LOCATION
=
url
;
WSDL_LOCATION
=
url
;
}
}
public
SklepService
(
URL
wsdlLocation
)
{
public
SklepService
(
URL
wsdlLocation
)
{
super
(
wsdlLocation
,
SERVICE
);
super
(
wsdlLocation
,
SERVICE
);
}
}
public
SklepService
(
URL
wsdlLocation
,
QName
serviceName
)
{
public
SklepService
(
URL
wsdlLocation
,
QName
serviceName
)
{
super
(
wsdlLocation
,
serviceName
);
super
(
wsdlLocation
,
serviceName
);
}
}
public
SklepService
()
{
public
SklepService
()
{
super
(
WSDL_LOCATION
,
SERVICE
);
super
(
WSDL_LOCATION
,
SERVICE
);
}
}
public
SklepService
(
WebServiceFeature
...
features
)
{
public
SklepService
(
WebServiceFeature
...
features
)
{
super
(
WSDL_LOCATION
,
SERVICE
,
features
);
super
(
WSDL_LOCATION
,
SERVICE
,
features
);
}
}
public
SklepService
(
URL
wsdlLocation
,
WebServiceFeature
...
features
)
{
public
SklepService
(
URL
wsdlLocation
,
WebServiceFeature
...
features
)
{
super
(
wsdlLocation
,
SERVICE
,
features
);
super
(
wsdlLocation
,
SERVICE
,
features
);
}
}
public
SklepService
(
URL
wsdlLocation
,
QName
serviceName
,
WebServiceFeature
...
features
)
{
public
SklepService
(
URL
wsdlLocation
,
QName
serviceName
,
WebServiceFeature
...
features
)
{
super
(
wsdlLocation
,
serviceName
,
features
);
super
(
wsdlLocation
,
serviceName
,
features
);
}
}
@WebEndpoint
(
name
=
"SklepPort"
)
public
Sklep
getSklepPort
()
{
return
super
.
getPort
(
SklepPort
,
Sklep
.
class
);
}
/**
*
@WebEndpoint
(
name
=
"SklepPort"
)
* @return
public
Sklep
getSklepPort
(
WebServiceFeature
...
features
)
{
* returns Sklep
return
super
.
getPort
(
SklepPort
,
Sklep
.
class
,
features
);
*/
}
@WebEndpoint
(
name
=
"SklepPort"
)
public
Sklep
getSklepPort
()
{
return
super
.
getPort
(
SklepPort
,
Sklep
.
class
);
}
/**
*
* @param features
* A list of {@link jakarta.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns Sklep
*/
@WebEndpoint
(
name
=
"SklepPort"
)
public
Sklep
getSklepPort
(
WebServiceFeature
...
features
)
{
return
super
.
getPort
(
SklepPort
,
Sklep
.
class
,
features
);
}
}
}
PC39-Wielomodulowy/soap_serwer/src/main/java/sklep/soap/SklepImpl.java
View file @
b9f90288
...
@@ -16,7 +16,10 @@ import sklep.model.Order;
...
@@ -16,7 +16,10 @@ import sklep.model.Order;
import
sklep.model.Product
;
import
sklep.model.Product
;
import
sklep.photo.PhotoUtil
;
import
sklep.photo.PhotoUtil
;
@WebService
(
endpointInterface
=
"sklep.soap.Sklep"
)
@WebService
(
endpointInterface
=
"sklep.soap.Sklep"
,
targetNamespace
=
Sklep
.
NAMESPACE
,
serviceName
=
"SklepService"
,
portName
=
"SklepPort"
)
@MTOM
@MTOM
public
class
SklepImpl
implements
Sklep
{
public
class
SklepImpl
implements
Sklep
{
public
List
<
Product
>
wszystkieProdukty
()
throws
DBException
{
public
List
<
Product
>
wszystkieProdukty
()
throws
DBException
{
...
...
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