Forum Discussion

aihnatsiuk's avatar
aihnatsiuk
Occasional Contributor
2 years ago

Failed to update the interface: [ Invalid QName value: Can't resolve prefix 'xs]

Hi, I get this error when trying to update the API definition in the existing project (we use Swagger): 

Failed to update the interface: [ org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException: Invalid QName value: Can't resolve prefix 'xs' ]

 

Full error log:

Thu Dec 08 10:12:27 EST 2022: ERROR: org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException: Invalid QName value: Can't resolve prefix 'xs'
org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException: Invalid QName value: Can't resolve prefix 'xs'
at org.apache.xmlbeans.impl.values.JavaQNameHolder.parse(JavaQNameHolder.java:140)
at org.apache.xmlbeans.impl.values.JavaQNameHolder.set_text(JavaQNameHolder.java:158)
at org.apache.xmlbeans.impl.values.XmlObjectBase.update_from_wscanon_text(XmlObjectBase.java:1180)
at org.apache.xmlbeans.impl.values.XmlObjectBase._check_dated(XmlObjectBase.java:1331)
at org.apache.xmlbeans.impl.values.XmlObjectBase.check_dated(XmlObjectBase.java:1283)
at org.apache.xmlbeans.impl.values.JavaQNameHolder.getQNameValue(JavaQNameHolder.java:185)
at com.eviware.soapui.config.impl.RestParameterConfigImpl.getType(Unknown Source)
at com.eviware.soapui.impl.rest.support.XmlBeansRestParamsTestPropertyHolder$XmlBeansRestParamProperty.getType(XmlBeansRestParamsTestPropertyHolder.java:462)
at com.eviware.soapui.impl.rest.support.XmlBeansRestParamsTestPropertyHolder$XmlBeansRestParamProperty.setType(XmlBeansRestParamsTestPropertyHolder.java:481)
at com.eviware.soapui.impl.rest.support.UpdateDefinitionManager.initParam(UpdateDefinitionManager.java:78)
at com.eviware.soapui.impl.rest.support.UpdateDefinitionManager.updateParamList(UpdateDefinitionManager.java:170)
at com.eviware.soapui.impl.rest.support.UpdateDefinitionManager.updateMethod(UpdateDefinitionManager.java:187)
at com.eviware.soapui.impl.rest.support.UpdateDefinitionManager.tryUpdateExistMethod(UpdateDefinitionManager.java:245)
at com.eviware.soapui.impl.rest.support.UpdateDefinitionManager.updateMethodList(UpdateDefinitionManager.java:260)
at com.eviware.soapui.impl.rest.support.UpdateDefinitionManager.updateResourceNode(UpdateDefinitionManager.java:285)
at com.eviware.soapui.impl.rest.support.UpdateDefinitionManager.tryUpdateExistingNode(UpdateDefinitionManager.java:299)
at com.eviware.soapui.impl.rest.support.UpdateDefinitionManager.tryUpdateChildResourceNodes(UpdateDefinitionManager.java:317)
at com.eviware.soapui.impl.rest.support.UpdateDefinitionManager.updateResourceNodeBase(UpdateDefinitionManager.java:333)
at com.eviware.soapui.impl.rest.support.UpdateDefinitionManager.updateDefinition(UpdateDefinitionManager.java:364)
at com.eviware.soapui.impl.rest.actions.service.UpdateRESTServiceWizard.perform(UpdateRESTServiceWizard.java:190)
at com.eviware.soapui.impl.rest.actions.service.UpdateRESTServiceWizard.perform(UpdateRESTServiceWizard.java:1)
at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:200)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1028)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1072)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
at java.desktop/java.awt.Component.processEvent(Component.java:6391)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

  • srixon I figured out how to fix it. Not sure why but some of my API XML files started to contain this line

    "<con:type>xs:string</con:type>". I don't have it in the original definition. I successfully executed the update definition after removing "xs:" from ALL API calls 

  • aihnatsiuk's avatar
    aihnatsiuk
    Occasional Contributor

    srixon I figured out how to fix it. Not sure why but some of my API XML files started to contain this line

    "<con:type>xs:string</con:type>". I don't have it in the original definition. I successfully executed the update definition after removing "xs:" from ALL API calls 

  • richie's avatar
    richie
    Community Hero
    Hi aihnatsiuk,

    I have never seen a swagger/OAS define xml before, it's always been json, but the error youre getting seems pretty clear.

    This isn't a ReadyAPI! issue.

    It looks like you have an element or attribute definition in your swagger that is using an unknown namespace prefix of xs.

    If you do a string search for 'xs:', interpreting the error response, it would appear you have an attribute or element with a namespace identifier that isnt recognised and remove the erroneous 'xs:' or change 'xs:' to the correct namespace identifier (depending on what you have defined)

    Cheers,

    Rich
    • srixon's avatar
      srixon
      Occasional Contributor

      Hi richie

       

      I encountered a similar error while attempting to update from a .yaml file.

       

      Wed Jan 18 15:46:31 EST 2023: ERROR: org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException: Invalid QName value: Can't resolve prefix 'xs'
      org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException: Invalid QName value: Can't resolve prefix 'xs'

       

      I searched the file for any instance of 'xs' and nothing turned up.

       

      I'm not sure if anyone else solved this issue.  I'll keep digging in the meantime.

      • Skan28's avatar
        Skan28
        New Member

        Is there any update here? I dont find such strings in the swagger.json file nor in my API .xml files. But i still get the error, where to look for it?