Friday, September 10, 2010

CAVS Configuration

I have been using CAVS for quite a while but didn't see lot of documentation on how to configure it so just thought blogging about it. I have also been using iTKO Lisa for a long time which is much richer in functionality than CAVS, and maybe I will write an article about it someday.

Brief Summary

CAVS (Composite Application Validation System) is mainly used for simulating your integration points for composite testing. It can basically mimic the end system and validate your request and send valid response upon successful validation.

Technical details

  • It is a servlet. URL (http://host:port/AIAValidationSystemServlet/syncresponsesimulator). You can configure multiple simulator instances and it get recognized by simid parameter.
  • It is part of AIAApplication ($CONTAINER_HOME/applications/AIAApplication/ValidationSystemServlet.war)
  • Execution logs can be found at ($CONTAINER_HOME/application-deployments/AIAApplication/oc4j_soa_default_group_1/application.log)


How to use:

Scenario:
Let's say we have simple Echo service, which returns upper case data back. We want to validate the request that, it has input and return the static response back.




Configuration steps:

  • Login to AIA console (http://host:port/AIA)
  • Click on Validation System (GO)
  • Click on Create Simulator

  • Enter the request and response as below (Make sure to include namespace for both request and response and don't remove CAVS namespace)
  • Click Next


  • Click on Request and Generate XPath (this will generate xpath for all possible combinations)

  • Make changes to validation as necessary. E.g. I made one nodekey (which is required) and just changed "equal to" to "is valid" operation for input.

  • Click on Save and record simulator id number
  • Now it is ready to tested with SOAP UI and end point would be http://host:port/AIAValidationSystemServlet/syncresponsesimulator?simid=<<>> or http://host:port/AIAValidationSystemServlet/syncresponsesimulator (generic). If you use generic one, it will compare against all simulator to get exact match


AIA Configuration

  • Out of the box always have support for real or CAVS endpoint for any partnerlink. If you are implementing custom code make sure you use dynamic parterlink for AIA so that it has CAVS support (more information at: http://chintanblog.blogspot.com/2010/03/aia-bpel-dynamic-partnerlink-lookup.html)
  • In AIAHome/config/AIAConfigurationProperties.xml file, make following changes:

8 comments:

Chintan Shah said...

You get following error if you try to handcode the xpath and and xpath has error. It gives 500 on browser and following in the log file:

10/09/02 14:26:34.92 ValidationSystemServlet: Servlet error
oracle.jbo.AttrValException: JBO-27014: Attribute Type in Instance is required
at oracle.jbo.server.JboMandatoryAttributesValidator.validate(JboMandatoryAttributesValidator.java:85)
at oracle.jbo.server.EntityDefImpl.validate(EntityDefImpl.java:2182)
at oracle.jbo.server.EntityImpl.validateEntity(EntityImpl.java:1361)
at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:1549)
at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4017)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1925)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2177)
at oracle.apps.aia.cavs.model.soaptransport.http.service.HttpSoapService.process(Unknown Source)
at oracle.apps.aia.cavs.model.soaptransport.http.service.HttpSoapService.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run_aroundBody0(AJPRequestHandler.java:199)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run_aroundBody1$advice(AJPRequestHandler.java:150)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:1)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run_aroundBody0(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run_aroundBody1$advice(ServerSocketReadHandler.java:150)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:1)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run_aroundBody0(ServerSocketAcceptHandler.java:879)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run_aroundBody1$advice(ServerSocketAcceptHandler.java:150)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:1)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run_aroundBody0(ReleasableResourcePooledExecutor.java:303)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run_aroundBody1$advice(ReleasableResourcePooledExecutor.java:150)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:1)
at java.lang.Thread.run(Thread.java:595)

Unknown said...

Hi Chintan,
I tried that Endpoint URI with Oracle Service Bus's Business Service but it gives an error :





Response Document
The invocation resulted in an error: Internal Server Error.
Response Metadata




close
2923
text/html; charset=UTF-8
Sun, 17 Oct 2010 21:12:07 GMT

1
Internal Server Error
UTF-8
500

Unknown said...

I invoked that endpoint uri for simulator with Business Service in OSB


and got this following error
Response Document
The invocation resulted in an error: Internal Server Error.
Response Metadata




close
2923
text/html; charset=UTF-8
Sun, 17 Oct 2010 21:12:07 GMT

1
Internal Server Error
UTF-8
500

Chintan Shah said...

Did you try from SOAPUI? Any logs from the server?

Kamal said...

Hello Chintan,
How can we test a servlet like http://host:port/AIAValidationSystemServlet/syncresponsesimulator?simid=<<>> or http://host:port/AIAValidationSystemServlet/syncresponsesimulator (generic) using SOAPUI tool ? I tried to load it but it gives me error.

Narayana said...

Chintan, Can you be more detail on your earlier comment and steps to reproduce:

You get following error if you try to handcode the xpath and and xpath has error. It gives 500 on browser and following in the log file:

Gopal SOA said...

Hi, When you say about a simulator should be capapble of testing any SOA Service. but why is tightly coupled to AIA. Onlyu for requestor adn provider side ABCS you are able to configure the CAVS. Other ABCS cannt we use CAVS. Is this a limitation. if not pelase let me knwo how we can configure the Simulator for non AIA Services.

Gopal SOA said...

Hi, When you say about a simulator should be capapble of testing any SOA Service. but why is tightly coupled to AIA. Onlyu for requestor adn provider side ABCS you are able to configure the CAVS. Other ABCS cannt we use CAVS. Is this a limitation. if not pelase let me knwo how we can configure the Simulator for non AIA Services.