Clarity

Expand all | Collapse all

XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

Jump to Best Answer
  • 1.  XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-26-2016 03:46 PM

    Hi All,

     

    I'd like to ask if someone has ever met with situation that XOG in a project was working through xog.client (e.g. https://clarity_xxxx.com/niku/nu#action:xog.client)

    but NOT through GEL script process. My process fails with error:

     

    <ErrorInformation>

      <Severity>FATAL</Severity>

      <Description>[Error] :0:0: unexpected attribute "xsi:noNamespaceSchemaLocation"

    Invalid attribute in input document. Please remove all instances of attribute from document elements and try again.

    [Element : NikuDataBus, Attribute : xsi:noNamespaceSchemaLocation ].

    </Description>

     

    When process fails, In BG-CA.log I can find only complete XML file which I can then XOG in successfully through mentioned xog.client....but there is nothing mentioned what's wrong with it.

    What should be the root-cause? I can of course share XML file or anything but we have many custom attributes on project....Thanks to all.

     

    Matej



  • 2.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-27-2016 12:49 AM

    It sounds that you are using the same version with the xog.client and the GEL script process.

     

    Do you have
    <NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">

    as the first line of the input file?

    Try leaving that out.



  • 3.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 04:23 AM

    Hi Urmas,

     

    Yes of course, my XOG read is like that:

     

    <!-- Prepare XOG read Project -->

      <gel:parse var="xogReadProject">

      <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">

      <Header version="13.3.0.286" action="read" objectType="project" externalSource="NIKU"></Header>

      <Query>

      <Filter name="projectID" criteria="EQUALS">${project_id}</Filter>

      </Query>

      </NikuDataBus>

      </gel:parse>

     

    So XOG write is similar with <NikuDataBus> tag. Isn't it mandatory for XOGging in to Clarity through GEL process? 

     

    When I've just tried to "delete" NikuDataBus tag with line (as usual I'm doing it)

     

    <gel:set asString="true" select="$xogWriteProject/NikuDataBus/text()" value="" insert="false"/>

     

    it throws me error: Invalid or missing XML. Should I delete this tag by another way? Thanks

     

    Matej



  • 4.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 04:58 AM

    Not sure if its significant, but my copy of the standard "prj_projects_read.xml" has this in the NikuDataBus header;

     

    xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd"

     

    rather than your "nikuxog_project.xsd" version?



  • 5.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 05:23 AM

    Hi Dave,

     

    I didn't think this should be a problem, but have just tried it out. It gives me the same error like at the beginning.

    The funny thing is that since in the source code I've used yours "../xsd/nikuxog_read.xsd", in the generated XML file was

    still "../xsd/nikuxog_project.xsd" ...

     

    Maybe I should try Urmas mentioned hint to set <NikuDataBus> tag blank. Do you know the tip how can I set it to blank tag? (just <NikuDataBus>)

    I can set all custom attributes or project values to blank but I can't accomplish to set this main tag to the same....  Thanks

     

    Matej



  • 6.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 05:24 AM

    OK, my suggestion was not it then

    The prj_projects_read.xml that came with my 13.3. has the first lines as

     

    <NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">

    <Header version="6.0.11" action="read" objectType="project" externalSource="NIKU">

    so no

    http://www.w3.org/2001/XMLSchema-instance



  • 7.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 05:37 AM

    Hi Urmas,

     

    OK, I think I've used this beginning of XML document from some other Clarity process so that's maybe a difference.

    To be clear I've used your suggestion, but the error message of the process is still the same: unexpected attribute "xsi:noNamespaceSchemaLocation"

    and also the xsd document is still used "../xsd/nikuxog_project.xsd"..   and not nikuxog_read as I put it into the source code of process...

     

    Nevertheless, do you have any tip how can I put blank of <NikuDataBus> tag to try it through GEL script?

    (I'm building whole XML by just deleting some attributes in the way I've mentioned above and changing some attributes also through by this line of code)

     

    I've tried everything I had in my mind but with no luck. Thanks

     

    Matej



  • 8.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 05:38 AM

    In your GEL script ; are you are sending the request to the correct URL?

     

    (out of GUESSes now)



  • 9.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 05:42 AM

    My XOG Url is "internal" value so yes it's correct. When I simple past whole generated XML document for XOG in to the xog.client, it passes successfully....



  • 10.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 06:08 AM

    If not done earlier, try removing even xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd" from it and see if it works.



  • 11.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 06:10 AM

    That is the same as my earlier comment about leaving it out not just the tag, but the tag and values the reason being that earlier in other cases the error

     

    XOG in error unexpected attribute

    has meant that XOG is expecting something else before that



  • 12.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 06:16 AM

    Hi Gyus,

     

    Definitely that is what I want to achieve (Urmas's first hint) but don't know how.

    Just need to get blank <NikuDataBus> from mine

    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">

     

    Matej



  • 13.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 06:34 AM

    Oh, I might have misunderstood. So you mean to say that you tried below and still it didn't work?

     

    <!-- Prepare XOG read Project -->

      <gel:parse var="xogReadProject">

      <NikuDataBus>

      <Header version="13.3.0.286" action="read" objectType="project" externalSource="NIKU"></Header>

      <Query>

      <Filter name="projectID" criteria="EQUALS">${project_id}</Filter>

      </Query>

      </NikuDataBus>

      </gel:parse>



  • 14.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 06:45 AM

    Hi Sridhar,

     

    So for a several times again. I need in my prepared XML document for XOG in to have header like

    <NikuDataBus>

      <Header action="write" externalSource="NIKU" objectType="project" version="13.3.0.286"/>

      <Projects>

        <Project .....

     

    Now I thought you brought up this hint, but It wasn't. I've tried to change XOG read to your suggestion:

    <gel:parse var="xogReadProject">

      <NikuDataBus>

      <Header version="13.3.0.286" action="read" objectType="project" externalSource="NIKU"></Header>

      <Query>

      <Filter name="projectID" criteria="EQUALS">${project_id}</Filter>

      </Query>

      </NikuDataBus>

      </gel:parse>

     

    But in the output still was NikuDataBus with attributes:

    Project XOG prepared to write : <?xml version="1.0" encoding="UTF-8"?>

    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">

      <Header action="write" externalSource="NIKU" objectType="project" version="13.3.0.286"/>

    ....

     

    So my question is still the same how can I remove attributes from <NikuDataBus> tag to have it blank?

     

    Matej



  • 15.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"
    Best Answer

    Posted 02-29-2016 07:12 AM

    I was thinking that you are referring to read file, but it seems, that you are able to read a project which resulted in write ready file and you want to remove those attributes from write file. If so, try this.

    xogWriteResponse is the variable holding your XML. So replace it with yours.

     

    <gel:set select="$xogWriteResponse//NikuDataBus" var="NikuDataBusTag"/>

    <core:set var="void">${NikuDataBusTag.removeAttribute('xmlns:xsi')}</core:set>

    <core:set var="void">${NikuDataBusTag.removeAttribute('xsi:noNamespaceSchemaLocation')}</core:set>



  • 16.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 07:45 AM

    Hi Sridhar,

     

    Yeeeesss, that's exactly I was looking for since Urmas pointed on this hint that <NikuDataBus> tag should be cleared out.

    Now project has been XOGged in successfully. Thanks again for this great hint and of course to all who came there with their ideas.

     

    Note: As I'm thinking about this error it should be somehow connected to difference between xsd's:

    "../xsd/nikuxog_read.xsd" and "../xsd/nikuxog_project.xsd" ... which Dave mentioned.
    Nevertheless, I can't explain how it's possible to achieve this change when I was still having nikuxog_project in XOG write XML doc,

    when in XOG read was nikuxog_read xsd, so different xsd....

     

    Matej



  • 17.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 08:01 AM

    Good to know that it helped....!

    However, I believe that the problem is not resolved but rather skipped by avoiding the attributes, which are actually not causing issues through XOG Client. So there is something wrong somewhere which you may work on later. All the best 



  • 18.  Re: XOG in error unexpected attribute "xsi:noNamespaceSchemaLocation"

    Posted 02-29-2016 06:14 AM

    OK well my only remaining GUESS is that there is something up with your GEL script xmlns setup, or the way you are wrapping the constructed 'xogReadProject' into the soap message.

     

    (Bit hard to guess though )

     

    --

     

    The below works OK for me running from a CMD promt (session id copied in from an active session).

     

    <gel:script

    xmlns:core="jelly:core"

    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"

    xmlns:util="jelly:util"

    xmlns:xog="http://www.niku.com/xog"

    xmlns:sql="jelly:sql"

    xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"

    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

    >

     

      <gel:parse var="xogReadProject">

     

      <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">

      <Header version="13.0" action="read" objectType="project" externalSource="NIKU">

        <args name="include_tasks" value="false"/>

        <args name="include_dependencies" value="false"/>

        <args name="include_subprojects" value="false"/>

        <args name="include_resources" value="false"/>

        <args name="include_baselines" value="false"/>

        <args name="include_allocations" value="false"/>

        <args name="include_estimates" value="false"/>

        <args name="include_actuals" value="false"/>

        <args name="include_custom" value="false"/>

    </Header>

      <Query>

      <Filter name="projectID" criteria="EQUALS">DMTEMP</Filter>

      </Query>

      </NikuDataBus>

     

      </gel:parse>

     

                                  <soap:invoke endpoint="internal" var="runresult">

                                        <soap:message>

                                            <soapenv:Envelope>

                                                <soapenv:Header>

                                                    <xog:Auth>

                                                        <xog:SessionID>5340853__7BE3F9B1-6B62-4B8C-A23D-166B83B5AEA0</xog:SessionID>

                                                    </xog:Auth>

                                                </soapenv:Header>

                                                <soapenv:Body>

                                                    <gel:include select="$xogReadProject"/>

                                                </soapenv:Body>

                                            </soapenv:Envelope>

                                        </soap:message>

                                    </soap:invoke>

     

                            <gel:out> <gel:expr select="$runresult"/> </gel:out>

                                   

    </gel:script>