forked from quarkiverse/quarkus-cxf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for @ResponseWrapper and @RequestWrapper
- Loading branch information
Showing
5 changed files
with
76 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...-tests/mtom-awt/src/main/java/io/quarkiverse/cxf/it/ws/mtom/awt/server/ImageResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package io.quarkiverse.cxf.it.ws.mtom.awt.server; | ||
|
||
import java.awt.Image; | ||
|
||
import jakarta.xml.bind.annotation.XmlAccessType; | ||
import jakarta.xml.bind.annotation.XmlAccessorType; | ||
import jakarta.xml.bind.annotation.XmlElement; | ||
import jakarta.xml.bind.annotation.XmlMimeType; | ||
import jakarta.xml.bind.annotation.XmlType; | ||
|
||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(name = "ImageResponse", propOrder = { | ||
"_return" | ||
}, namespace = io.quarkiverse.cxf.it.ws.mtom.awt.server.ImageService.NS) | ||
public class ImageResponse { | ||
|
||
@XmlElement(required = true) | ||
@XmlMimeType("image/png") | ||
private Image _return; | ||
|
||
public ImageResponse() { | ||
} | ||
|
||
public ImageResponse(Image data) { | ||
super(); | ||
this._return = data; | ||
} | ||
|
||
public Image getReturn() { | ||
return _return; | ||
} | ||
|
||
public void setReturn(Image data) { | ||
this._return = data; | ||
} | ||
} |
20 changes: 15 additions & 5 deletions
20
...n-tests/mtom-awt/src/main/java/io/quarkiverse/cxf/it/ws/mtom/awt/server/ImageService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
package io.quarkiverse.cxf.it.ws.mtom.awt.server; | ||
|
||
import java.awt.Image; | ||
|
||
import jakarta.jws.WebMethod; | ||
import jakarta.jws.WebParam; | ||
import jakarta.jws.WebService; | ||
import jakarta.jws.soap.SOAPBinding; | ||
import jakarta.xml.ws.RequestWrapper; | ||
import jakarta.xml.ws.ResponseWrapper; | ||
import jakarta.xml.ws.soap.MTOM; | ||
|
||
@WebService(name = "ImageService", targetNamespace = "https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/test/mtom-awt") | ||
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE) | ||
@WebService(name = "ImageService", targetNamespace = ImageService.NS) | ||
@MTOM | ||
public interface ImageService { | ||
|
||
public static final String NS = "https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/test/mtom-awt"; | ||
|
||
@WebMethod | ||
ImageData downloadImage(String name); | ||
@ResponseWrapper(localName = "ImageResponse", targetNamespace = NS, className = "io.quarkiverse.cxf.it.ws.mtom.awt.server.ImageResponse") | ||
Image downloadImage( | ||
@WebParam(name = "name", targetNamespace = NS) String name); | ||
|
||
@WebMethod | ||
String uploadImage(ImageData image); | ||
@RequestWrapper(localName = "ImageData", targetNamespace = NS, className = "io.quarkiverse.cxf.it.ws.mtom.awt.server.ImageData") | ||
String uploadImage( | ||
@WebParam(name = "data", targetNamespace = NS) Image data, | ||
@WebParam(name = "name", targetNamespace = NS) String name); | ||
|
||
} |
18 changes: 9 additions & 9 deletions
18
...sts/mtom-awt/src/main/java/io/quarkiverse/cxf/it/ws/mtom/awt/server/ImageServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters