Okay, thats kind of what I thought. Check the XML you are getting back
from the serverURL. My guess is it won't match the document you are
trying to parse it to.


On Fri, Jan 9, 2009 at 10:39 AM, Wm.A.Stafford
<staff...@marine.rutgers.edu> wrote:
> jacob,
>
> This is the exception that is thrown:
>
> rg.apache.xmlbeans.XmlException: Element
> respo...@http://rs.tdwg.org/tapir/1.0 is not a valid
> metad...@http://rs.tdwg.org/tapir/1.0 document or a valid substitution.
>   at org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:328)
>   at
> org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1279)
>   at
> org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263)
>   at
> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
>   at
> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:309)
>   at org.tdwg.rs.tapir.x10.MetadataDocument$Factory.parse(Unknown Source)
>   at
> org.iobis.TapirClientUtilities.getMetadata(TapirClientUtilities.java:44)
>   at
> org.iobis.TapirClientUtilities.displayMetadataToSysout(TapirClientUtilities.java:72)
>   at org.iobis.TapirClient.main(TapirClient.java:100)
>
> Jacob Danner wrote:
>>
>> What errors are you seeing?
>>
>> On Fri, Jan 9, 2009 at 10:30 AM, Wm.A.Stafford
>> <staff...@marine.rutgers.edu> wrote:
>>
>>>
>>> Jacob.
>>> The MetadataDocument is not valid.  What does this mean?
>>>
>>> -=beeky
>>>
>>> Jacob Danner wrote:
>>>
>>>>
>>>> Did you try validating it?
>>>>
>>>> Here is what I was referring to:
>>>> MetadataDocument mDoc =MetaDataDocument.Factory.parse(new
>>>> URL(server_url));
>>>> MetadataResultType doc = mDoc.getMetadataResultType();
>>>> System.out.println("title=" + doc.getTitle() );
>>>> System.out.println("doc=" + doc.toString()) ;
>>>>
>>>> On Fri, Jan 9, 2009 at 9:16 AM, Wm.A.Stafford
>>>> <staff...@marine.rutgers.edu> wrote:
>>>>
>>>>
>>>>>
>>>>> Jacob,
>>>>> Thanks for the quick reply.  Unfortunately, I still don't see the
>>>>> solution.
>>>>> I think you are saying that the MetadataResultType.getTitle() function
>>>>> I
>>>>> mentioned is associated with type information not the actual value of
>>>>> the
>>>>> Title element.
>>>>> By this do you mean that there will not be a getTitle() function that
>>>>> returns the value of the Title element?
>>>>>
>>>>> I suppose I'm approaching this in a backward fashion.  I used XmlBeans
>>>>> to
>>>>> generate classes and javadoc and then searched the javadoc for a
>>>>> getTitle()
>>>>> function.
>>>>> How is this usually done, i.e. how do you go from schema element to
>>>>> java
>>>>> class to method that gets the element value?
>>>>>
>>>>> Thanks,
>>>>> -=beeky
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>>>>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>>>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org

Reply via email to