-
1. Re: System properties within Web Service translator
rareddy Sep 22, 2014 4:09 PM (in response to raapman53)Bernie,
you can not use system JBoss System properties in the transformation SQL as you showed above. The URL above can take absolute or relative URL, but does not resolve system properties. If you want to use system properties, in -ds.xml or resource-adapter fragment you defined for the web-service in standalone-teiid.xml file, you can define base URL with system properties. Then in above transformation use the relative path to the defined base URL.
Ramesh..
-
2. Re: System properties within Web Service translator
shawkins Sep 22, 2014 4:18 PM (in response to rareddy)There is the env function, which reads system properties, that can be enabled - see System Functions - Teiid 8.9 (draft) - Project Documentation Editor You can also use a UDF if you more control over how variables are resolved.
-
3. Re: System properties within Web Service translator
raapman53 Sep 24, 2014 1:02 PM (in response to rareddy)Ramesh,
I interpreted your reply to mean that I could add into my web service ds.xml file something like:
config-property name="EndPoint" and give it a value of http://localhost:"the jboss variable"
However, regardless of what is in the name parameter (I've tried EndPointName, Wsdl and NamespaceUri), what gets added into the conf.xml file always substitutes name=ParentDirectory and then I get errors within the log saying:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-13) MSC00001: Failed to start service jboss.ra.deployment.CAM-REST-DS_1: org.jboss.msc.service.StartException in service jboss.ra.deployment.CAM-REST-DS_1: org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [CAM-REST-DS]
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:131)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_17]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_17]
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [CAM-REST-DS]
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:115)
... 5 more
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020060: Unable to inject: org.teiid.resource.adapter.ws.WSManagedConnectionFactory property: ParentDirectory value: http://localhost:31004/
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1913)
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService$AS7RaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:183)
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:108)
... 5 moreINFO [org.jboss.as.controller] (management-handler-thread - 6) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.ra.deployment.CAM-REST-DS_1: org.jboss.msc.service.StartException in service jboss.ra.deployment.CAM-REST-DS_1: org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [CAM-REST-DS]Where did I go wrong?
Bernie
-
4. Re: System properties within Web Service translator
rareddy Sep 24, 2014 1:49 PM (in response to raapman53)Bernie,
Can you attach your standalone-teiid.xml file? If the configuration in this file under resource adapters should like like
<resource-adapter id="webservice">
<module slot="main" id="org.jboss.teiid.resource-adapter.webservice"/>
<transaction-support>NoTransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="org.teiid.resource.adapter.ws.WSManagedConnectionFactory"
jndi-name="java:/wsDS"
enabled="true"
use-java-context="true"
pool-name="teiid-ws-ds">
<config-property name="EndPoint">http://${jboss.bind.address}:${jboss.web.http.port}</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
I am thinking that should resolve corrrectly, granted both above properties are either available or supplied with -D option on startup.
Ramesh..
-
5. Re: Re: System properties within Web Service translator
raapman53 Sep 24, 2014 2:29 PM (in response to rareddy)Ramesh,
I've attached the ds.xml file that I'm using as well as the standalone xml file being used as well as the server log file.
I can say that the generated adapter doesn't look like what your email depicts.
Let me know if you need anything else.
Bernie
-
chorus-cam-rest-ds.xml 416 bytes
-
standalone-chorus.xml 38.1 KB
-
server.log.zip 34.8 KB
-
-
6. Re: Re: System properties within Web Service translator
rareddy Sep 24, 2014 2:58 PM (in response to raapman53)That is because you cut-and-pasted the file resource adapter configuration for "web-service". Take look in "<jboss-as>/docs/teiid/datasources/web-service" for template for web-service resource-adapter configuration. That one should close to what I have given.