XStream
  1. XStream
  2. XSTR-466

Xstream marshalling and unmarhsalling

    Details

    • Type: Test Test
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • JDK version and platform:
      1.5

      Description

      Hi all,
      Here is my xml request from a paylod of webservice , I would like to unmarhcall it to Java object. I have included Java class Address below.
      when I try to unmarshall it, its errroring on prefix schema? Is there any way I can handle this prefix and also when marshall Java object into xml i don't want prefix.

      <schema:address>" +
      " <schema:name>XYZ</schema:name>" +
      " <schema:addressLine1>123 Worcester</schema:addressLine1>" +
      " <schema:addressLine2/>" +
      " <schema:city>San diego</schema:city>" +
      " <schema:state>MA</schema:state>" +
      " <schema:zip>91235</schema:zip>" +
      " <schema:countryCode>US</schema:countryCode>" +
      " </schema:address>

      public class Address {
      private String name;
      private String addressLine1;
      private String addressLine2;
      private String city;
      private String state;
      private String zip;
      private String countryCode;

      public String getCountryCode()

      { return countryCode; }

      public void setCountryCode(String countryCode)

      { this.countryCode = countryCode; }

      public String getAddressLine1()

      { return addressLine1; }

      public void setAddressLine1(String addressLine1)

      { this.addressLine1 = addressLine1; }

      public String getAddressLine2()

      { return addressLine2; }

      public void setAddressLine2(String addressLine2)

      { this.addressLine2 = addressLine2; }

      public String getCity()

      { return city; }

      public void setCity(String city)

      { this.city = city; }

      public String getState()

      { return state; }

      public void setState(String state)

      { this.state = state; }

      public String getZip()

      { return zip; }

      public void setZip(String zip)

      { this.zip = zip; }

      public String getName()

      { return name; }

      public void setName(String name)

      { this.name = name; }

        People

        • Assignee:
          Unassigned
          Reporter:
          nag
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: