update xmlrootelement annotation

This commit is contained in:
jinyu 2015-06-04 00:16:37 +08:00
parent 19c613f26b
commit dce67fcc80
38 changed files with 151 additions and 25 deletions

View File

@ -164,7 +164,9 @@ public class SimpleHttpClient implements HttpClient {
if (os != null) {
os.close();
}
is.close();
if (is != null) {
is.close();
}
}
}
HttpResponse response = new HttpResponse();

View File

@ -5,6 +5,7 @@ import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
@ -17,6 +18,7 @@ import com.alibaba.fastjson.annotation.JSONField;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class XmlResult implements Serializable {

View File

@ -77,14 +77,16 @@ public final class XmlStream {
Source source = new StreamSource(content);
XmlRootElement rootElement = clazz
.getAnnotation(XmlRootElement.class);
if (rootElement == null) {
if (rootElement == null || rootElement.name().equals(
XmlRootElement.class.getMethod("name")
.getDefaultValue().toString())) {
JAXBElement<T> jaxbElement = unmarshaller.unmarshal(source,
clazz);
return jaxbElement.getValue();
} else {
return (T) unmarshaller.unmarshal(source);
}
} catch (JAXBException e) {
} catch (Exception e) {
throw new IllegalArgumentException(e);
} finally {
if (content != null) {
@ -253,7 +255,10 @@ public final class XmlStream {
try {
XmlRootElement rootElement = clazz
.getAnnotation(XmlRootElement.class);
if (rootElement == null) {
if (rootElement == null
|| rootElement.name().equals(
XmlRootElement.class.getMethod("name")
.getDefaultValue().toString())) {
marshaller.marshal(new JAXBElement<T>(new QName(
ROOT_ELEMENT_XML), clazz, t), os);
} else {

View File

@ -135,7 +135,7 @@ public class MediaApi extends MpApi {
fileName)), new FormBodyPart("type",
new StringBody(mediaType, Consts.UTF_8)));
} catch (UnsupportedEncodingException e) {
; // ignore
throw new WeixinException(e); // ignore
}
} else {
String file_upload_uri = getRequestUri("file_upload_uri");
@ -386,8 +386,8 @@ public class MediaApi extends MpApi {
public MediaCounter countMaterialMedia() throws WeixinException {
Token token = tokenHolder.getToken();
String material_media_count_uri = getRequestUri("material_media_count_uri");
WeixinResponse response = weixinClient.get(String.format(material_media_count_uri,
token.getAccessToken()));
WeixinResponse response = weixinClient.get(String.format(
material_media_count_uri, token.getAccessToken()));
return response.getAsObject(new TypeReference<MediaCounter>() {
});

View File

@ -186,6 +186,11 @@ public class User implements Serializable {
this.unionid = unionid;
}
@Override
public int hashCode() {
return super.hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj instanceof User) {

View File

@ -1,6 +1,9 @@
package com.foxinmy.weixin4j.mp.payment;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
@ -13,6 +16,8 @@ import com.alibaba.fastjson.annotation.JSONField;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class JsPayNotify extends PayBaseInfo {
private static final long serialVersionUID = -4659030958445259803L;

View File

@ -2,6 +2,8 @@ package com.foxinmy.weixin4j.mp.payment;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@ -18,7 +20,8 @@ import com.foxinmy.weixin4j.util.RandomUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class MicroPayPackage extends PayPackage {
private static final long serialVersionUID = 8944928173669656177L;

View File

@ -2,7 +2,10 @@ package com.foxinmy.weixin4j.mp.payment;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.mp.type.SignType;
@ -16,6 +19,8 @@ import com.foxinmy.weixin4j.mp.type.SignType;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PayBaseInfo implements Serializable {
private static final long serialVersionUID = 1843024880782466990L;

View File

@ -3,7 +3,10 @@ package com.foxinmy.weixin4j.mp.payment;
import java.io.Serializable;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.util.DateUtil;
@ -17,6 +20,8 @@ import com.foxinmy.weixin4j.util.DateUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PayPackage implements Serializable {
private static final long serialVersionUID = 3450161267802545790L;

View File

@ -1,11 +1,16 @@
package com.foxinmy.weixin4j.mp.payment;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.util.DateUtil;
import com.foxinmy.weixin4j.util.RandomUtil;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PayRequest extends PayBaseInfo {
private static final long serialVersionUID = -453746488398523883L;

View File

@ -2,7 +2,10 @@ package com.foxinmy.weixin4j.mp.payment.coupon;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.mp.payment.v3.ApiResult;
@ -21,6 +24,8 @@ import com.foxinmy.weixin4j.util.StringUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class CouponDetail extends ApiResult {
private static final long serialVersionUID = -311265355895457070L;

View File

@ -1,6 +1,9 @@
package com.foxinmy.weixin4j.mp.payment.coupon;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.mp.payment.v3.ApiResult;
@ -14,6 +17,8 @@ import com.foxinmy.weixin4j.mp.payment.v3.ApiResult;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class CouponResult extends ApiResult {
private static final long serialVersionUID = -1996967923720149124L;

View File

@ -2,7 +2,10 @@ package com.foxinmy.weixin4j.mp.payment.coupon;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.mp.payment.v3.ApiResult;
@ -19,6 +22,8 @@ import com.foxinmy.weixin4j.util.DateUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class CouponStock extends ApiResult {
private static final long serialVersionUID = -8627202879200080499L;

View File

@ -5,6 +5,7 @@ import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.mp.type.SignType;
@ -19,6 +20,7 @@ import com.foxinmy.weixin4j.util.StringUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class ApiResult implements Serializable {

View File

@ -2,6 +2,10 @@ package com.foxinmy.weixin4j.mp.payment.v2;
import java.beans.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.mp.model.WeixinMpAccount;
import com.foxinmy.weixin4j.mp.payment.PayRequest;
@ -23,6 +27,8 @@ import com.foxinmy.weixin4j.util.MapUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class JsPayRequestV2 extends PayRequest {
private static final long serialVersionUID = -5972173459255255197L;

View File

@ -1,6 +1,9 @@
package com.foxinmy.weixin4j.mp.payment.v2;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.foxinmy.weixin4j.mp.payment.JsPayNotify;
@ -13,6 +16,8 @@ import com.foxinmy.weixin4j.mp.payment.JsPayNotify;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class NativePayNotifyV2 extends JsPayNotify {
private static final long serialVersionUID = 1868431159301749988L;

View File

@ -1,5 +1,7 @@
package com.foxinmy.weixin4j.mp.payment.v2;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@ -14,7 +16,8 @@ import com.foxinmy.weixin4j.mp.model.WeixinMpAccount;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class NativePayResponseV2 extends JsPayRequestV2 {
private static final long serialVersionUID = 6119895998783333012L;

View File

@ -2,6 +2,10 @@ package com.foxinmy.weixin4j.mp.payment.v2;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.mp.type.CurrencyType;
import com.foxinmy.weixin4j.mp.type.TradeState;
@ -16,6 +20,8 @@ import com.foxinmy.weixin4j.util.DateUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Order extends ApiResult {
private static final long serialVersionUID = 4543552984506609920L;

View File

@ -1,5 +1,7 @@
package com.foxinmy.weixin4j.mp.payment.v2;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@ -14,7 +16,8 @@ import com.foxinmy.weixin4j.mp.payment.PayBaseInfo;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PayFeedback extends PayBaseInfo {
private static final long serialVersionUID = 7230049346213966310L;

View File

@ -2,7 +2,10 @@ package com.foxinmy.weixin4j.mp.payment.v2;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.mp.payment.PayPackage;
@ -17,6 +20,8 @@ import com.foxinmy.weixin4j.util.DateUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PayPackageV2 extends PayPackage {
private static final long serialVersionUID = 5557542103637795834L;

View File

@ -1,5 +1,7 @@
package com.foxinmy.weixin4j.mp.payment.v2;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@ -14,7 +16,8 @@ import com.foxinmy.weixin4j.mp.payment.PayBaseInfo;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PayWarn extends PayBaseInfo {
private static final long serialVersionUID = 2334592957844332640L;

View File

@ -19,7 +19,7 @@ import com.alibaba.fastjson.annotation.JSONField;
* @since JDK 1.7
* @see com.foxinmy.weixin4j.mp.payment.v2.RefundDetail
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RefundRecord extends ApiResult {

View File

@ -16,7 +16,7 @@ import com.alibaba.fastjson.annotation.JSONField;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RefundResult extends RefundDetail {

View File

@ -3,6 +3,7 @@ package com.foxinmy.weixin4j.mp.payment.v3;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.http.weixin.XmlResult;
@ -17,6 +18,7 @@ import com.foxinmy.weixin4j.util.StringUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class ApiResult extends XmlResult {
@ -121,8 +123,8 @@ public class ApiResult extends XmlResult {
return recall;
}
public String setRecall() {
return recall;
public void setRecall(String recall) {
this.recall = recall;
}
@JSONField(deserialize = false, serialize = false)

View File

@ -2,7 +2,10 @@ package com.foxinmy.weixin4j.mp.payment.v3;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.mp.type.MPPaymentCheckNameType;
@ -17,6 +20,8 @@ import com.foxinmy.weixin4j.util.DateUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class MPPayment implements Serializable {
private static final long serialVersionUID = 3734639674346425312L;

View File

@ -1,6 +1,9 @@
package com.foxinmy.weixin4j.mp.payment.v3;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
@ -13,6 +16,8 @@ import com.alibaba.fastjson.annotation.JSONField;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class MPPaymentResult extends ApiResult {
private static final long serialVersionUID = 1110472826089211646L;

View File

@ -1,5 +1,7 @@
package com.foxinmy.weixin4j.mp.payment.v3;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@ -12,7 +14,8 @@ import javax.xml.bind.annotation.XmlRootElement;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class NativePayNotifyV3 extends ApiResult {
private static final long serialVersionUID = 4515471400239795492L;

View File

@ -1,5 +1,7 @@
package com.foxinmy.weixin4j.mp.payment.v3;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
@ -18,7 +20,8 @@ import com.foxinmy.weixin4j.util.RandomUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class NativePayResponseV3 extends ApiResult {
private static final long serialVersionUID = 6119895998783333012L;

View File

@ -26,7 +26,7 @@ import com.foxinmy.weixin4j.util.StringUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Order extends ApiResult {

View File

@ -2,6 +2,8 @@ package com.foxinmy.weixin4j.mp.payment.v3;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@ -20,7 +22,8 @@ import com.foxinmy.weixin4j.util.RandomUtil;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PayPackageV3 extends PayPackage {
private static final long serialVersionUID = 8944928173669656177L;

View File

@ -1,5 +1,9 @@
package com.foxinmy.weixin4j.mp.payment.v3;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.foxinmy.weixin4j.exception.PayException;
import com.foxinmy.weixin4j.mp.payment.PayRequest;
@ -20,6 +24,8 @@ import com.foxinmy.weixin4j.mp.payment.PayRequest;
* @since JDK 1.7
* @see com.foxinmy.weixin4j.mp.payment.v3.PrePay
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PayRequestV3 extends PayRequest {
private static final long serialVersionUID = -5972173459255255197L;

View File

@ -1,5 +1,7 @@
package com.foxinmy.weixin4j.mp.payment.v3;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@ -14,7 +16,8 @@ import com.foxinmy.weixin4j.mp.type.TradeType;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PrePay extends ApiResult {
private static final long serialVersionUID = -8430005768959715444L;

View File

@ -2,7 +2,10 @@ package com.foxinmy.weixin4j.mp.payment.v3;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.util.DateUtil;
@ -17,6 +20,8 @@ import com.foxinmy.weixin4j.util.DateUtil;
* @see <a
* href="http://pay.weixin.qq.com/wiki/doc/api/cash_coupon.php?chapter=13_1">红包简介</a>
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Redpacket implements Serializable {
private static final long serialVersionUID = -7021352305575714281L;

View File

@ -1,6 +1,9 @@
package com.foxinmy.weixin4j.mp.payment.v3;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.http.weixin.XmlResult;
@ -14,6 +17,8 @@ import com.foxinmy.weixin4j.http.weixin.XmlResult;
* @since JDK 1.7
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RedpacketSendResult extends XmlResult {
private static final long serialVersionUID = 5611847899634131711L;

View File

@ -19,7 +19,7 @@ import com.foxinmy.weixin4j.mp.type.CurrencyType;
* @date 2014年11月1日
* @since JDK 1.7
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RefundRecord extends ApiResult {

View File

@ -16,7 +16,7 @@ import com.alibaba.fastjson.annotation.JSONField;
* @since JDK 1.7
* @see
*/
@XmlRootElement(name = "xml")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RefundResult extends RefundDetail {

View File

@ -98,7 +98,7 @@ public class MassTest extends TokenTest {
public void previewMass() throws WeixinException {
JsonResult result = massApi.previewMassNews(
"oyFLst1bqtuTcxK-ojF8hOGtLQao", new Text("test"));
Assert.assertEquals("0", result.getCode());
Assert.assertEquals(0, result.getCode());
}
@Test

View File

@ -101,8 +101,9 @@ public class XmlstreamTest {
public static void main(String[] args) throws Exception {
// map2xml();
// xml2map();
// xml2order();
xml2order();
// xml2refundRecordV2();
xml2refundRecordV3();
// xml2refundRecordV3();
// object2xmlWithoutRootElement();
}
}