cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Unmarshalling Error:Invalid content was found starting with element
Date Mon, 11 Apr 2011 09:47:29 GMT
It has to work with Jettison 1.3-SNAPSHOT

Sergey

On Tue, Feb 15, 2011 at 2:32 PM, Kannan Ramasamy <ramkannan2003@gmail.com>wrote:

>
> Hi
>
>    In my Restful application,   I am trying to POST JSON data which i got
> as response from my GET request. i pasted code sample here. is there any
> problem in my XSD configuration.
>
> XSD
> ===
>
>  <xs:element name="keyword" type="tns:keyword"/>
>
>  <xs:complexType name="store">
>    <xs:sequence>
>      <xs:element name="description" type="xs:string" minOccurs="0"/>
>      <xs:element name="keywords" minOccurs="0">
>        <xs:complexType>
>          <xs:sequence>
>            <xs:element ref="tns:keyword" minOccurs="0"
> maxOccurs="unbounded"/>
>          </xs:sequence>
>        </xs:complexType>
>      </xs:element>
>      <xs:element name="name" type="xs:string" />
>  </xs:complexType>
>
>
>  <xs:complexType name="keyword">
>    <xs:sequence>
>      <xs:element name="id" type="xs:long" minOccurs="0"/>
>      <xs:element name="lastModified" type="xs:dateTime" minOccurs="0"/>
>      <xs:element name="storeId" type="xs:long" minOccurs="0"/>
>      <xs:element name="type" type="xs:string" minOccurs="0"/>
>      <xs:element name="value" type="xs:string" minOccurs="0"/>
>    </xs:sequence>
>  </xs:complexType>
>
>
>
> JSON INPUT
> =========
> {
>    "store.store": {
>        "store.description": "It is the world's online marketplace",
>        "store.keywords": {
>            "store.keyword": [
>                {
>                    "store.value": "amazon"
>                },
>                {
>                    "store.value": "anthropologie"
>                }
>            ]
>        }
>    }
> }
>
> Following exception i am getting.
>
> Internal Server Error: org.xml.sax.SAXParseException:
> cvc-complex-type.2.4.a: Invalid content was found starting with element
> 'keyword'. One of '{\"http:\/\/www.sample.com\/xml\/ns\/store\":keyword}'
> is
> expected.","ns12.statusCode":500}}
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Unmarshalling-Error-Invalid-content-was-found-starting-with-element-tp3386024p3386024.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message