creating a BO based on an external service call

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

creating a BO based on an external service call

Post by pkesch »

Hi,

I am struggling to integrate an external system call.

The scenario:

I have two BOs:

request and status.

Request has a relation to status where one request can have more status records.

Now I want to implement AWARE IM as a intelligent business space which is providing web-services to the outside world.

There should be one WEB service where I can add a status record which is related to a specific request.

As I read in the documentation, services are implemented by processes. So far so good.
But when I implement a service I need to hand over parameters which will be used to create the process for usage as a service.

Is there any example how to do that? When I define a process it always takes BOs in the context as an input. How to define external parameters?

Any feedback is more than welcome :-)

Best regards,
Peter
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

Post by pkesch »

Hi again,

I found the following threat:

http://www.awareim.com/forum/viewtopic. ... rt+service

In this threat it is said:

Another option is to let Aware IM do it - you can define a service in Aware IM that imports or exports the data. Aware IM will automatically create a SOAP-based web service that can be called by another application.

But the point is, that Import needs a file path specification........

Am I on the right way? Any example available???

:-)

Peter
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Aware IM will automatically expose parameters of the process that implements a service as web service parameters. This, however, only applies to simple parameters - text, numbers etc. It will not expose references to other objects.

When a new service request arrives from the outside Aware IM will automatically create an instance of an object(s) that the process implementing a service requires as a parameter. It will also populate this instance with the (simple) values that it has received from the outside call. The rest is up to you - you can, for example, use the values obtained from the outside call to search for another instance of an object inside Aware IM. For example, you may request that the outside world passes the unique id of the object and then the implementing process will use this id to search for the required instance.

In this scenario you would have two objects - a parameter object that only exposes simple attributes (one of them being id) and other more standard Aware IM objects (with references etc). The process implementing the service would then start with something lile this:

FIND AwareIMObject WHERE AwareIMObject.UniqueName = ParameterObject.UniqueName
// perform further operations with the AwareIMObject

Hope this clarifies it.
Aware IM Support Team
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

Post by pkesch »

Hi support,

thanks a lot for the clarification!!!!! Will immediately try this :-)

Best regards,
Peter
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

Post by pkesch »

ok,

I created the process and the service. Deployed the business space and logged in as administrator (in order to finalize the deployment).

Now, if I look at:

http://localhost:8080/AwareIM/services/ ... eName?wsdl

I do not see the wsdl. The page is just empty.

If I check:

http://localhost:8080/AwareIM/services/

I get the message:

AXIS error

No service is available at this URL

looking in the WSDD directory I see 2 files:

BusinessSpace_1.1_Guest_deploy.wsdd
BusinessSpace_1.1_Guest_undeploy.wsdd

Did I make something wrong?

Best regards,
Peter


P.S.

I run AwareIM under MAC OS X 10.5.4
My AwareIM Version is: 3.0 (Build 1042)
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

What is displayed in the Tomcat output window?
Aware IM Support Team
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

Post by pkesch »

Hi support,

here now the update:

The wsdl is shown correct in Firefox :-)

If I use Safari I just see the blank page.

Best regards,
Peter

P.S.
pkesch
Posts: 72
Joined: Thu Jan 11, 2007 11:55 am

Post by pkesch »

And, just for your information the tomcat logfile. It is full of these entries:


2008-07-18 12:01:15 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
javax.servlet.jsp.JspException: com.cc.framework.ui.control.SimpleListControl
at com.cc.framework.taglib.controls.BaseControlTag.endPaint(Unknown Source)
at com.cc.framework.taglib.controls.BaseControlTag.doEndTag(Unknown Source)
at org.apache.jsp.activeProcesses_jsp._jspService(activeProcesses_jsp.java:441)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
at com.cc.framework.adapter.struts.FWRequestProcessor.processForwardConfig(Unknown Source)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
at com.cc.framework.adapter.struts.FWRequestProcessor.processForwardConfig(Unknown Source)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:613)

----------------------------------------------------------------------------

Regards,
Peter
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

These exceptions are benign - please ignore them. If WSDL is shown in Firefox, then everything is working properly and it's just a Safari problem, which probably just cannot display WSDL files.
Aware IM Support Team
Post Reply