JSoap icon indicating copy to clipboard operation
JSoap copied to clipboard

Attribute value is missing in XML request

Open anandmahajan opened this issue 8 years ago • 0 comments

@JSoapClass(namespace = "http://www.travelport.com/schema/util_v38_0")

public class ReferenceDataRetrieveReq extends SOAPSerializable {

@JSoapReqField(order = 0, fieldName="BillingPointOfSaleInfo")
private BillingPointOfSaleInfo BillingPointOfSaleInfo;

}

@JSoapClass(namespace = "http://www.travelport.com/schema/common_v38_0") public class BillingPointOfSaleInfo extends SOAPSerializable {

@JSoapAttribute(name="OriginApplication")
private String OriginApplication;

public String getOriginApplication() {
    return OriginApplication;
}

public void setOriginApplication(String originApplication) {
    OriginApplication = originApplication;
}

}

     ReferenceDataRetrieveReq referenceDataRetrieveReq = new ReferenceDataRetrieveReq();

    BillingPointOfSaleInfo billingPointOfSaleInfo = new BillingPointOfSaleInfo();
    **billingPointOfSaleInfo.setOriginApplication("uAPI");**

    referenceDataRetrieveReq.setBillingPointOfSaleInfo(billingPointOfSaleInfo);

But when we generating XML request then it doesn't set attribute value of OriginApplication

n0:BillingPointOfSaleInfo n1:OriginApplication=""

Click here to see full example - http://bit.ly/2cwQ52T

anandmahajan avatar Sep 14 '16 16:09 anandmahajan