0

I'm using WSO2 Developer Studio 3.8.0 to work on ESB configuration and everytime i open a certain API definition file the IDE modify its content. The original file is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<api context="/das/assets" name="wso2das-assets-management" xmlns="http://ws.apache.org/ns/synapse">
  <resource methods="POST" protocol="http">
    <inSequence>
      <clone>
        <target>
          <sequence>
            <log level="custom" separator=",">
              <property expression="//*" name="Triggering EventStreamAdminService API call.."/>
            </log>
            <call>
              <endpoint>
                <address format="soap12" trace="disable" uri="https://192.168.219.142:9444/services/EventStreamAdminService.EventStreamAdminServiceHttpsSoap12Endpoint/"/>
              </endpoint>
            </call>
            <log description="EventStreamAdminService API call response" level="full">
              <property name="WSANSWER" value="true"/>
            </log>
          </sequence>
        </target>
        <target>
          <sequence>
            <log level="custom" separator=",">
              <property expression="//*" name="Triggering EventStreamPersistenceAdminService API call.."/>
            </log>
            <call>
              <endpoint>
                <address format="soap12" trace="disable" uri="https://192.168.219.142:9444/services/EventStreamPersistenceAdminService.EventStreamPersistenceAdminServiceHttpsSoap12Endpoint/"/>
              </endpoint>
            </call>
            <log
              description="EventStreamPersistenceAdminService API call response" level="full">
              <property name="WSANSWER" value="true"/>
            </log>
          </sequence>
        </target>
      </clone>
      <respond/>
    </inSequence>
    <outSequence/>
    <faultSequence/>
  </resource>
</api>

And the file modified by the IDe once opened is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<api context="/das/assets" name="wso2das-assets-management" xmlns="http://ws.apache.org/ns/synapse">
  <resource methods="POST" protocol="http">
    <inSequence>
      <clone>
        <target>
          <sequence>
            <log level="custom" separator=",">
              <property expression="//*" name="Triggering EventStreamAdminService API call.."/>
            </log>
            <call/>
            <log description="EventStreamAdminService API call response" level="full">
              <property name="WSANSWER" value="true"/>
            </log>
          </sequence>
        </target>
        <target>
          <sequence>
            <log level="custom" separator=",">
              <property expression="//*" name="Triggering EventStreamPersistenceAdminService API call.."/>
            </log>
            <call/>
            <log
              description="EventStreamPersistenceAdminService API call response" level="full">
              <property name="WSANSWER" value="true"/>
            </log>
          </sequence>
        </target>
      </clone>
      <respond/>
    </inSequence>
    <outSequence/>
    <faultSequence/>
  </resource>
</api>

As you can see the content of the call tag (attribute and child tags) has been removed by the IDE once the file is opened. I suppose this is due to some best practice or restriction impose by the IDE. Any ideas?

Community
  • 1
  • 1
yeiniel
  • 2,416
  • 15
  • 31

1 Answers1

1

This is a bug in devstudio, it is reported @ https://wso2.org/jira/browse/TOOLS-3286 and fix will be avaialbe in next release. Will inform you the release date soon.

  • This is a very annoying bug but has a simple work around. Every time you open the file, you will notice the star indicating the file has been changed (even if it has not). When you close the file, you must 'save' the changes. This will ensure that your endpoints are not removed. If you answer 'no' to saving, then the endpoints are removed. – Rob Church Sep 24 '16 at 18:01