Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8942011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:25:57+00:00 2026-06-15T11:25:57+00:00

I need to send my OrderItemList Class with OrderItem Class Array inside, I try

  • 0

I need to send my OrderItemList Class with OrderItem Class Array inside, I try this one but gives me error. Cannot serialize: foo.foo.OrderItemList@461e0bf8

Thanks for your time in advance.

SoapObject request = new SoapObject(NAMESPACE, WebService);
        OrderItemList orderItemList = null;

            PropertyInfo pinfo = new PropertyInfo();
            pinfo.name = "orderItems";
            pinfo.namespace = NAMESPACE ;
            pinfo.type = OrderItemList.class;

            ArrayList<OrderItem> orderItemListT = new ArrayList<OrderItem>();
            orderItemListT.add(new OrderItem(9,9,"",9,9,9,9));
            orderItemList = new OrderItemList(orderItemListT);

            request.addProperty(pinfo,orderItemList);

    SoapSerializationEnvelope envelope =
        new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.addMapping(NAMESPACE, "orderItems", orderItemList.getClass());
    envelope.addMapping(NAMESPACE, "OrderItem", OrderItem.class); 
    envelope.dotNet = true;
    envelope.setOutputSoapObject(request); 
    AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL);

    androidHttpTransport.call("http://tempuri.org/" + WebService , envelope);

OrderItem >

public class OrderItem {
    public int ID;
    public int OrderId;
    public String FinalCode;
    public int Quantity;
    public double Price;
    public double Discount;
    public int Status;

    public OrderItem(int id, int orderId, String finalCode ,int quantity, double price, double discount, int status) {
    ID = id;
    OrderId = orderId;
    FinalCode = finalCode;
    Quantity = quantity;
    Price = price;
    Discount = discount;
        Status = status;
    }
}

OrderItemList >

public class OrderItemList {
    public ArrayList<OrderItem> OrderItemList;

    public OrderItemList(ArrayList<OrderItem> orderItemList) {
        OrderItemList = orderItemList;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:25:57+00:00Added an answer on June 15, 2026 at 11:25 am

    Implement Serializable in your class

    import java.io.Serializable;
    
    public class OrderItem implements Serializable {
        public int ID;
        public int OrderId;
        public String FinalCode;
        public int Quantity;
        public double Price;
        public double Discount;
        public int Status;
    
        public OrderItem(int id, int orderId, String finalCode ,int quantity, double price, double discount, int status) {
            ID = id;
            OrderId = orderId;
            FinalCode = finalCode;
            Quantity = quantity;
            Price = price;
            Discount = discount;
            Status = status;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to send a SOAP request to a URL. But i find this
I need send html. I get error(this machine transalate): Detected a potentially dangerous value
I need to send this to the capIn() and capOut() functions so that I
I need to send hundreds of newsletters, but would like to check first if
Hi i need send file to server i use this code public void PostFile()
I need to send mail with PHP and I use mail function like this:
I Need to send files using HTTP protocols, but the question is should I
I want download pdf with WebClient but I need send cookie with request How
I have WebView which loads one mobile site, I need send to user agent
If I need send some letter to 2 people, how can I do this?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.