Your XML file isn't valid against your XML schema. (See below.)
I suggest that you use the JAXB unmarshaller's capability of
validating an XML file.
Wolfgang
On 9/22/08, kkalkur <karthik_kalkur_at_mindtree.com> wrote:
>
>
> Hi All
> I am using jaxb2.0.5 to parse an XML which contain namespaces . When i
> parse
> the XML i am getting null value for the node which has namespace .
> Here is the XML
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ServiceConfig xsi:noNamespaceSchemaLocation="WSI_Service_config.xsd"
> xmlns:wsiconf="http://sita/aero/csp/wsiconf/WSI_Config"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <Service name="SIP" version="1.0">
Only a minor problem:
7.37: cvc-pattern-valid: Value '1.0' is not facet-valid with respect to
pattern '[0-9]{1,16}' for type 'NumericStringLength1to16'.
> <ServiceInfo>
> <wsiconf:ServiceInvoker profileId="SIPInvoker"/>
> <wsiconf:ServiceProvider profileId="SIPProvider"/>
> </ServiceInfo>
> </Service>
Here, a <ServiceInvokerProfiles> element is missing.
2.28: cvc-complex-type.2.4.a: Invalid content was found starting with
element 'ServiceProviderProfiles'. One of '{Service,
ServiceInvokerProfiles}' is expected.
<ServiceProviderProfiles>
> <wsiconf:Profile profileId="SIPProvider">
> <wsiconf:Context>
> <wsiconf:Name>SIPSYSTEM</wsiconf:Name>
> <wsiconf:Type>jms-binding</wsiconf:Type>
>
> <wsiconf:EndPointUrl>file:@WSI_JNDI_BINDING_PATH
> @</wsiconf:EndPointUrl>
>
>
> <wsiconf:ClassOfService>aero.sita.csp.wsi.sf.provider.impl.SIPServiceProvider</wsiconf:ClassOfService>
> </wsiconf:Context>
>
> </wsiconf:Profile>
>
> </ServiceProviderProfiles>
>
> <GlobalSettings>
> <Properties>
> <wsiconf:Property name="consumer.timeout"
> value="120" />
> <wsiconf:Property name="proxy.lazyloading"
> value="true" />
> <wsiconf:Property name="proxy.maxlimit" value="15"
> />
> <wsiconf:Property name="proxy.timeout" value="100"
> />
> <wsiconf:Property name="jmxagent.rmiurl"
> value="@WSI_SIP_JMX_URL@" />
> </Properties>
> </GlobalSettings>
> </ServiceConfig>
> I am able to parse Service node but when when i try to parse the Profile
> node under the ServiceProviderProfiles .I am getting null.
> I have uploaded the XSd for the XML .
>
> http://www.nabble.com/file/p19606363/conf.zip conf.zip
>
>
>
> --
> View this message in context:
> http://www.nabble.com/JAXB-NameSpace-issue-tp19606363p19606363.html
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>