Forum Discussion

mmoser18's avatar
mmoser18
Frequent Contributor
8 years ago

Error opening soapUI project file from v5.3.0 with soapUI v5.2.1

We have a problem with the new soapUI version 5.3.0:

 

Some of our team have already upgraded to v5.3.0, others have not. Initially we had no issue with that but with our current version of our testfile all those still on v5.2.1 are getting an error:

 

2017-01-16 13:08:02,832 ERROR [errorlog] com.eviware.soapui.support.SoapUIException: Failed to load project from file [file:/W:/Tests-v5-soapui-project.xml]
com.eviware.soapui.support.SoapUIException: Failed to load project from file [file:/W:/Tests-v5-soapui-project.xml]
	at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:318)
	at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:220)
	at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:58)
	at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:28)
	at com.eviware.soapui.impl.WorkspaceImpl.loadWorkspace(WorkspaceImpl.java:152)
	at com.eviware.soapui.impl.WorkspaceImpl.<init>(WorkspaceImpl.java:88)
	at com.eviware.soapui.impl.WorkspaceFactoryImpl.openWorkspace(WorkspaceFactoryImpl.java:33)
	at com.eviware.soapui.SoapUI.startSoapUI(SoapUI.java:902)
	at com.eviware.soapui.SoapUI$SoapUIRunner.run(SoapUI.java:721)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException: string value 'UNKNOWN' is not a valid enumeration value for AccessTokenStatus in namespace http://eviware.com/soapui/config
	at org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx.set_text(JavaStringEnumerationHolderEx.java:39)
	at org.apache.xmlbeans.impl.values.XmlObjectBase.update_from_wscanon_text(XmlObjectBase.java:1166)
	at org.apache.xmlbeans.impl.values.XmlObjectBase.check_dated(XmlObjectBase.java:1305)
	at org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx.getEnumValue(JavaStringEnumerationHolderEx.java:60)
	at com.eviware.soapui.config.impl.OAuth2ProfileConfigImpl.getAccessTokenStatus(OAuth2ProfileConfigImpl.java:899)
	at com.eviware.soapui.impl.rest.OAuth2Profile.setAccessTokenStatus(OAuth2Profile.java:363)
	at com.eviware.soapui.impl.rest.OAuth2Profile.setDefaultAccessTokenStatus(OAuth2Profile.java:566)
	at com.eviware.soapui.impl.rest.OAuth2Profile.<init>(OAuth2Profile.java:169)
	at com.eviware.soapui.impl.rest.DefaultOAuth2ProfileContainer.buildOAuth2ProfileList(DefaultOAuth2ProfileContainer.java:140)
	at com.eviware.soapui.impl.rest.DefaultOAuth2ProfileContainer.<init>(DefaultOAuth2ProfileContainer.java:44)
	at com.eviware.soapui.impl.wsdl.WsdlProject.loadProjectFromInputStream(WsdlProject.java:401)
	at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:301)
	... 22 more

 

Can one avoid that problem somehow? The upgrade on the developer workstation wouldn't be such an issue but having to upgrade our build server would trigger some heavy-weight processes. We'ld rather downgrade the developer versions for the time being...

 

