Hi All,
I want to convert the .ecore files to .xsd.As suggested by the team I have used precompileDecisionService to convert these files.However I m getting an error
File (C:\test\ABC.ecore) does not point to an erf file.
Not sure whether I am using Correct method
Below is the Code that i am running
package com;
import com.corticon.eclipse.server.core.ICcServer;
import com.corticon.eclipse.server.core.impl.CcServerImpl;
import com.corticon.service.ccserver.exception.CcServerFileOrDirNotFoundException;
import com.corticon.service.ccserver.exception.CcServerInvalidArgumentException;
import com.corticon.service.ccserver.exception.CcServerInvalidDecisionServiceException;
import com.corticon.service.ccserver.exception.CcServerInvalidSandboxException;
public class TestPrecompile
{
public static void main(String[] args) {
TestPrecompile TCP = new TestPrecompile();
TCP.checkPrecimplileService();
}
public void checkPrecimplileService()
{
try
{
ICcServer server = new CcServerImpl();
server.precompileDecisionService("C:\\test\\SAFE.ecore","SAFE.xsd","C:\\test\\SAFE.xsd",true);
}
catch(CcServerFileOrDirNotFoundException e)
{
e.printStackTrace();
}
catch(CcServerInvalidArgumentException e)
{
e.printStackTrace();
}
catch(CcServerInvalidDecisionServiceException e)
{
e.printStackTrace();
} catch (CcServerInvalidSandboxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Error Details
Starting Progress Corticon Server : 5.4.1.0 -b6506
Progress Corticon Server log level : DIAGNOSTIC
Progress Corticon Server log path : C:/Users/......./logs
Progress Corticon Server sandbox location : C:/Users/......./CcServerSandbox
com.corticon.service.ccserver.exception.CcServerInvalidArgumentException: CcServerImpl.precompileDecisionService()(...) File (C:\test\ABC.ecore) does not point to an erf file.
Object state for: null: null
at com.corticon.eclipse.server.core.impl.CcServerImpl.precompileDecisionService(CcServerImpl.java:11874)
at com.corticon.eclipse.server.core.impl.CcServerImpl.precompileDecisionService(CcServerImpl.java:11826)
at com.TestPrecompile.checkPrecimplileService(TestPrecompile.java:25)
at com.TestPrecompile.main(TestPrecompile.java:16)
Plz help
Precompiling works on .erf rule-flow files (not .ecore files) and generates .eds files.
So the error you get is normal here : ((C:\test\ABC.ecore) does not point to an erf file.
I saw there is another method : iICcServer.getRulesetWSDL(string str) which returns a Document object.
This Document is the WSDL contract which contains the XSD structure used by a decision service.
This method supposes that you already have deployed (at least in-process) a decision service based on your vocabulary.
As you goal is to get only XSD description file, this is not the best way I think to get them with version 5.4.1.
I will look for another work-around. But it will not be simple I feel...
Thanks Jan.
So is there some way where we can convert the ecore to xsd. If we can do it through UI , we should be able to do it programactically as the UI might be Calling the some method/ proc to convert these files
Hi All,
I want to convert the .ecore files to .xsd.As suggested by the team I have used precompileDecisionService to convert these files.However I m getting an error
File (C:\test\ABC.ecore) does not point to an erf file.
Not sure whether I am using Correct method
Below is the Code that i am running
package com;
import com.corticon.eclipse.server.core.ICcServer;
import com.corticon.eclipse.server.core.impl.CcServerImpl;
import com.corticon.service.ccserver.exception.CcServerFileOrDirNotFoundException;
import com.corticon.service.ccserver.exception.CcServerInvalidArgumentException;
import com.corticon.service.ccserver.exception.CcServerInvalidDecisionServiceException;
import com.corticon.service.ccserver.exception.CcServerInvalidSandboxException;
public class TestPrecompile
{
public static void main(String[] args) {
TestPrecompile TCP = new TestPrecompile();
TCP.checkPrecimplileService();
}
public void checkPrecimplileService()
{
try
{
ICcServer server = new CcServerImpl();
server.precompileDecisionService("C:\\test\\SAFE.ecore","SAFE.xsd","C:\\test\\SAFE.xsd",true);
}
catch(CcServerFileOrDirNotFoundException e)
{
e.printStackTrace();
}
catch(CcServerInvalidArgumentException e)
{
e.printStackTrace();
}
catch(CcServerInvalidDecisionServiceException e)
{
e.printStackTrace();
} catch (CcServerInvalidSandboxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Error Details
Starting Progress Corticon Server : 5.4.1.0 -b6506
Progress Corticon Server log level : DIAGNOSTIC
Progress Corticon Server log path : C:/Users/......./logs
Progress Corticon Server sandbox location : C:/Users/......./CcServerSandbox
com.corticon.service.ccserver.exception.CcServerInvalidArgumentException: CcServerImpl.precompileDecisionService()(...) File (C:\test\ABC.ecore) does not point to an erf file.
Object state for: null: null
at com.corticon.eclipse.server.core.impl.CcServerImpl.precompileDecisionService(CcServerImpl.java:11874)
at com.corticon.eclipse.server.core.impl.CcServerImpl.precompileDecisionService(CcServerImpl.java:11826)
at com.TestPrecompile.checkPrecimplileService(TestPrecompile.java:25)
at com.TestPrecompile.main(TestPrecompile.java:16)
Plz help
Flag this post as spam/abuse.
I just saw that there is also a batch file called "testDeployConsole.bat" under <Corticon5.4.1_server_install>\Server\bin directory that allows you controlling the Deployment Console through Java API calls. The option that can interest you is number "4 - Generate Vocabulary Schema".
Thanks everyone I am able to generate the ecore file to xsd
However I am facing an issue. The file that is generated after calling the method “generateVocabularyXmlSchemaContract” has a size less than the file generated by the console.
I have compared both the files(one generated by the method to the one generated by console) and it seems that xsd file generated through code has missed some statements
Not sure whether the parameters that I specified in the code are correct
Below are the details
package com;
import com.corticon.service.ccdeploy.exception.CcDeployFileOrDirNotFoundException;
import com.corticon.service.ccdeploy.exception.CcDeployInvalidArgumentException;
import com.corticon.service.ccdeploy.exception.CcDeployInvalidDecisionServiceException;
import com.corticon.eclipse.studio.deployment.swing.ICcDeploy;
import com.corticon.eclipse.studio.deployment.swing.impl.CcDeploy;
public class TestPrecompile
{
public static void main(String[] args) {
TestPrecompile TCP = new TestPrecompile();
TCP.checkPrecimplileService();
}
public void checkPrecimplileService()
{
ICcDeploy deploy = new CcDeploy();
try {
deploy.generateVocabularyXmlSchemaContract("C:\\test\\ABC.ecore","","XML_HIER_STYLE","C:\\test");
} catch (CcDeployFileOrDirNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CcDeployInvalidArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CcDeployInvalidDecisionServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
File genarated via Console
Let me know if I need to do any modification
Christopher S. Hogan
Principal Systems Engineer |
||||
PHONE 646-201-4123 MOBILE 646-243-4282 www.progress.com |
Thanks everyone I am able to generate the ecore file to xsd
However I am facing an issue. The file that is generated after calling the method “generateVocabularyXmlSchemaContract” has a size less than the file generated by the console.
I have compared both the files(one generated by the method to the one generated by console) and it seems that xsd file generated through code has missed some statements
Not sure whether the parameters that I specified in the code are correct
Below are the details
package com;
import com.corticon.service.ccdeploy.exception.CcDeployFileOrDirNotFoundException;
import com.corticon.service.ccdeploy.exception.CcDeployInvalidArgumentException;
import com.corticon.service.ccdeploy.exception.CcDeployInvalidDecisionServiceException;
import com.corticon.eclipse.studio.deployment.swing.ICcDeploy;
import com.corticon.eclipse.studio.deployment.swing.impl.CcDeploy;
public class TestPrecompile
{
public static void main(String[] args) {
TestPrecompile TCP = new TestPrecompile();
TCP.checkPrecimplileService();
}
public void checkPrecimplileService()
{
ICcDeploy deploy = new CcDeploy();
try {
deploy.generateVocabularyXmlSchemaContract("C:\\test\\ABC.ecore","","XML_HIER_STYLE","C:\\test");
} catch (CcDeployFileOrDirNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CcDeployInvalidArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CcDeployInvalidDecisionServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
File genarated via Console
Let me know if I need to do any modification
Flag this post as spam/abuse.
Christopher S. Hogan
Principal Systems Engineer |
||||
PHONE 646-201-4123 MOBILE 646-243-4282 www.progress.com |
Thanks everyone I am able to generate the ecore file to xsd
However I am facing an issue. The file that is generated after calling the method “generateVocabularyXmlSchemaContract” has a size less than the file generated by the console.
I have compared both the files(one generated by the method to the one generated by console) and it seems that xsd file generated through code has missed some statements
Not sure whether the parameters that I specified in the code are correct
Below are the details
package com;
import com.corticon.service.ccdeploy.exception.CcDeployFileOrDirNotFoundException;
import com.corticon.service.ccdeploy.exception.CcDeployInvalidArgumentException;
import com.corticon.service.ccdeploy.exception.CcDeployInvalidDecisionServiceException;
import com.corticon.eclipse.studio.deployment.swing.ICcDeploy;
import com.corticon.eclipse.studio.deployment.swing.impl.CcDeploy;
public class TestPrecompile
{
public static void main(String[] args) {
TestPrecompile TCP = new TestPrecompile();
TCP.checkPrecimplileService();
}
public void checkPrecimplileService()
{
ICcDeploy deploy = new CcDeploy();
try {
deploy.generateVocabularyXmlSchemaContract("C:\\test\\ABC.ecore","","XML_HIER_STYLE","C:\\test");
} catch (CcDeployFileOrDirNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CcDeployInvalidArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CcDeployInvalidDecisionServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
File genarated via Console
Let me know if I need to do any modification
Flag this post as spam/abuse.
Flag this post as spam/abuse.
Thanks everyone , the issue is resolved
should be
deploy.generateVocabularyXmlSchemaContract("C:\\test\\ABC.ecore","","HIER","C:\\test");#sthash.kBUfnVm9.dpuf