Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Won't Fix
-
Affects Version/s: 1.1.4
-
Fix Version/s: 1.3.0
-
Component/s: None
-
Security Level: Public
-
- Environment:
- Petals 4.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Resolution | Won't Fix [ 2 ] | |
| Status | New [ 10000 ] | Resolved [ 10004 ] |
| Priority | Blocker [ 1 ] | |
| Description |
When trying to pass a DataHandler as an argument to a WebMethod (see below), the DataHandler does not point to valid data (if redirected to a file, the file content is irrelevant).
Workaround: use Petals attachments (with CDK APIs). The same code works fine, then. //JSR181 main class //... @WebMethod( operationName="display" ) public void display(@WebParam( name="image" ) ImageData image) { ... } // ImageData.java //... @XmlType public class ImageData { private DataHandler fileContent; @XmlMimeType("application/octet-stream") public DataHandler getFileContent() { return this.fileContent; } public void setFileContent(DataHandler fileContent) { this.fileContent = fileContent; } } |
When trying to pass a DataHandler as an argument to a WebMethod (see below), the DataHandler does not point to valid data (if redirected to a file, the file content is irrelevant).
Workaround: use Petals attachments (with CDK APIs). The same code works fine, then. {code} //JSR181 main class //... @WebMethod( operationName="display" ) public void display(@WebParam( name="image" ) ImageData image) { ... } // ImageData.java //... @XmlType public class ImageData { private DataHandler fileContent; @XmlMimeType("application/octet-stream") public DataHandler getFileContent() { return this.fileContent; } public void setFileContent(DataHandler fileContent) { this.fileContent = fileContent; } } {code} |
| Status | Resolved [ 10004 ] | Closed [ 10005 ] |
| Fix Version/s | 1.3.0 [ 10346 ] |