Is there some way to force such a file to be v5.2.1 compatible again?

  • I believe the only way to stay 100% compatible with 5.2.1 is to stay with 5.2.1 with all editors of the SoapUI project. The 5.3.0 version comes with changes and they are reflected in the project file XML structure.

     

    In your case, version 5.3.0 allows the status of access token having the value "UNKNOWN", whereas 5.2.1 did not.

     

    The set of allowed values is in 5.3.0:

     

     

        <xsd:simpleType name="AccessTokenStatus">
            <xsd:restriction base="xsd:string">
                <xsd:enumeration value="UNKNOWN"></xsd:enumeration>
                <xsd:enumeration value="ENTERED_MANUALLY"></xsd:enumeration>
                <xsd:enumeration value="WAITING_FOR_AUTHORIZATION"></xsd:enumeration>
                <xsd:enumeration value="RECEIVED_AUTHORIZATION_CODE"></xsd:enumeration>
                <xsd:enumeration value="RETRIEVED_FROM_SERVER"></xsd:enumeration>
                <xsd:enumeration value="EXPIRED"></xsd:enumeration>
                <xsd:enumeration value="RETRIEVAL_CANCELED"></xsd:enumeration>
            </xsd:restriction>
        </xsd:simpleType>

     

     

    In the version 5.2.1:

     

     

        <xsd:simpleType name="AccessTokenStatus">
            <xsd:restriction base="xsd:string">
                <xsd:enumeration value="ENTERED_MANUALLY"></xsd:enumeration>
                <xsd:enumeration value="WAITING_FOR_AUTHORIZATION"></xsd:enumeration>
                <xsd:enumeration value="RECEIVED_AUTHORIZATION_CODE"></xsd:enumeration>
                <xsd:enumeration value="RETRIEVED_FROM_SERVER"></xsd:enumeration>
                <xsd:enumeration value="EXPIRED"></xsd:enumeration>
                <xsd:enumeration value="RETRIEVAL_CANCELED"></xsd:enumeration>
            </xsd:restriction>
        </xsd:simpleType>

     

     

    If you want to convert the project file back to 5.2.1, I would try changing the value (UNKNOWN to e.g. EXPIRED) in the project XML and then to check in the 5.2.1 SoapUI. There might be other issues once you resolve this one.

     

  • KarelHusa's avatar
    KarelHusa
    Champion Level 1

    I believe the only way to stay 100% compatible with 5.2.1 is to stay with 5.2.1 with all editors of the SoapUI project. The 5.3.0 version comes with changes and they are reflected in the project file XML structure.

     

    In your case, version 5.3.0 allows the status of access token having the value "UNKNOWN", whereas 5.2.1 did not.

     

    The set of allowed values is in 5.3.0:

     

     

        <xsd:simpleType name="AccessTokenStatus">
            <xsd:restriction base="xsd:string">
                <xsd:enumeration value="UNKNOWN"></xsd:enumeration>
                <xsd:enumeration value="ENTERED_MANUALLY"></xsd:enumeration>
                <xsd:enumeration value="WAITING_FOR_AUTHORIZATION"></xsd:enumeration>
                <xsd:enumeration value="RECEIVED_AUTHORIZATION_CODE"></xsd:enumeration>
                <xsd:enumeration value="RETRIEVED_FROM_SERVER"></xsd:enumeration>
                <xsd:enumeration value="EXPIRED"></xsd:enumeration>
                <xsd:enumeration value="RETRIEVAL_CANCELED"></xsd:enumeration>
            </xsd:restriction>
        </xsd:simpleType>

     

     

    In the version 5.2.1:

     

     

        <xsd:simpleType name="AccessTokenStatus">
            <xsd:restriction base="xsd:string">
                <xsd:enumeration value="ENTERED_MANUALLY"></xsd:enumeration>
                <xsd:enumeration value="WAITING_FOR_AUTHORIZATION"></xsd:enumeration>
                <xsd:enumeration value="RECEIVED_AUTHORIZATION_CODE"></xsd:enumeration>
                <xsd:enumeration value="RETRIEVED_FROM_SERVER"></xsd:enumeration>
                <xsd:enumeration value="EXPIRED"></xsd:enumeration>
                <xsd:enumeration value="RETRIEVAL_CANCELED"></xsd:enumeration>
            </xsd:restriction>
        </xsd:simpleType>

     

     

    If you want to convert the project file back to 5.2.1, I would try changing the value (UNKNOWN to e.g. EXPIRED) in the project XML and then to check in the 5.2.1 SoapUI. There might be other issues once you resolve this one.

     

    • mmoser18's avatar
      mmoser18
      Frequent Contributor

      From the instructions I wrote for myself and my colleagues:

       

      If your soapUI v5.2.1 has issues opening the project file then either check out the latest version from soapUI or do the following:

       

      1. Open the file LHAPI-Tests-v5-soapui-project.xml in a text editor.
      2. Go to the very end of the file.
      3. Locate the line with the element "accessTokenStatus" (note: NOT accessTokenStartingStatus, just accessTokenStatus). It reads something like:
        <con:accessTokenStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">UNKNOWN</con:accessTokenStatus>
      4. Change that line to:
        <con:accessTokenStatus xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
      5. Save the file and then restart soapUI. If it does not immediately reload the file, right-click on the entry and click "Reload". Now it should open the fileā€¦ (hopefully).

       

      Hope that helps!