• naveen darshanala
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies
I have requirement where I need to create a map with values can be either string or Integer. Could someone please let me know how to approach?
Could someone please help me in writing the below code,


 public class TaxCalculationServicePort {
        public String endpoint_x = ‘endpoint URL’;
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'http://www.sabrix.com/services/taxcalculationservice/2011-09-01', 'TaxCalcService'};
        public TaxCalcService.OutdataType CalculateTax(TaxCalcService.IndataType INDATA) {
            TaxCalcService.TaxCalculationRequest request_x = new TaxCalcService.TaxCalculationRequest();


InDataType class is defined as below
    public class IndataType {
        public String COMPANY_ID;
        public String COMPANY_NAME;
        public String COMPANY_ROLE;
        public String EXTERNAL_COMPANY_ID;
        public Long SCENARIO_ID;
        public String SCENARIO_NAME;
        public String XML_GROUP_NAME;
        public String XML_GROUP_OWNER;
        public String USERNAME;
        public String PASSWORD;
        public String HOST_SYSTEM;
        public TaxCalcService.HostRequestInfoType HOST_REQUEST_INFO;
        public String CALLING_SYSTEM_NUMBER;
        public TaxCalcService.IndataInvoiceType[] INVOICE;


How to pass the variables which are defined under IndataInvoiceType class to my CalculateTax method.
IndataInvoiceType class is defined as below,
public class IndataInvoiceType {
        public String ALLOCATION_GROUP_NAME;
        public String ALLOCATION_GROUP_OWNER;
        public String ALLOCATION_NAME;
        public String AUTO_CREATE_CERTIFICATES;

                .
                .
     public TaxCalcService.ZoneAddressType SHIP_FROM;
        public TaxCalcService.ZoneAddressType SHIP_TO;

Could you please tell me how to declare variables which are under class IndataInvoiceType, ZoneAddressType to send the parameters to CalculateTax method.
 
I have requirement where I need to create a map with values can be either string or Integer. Could someone please let me know how to approach?