/**
* This method passes an SWA attachment as a request
* and expects an SWA attachment as a response.
* Note that the body content in both cases is empty.
* (See the wsdl)
* @param attachment (swa)
* @return attachment (swa)
*/
@WebMethod(operationName="swaAttachment", action="swaAttachment")
@XmlJavaTypeAdapter(HexBinaryAdapter.class)
@WebResult(name = "jpegImageResponse", targetNamespace = "", partName = "jpegImageResponse")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public byte[] swaAttachment(
@XmlJavaTypeAdapter(HexBinaryAdapter.class)
@WebParam(name = "jpegImageRequest", targetNamespace = "", partName = "jpegImageRequest")
byte[] attachment) {
if (attachment == null || attachment.length == 0){
throw new RuntimeException("Received empty attachment");
} else {
// Change the first three characters and return the attachment
attachment[0] = 'S';
attachment[1] = 'W';
attachment[2] = 'A';
}
return attachment;
}
SWAMTOMPortTypeImpl.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:wso2-axis2
作者:
评论列表
文章目录