Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

javax.xml.bind.UnmarshalException: unexpected element (uri:""

843834Apr 13 2010 — edited Apr 14 2010
Having problems with jaxb unmarshalling an xml file

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2010 rel. 2 (http://www.altova.com) by Regence Employee (THE REGENCE GROUP) -->
<EnrollmentRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="F:\Data\NetBeansProjects\834Parser\data\enrollmentschema.xsd">
<Enrollments>
<EnrollmentType>NewEnrollment</EnrollmentType>
<SourceName>USRINPUT</SourceName>
<GroupIdentifier>
<GroupId>60004854</GroupId>
<SubGroupID>0001</SubGroupID>
</GroupIdentifier>
<EnrollmentPolicy>
<HoursPerWeekWorked>40</HoursPerWeekWorked>
<Enrollment>
<Event>
<EventType>NEW</EventType>
<EventDate>05/15/2009</EventDate>
<EventEffectiveDate>06/10/2009</EventEffectiveDate>
<EventTerminationDate/>
<BreakInCoverage/>
<QualifyingEvent/>
<Description/>
<Reason/>
</Event>
<Cobra>
<CobraType/>
<QualifyingEvent/>
<CobraEffectiveDate/>
<CertificateLength/>
<CobraTerminationDate/>
</Cobra>
<Person>
<Name>
<FirstName>TEST</FirstName>
<LastName>ENROLLMENT</LastName>
<MiddleName/>
<NameSuffix/>
</Name>
<DateOfBirth>05/05/1976</DateOfBirth>
<Gender>Male</Gender>
<MaritalStatus>Single</MaritalStatus>
<Language>ENGL</Language>
<PersonIdentifier>
<PersonId>555555555</PersonId>
<PersonIdentifierType>SocialSecurityNumber</PersonIdentifierType>
</PersonIdentifier>
<PersonIdentifier>
<PersonId>55555567345</PersonId>
<PersonIdentifierType>MedicareId</PersonIdentifierType>
</PersonIdentifier>
<PriorCoverage>
<CarrierName>Kaiser</CarrierName>
<PolicyHolderID>345545</PolicyHolderID>
<EffectiveDate>01/01/2009</EffectiveDate>
<TerminationDate>01/31/2009</TerminationDate>
<PolicyHolderName>Medical</PolicyHolderName>
</PriorCoverage>
<PriorCoverage>
<CarrierName>Providence</CarrierName>
<PolicyHolderID>23474</PolicyHolderID>
<EffectiveDate>02/01/2009</EffectiveDate>
<TerminationDate>03/31/2009</TerminationDate>
<PolicyHolderName>Medical</PolicyHolderName>
</PriorCoverage>
<ContactInformation>
<AddressDetails>
<ContactType>Home</ContactType>
<Address>
<AliasName>ADDR1</AliasName>
<AddressLine1>56 Test Street</AddressLine1>
<AddressLine2/>
<City>Portland</City>
<County>Multnomah</County>
<State>OR</State>
<ZipCode>97203</ZipCode>
<Country>US</Country>
</Address>
</AddressDetails>
<AddressDetails>
<ContactType>Mailing</ContactType>
<Address>
<AliasName>ADDR1</AliasName>
<AddressLine1>89 Mailing Street</AddressLine1>
<AddressLine2/>
<City>Portland</City>
<County>Multnomah</County>
<State>OR</State>
<ZipCode>97203</ZipCode>
<Country>US</Country>
</Address>
</AddressDetails>
<PhoneNumber>
<ContactType>Home</ContactType>
<PhoneNumber>665-567-8888</PhoneNumber>
</PhoneNumber>
<EMailAddress>
<EmailAddress>user@home.com</EmailAddress>
</EMailAddress>
</ContactInformation>
<Membership>
<MembershipIdentifier>
<MemberID/>
<MemberIdentifierType>CPSS_SBSB_ID</MemberIdentifierType>
</MembershipIdentifier>
<RelationshipToSubscriber>Subscriber</RelationshipToSubscriber>
<MemberIndex>0</MemberIndex>
<InsuranceIDCard>
<IDLevel>FAMILY</IDLevel>
<IDBackground>100</IDBackground>
</InsuranceIDCard>
<Eligibility>
<Coverage>
<ClassId>0001</ClassId>
<Product>
<ProductId>MINN1001</ProductId>
<BusinessCategory>M</BusinessCategory>
</Product>
<Product>
<ProductId>RX000001</ProductId>
<BusinessCategory>R</BusinessCategory>
</Product>
</Coverage>
</Eligibility>
<Preference>
<PreferenceType>EEOB</PreferenceType>
<Detail>
<DetailType>EMAIL</DetailType>
<DetailValue>user@home2.com</DetailValue>
</Detail>
</Preference>
</Membership>
<Medicare>
<Entitlement>Blah</Entitlement>
<EntitlementStartDate>01/01/2008</EntitlementStartDate>
<EntitlementEndDate/>
<MedicareProgram>
<MedicareProgramType>TypeA</MedicareProgramType>
<EffectiveDate>01/01/2008</EffectiveDate>
<TerminationDate/>
</MedicareProgram>
<MedicareProgram>
<MedicareProgramType>TypeB</MedicareProgramType>
<EffectiveDate>01/01/2008</EffectiveDate>
<TerminationDate/>
</MedicareProgram>
</Medicare>
<Disability>
<IsDisabled>false</IsDisabled>
<DisabledDate/>
<Description/>
<VerifiedBy/>
<VerifiedDate/>
<VerificationMethod>EMAIL</VerificationMethod>
</Disability>
</Person>
</Enrollment>
</EnrollmentPolicy>
</Enrollments>
</EnrollmentRequest>


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://dto.sil.regence.com/EnrollmentRequest" xmlns:ns1="http://dto.sil.regence.com/EnrollmentType" xmlns:ns2="http://group.dto.sil.regence.com/GroupIdentifier" xmlns:ns3="http://enrollment.dto.sil.regence.com/EnrollmentPolicy" targetNamespace="http://dto.sil.regence.com/EnrollmentRequest" version="1.0">
<xs:import namespace="http://dto.sil.regence.com/EnrollmentType" schemaLocation="EnrollmentType.xsd"/>
<xs:import namespace="http://group.dto.sil.regence.com/GroupIdentifier" schemaLocation="group/GroupIdentifier.xsd"/>
<xs:import namespace="http://enrollment.dto.sil.regence.com/EnrollmentPolicy" schemaLocation="enrollment/EnrollmentPolicy.xsd"/>
<xs:element name="EnrollmentRequest">
<xs:complexType>
<xs:annotation>
<xs:documentation/>
</xs:annotation>
<xs:sequence>
<xs:element name="Enrollments">
<xs:complexType>
<xs:sequence>
<xs:element name="EnrollmentType" type="ns1:EnrollmentType"/>
<xs:element name="SourceName" type="xs:string"/>
<xs:element name="GroupIdentifier" type="ns2:GroupIdentifier"/>
<xs:element name="EnrollmentPolicy" type="ns3:EnrollmentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

kind of stuck as to why i cant get this xml file to unmarshal



javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"EnrollmentRequest"). Expected elements are (none)
at

Comments

DrClap
xsi:noNamespaceSchemaLocation="F:\Data\NetBeansProjects\834Parser\data\enrollmentschema.xsd"
I did some googling; all of the examples of the xsi:noNamespaceSchemaLocation I found were too simple. But eventually I found a document which suggested that the value of this attribute should be a URI. Which makes sense since the schema specs were written by the W3C for use in Internet applications. And you haven't provided a URI there.
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 12 2010
Added on Apr 13 2010
1 comment
2,608 views