Friday, March 28, 2014

.jsf is referenced in a context where page fragment reference is expected

I was trying to build an adf page and got this error.



I tried to ignore the error and deployed the adf page to the integrated weblogic server but i got following error

ADF_FACES-30200:For more information, please see the server's error log for an entry beginning with: The UIViewRoot is null. Fatal exception during PhaseId: RESTORE_VIEW 1.

So i checked the code again to find out the root cause of this issue.

The error was in my task-flow-definitions.xml file.



My program was linking two page one of them was a .jsf and other one was a .jsff format.

I went to the code in folder location changed the .jsff to .jsf and change the same pointer in task-flow-definitions.xml



i redeployed the process and it worked fine this time.

Also ensure page fragment is not selected.

Thursday, March 27, 2014

oracle/wss_username_token_service_policy

Using the similar steps as mentioned in previous post

Remove all the policies from your soa process and attache the mentioned policy



Once you say ok validate whether the policy is attached or not.



Try to test the service and you will get following error


java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : InvalidSecurity : error in processing the WS-Security security header at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:813) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:385) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:302) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(AstValue.java:187) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297) at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1415) at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:103) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:957) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:427) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:101) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) Caused by: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : InvalidSecurity : error in processing the WS-Security security header at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:362) at oracle.sysman.emSDK.webservices.wsdlparser.OperationInfoImpl.invokeWithDispatch(OperationInfoImpl.java:1004) at oracle.sysman.emas.model.wsmgt.PortName.invokeOperation(PortName.java:750) at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:807) ... 79 more Caused by: oracle.j2ee.ws.client.jaxws.JRFSOAPFaultException: Client received SOAP Fault from server : InvalidSecurity : error in processing the WS-Security security header at oracle.j2ee.ws.client.jaxws.DispatchImpl.throwJAXWSSoapFaultException(DispatchImpl.java:1053) at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:839) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:235) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchImpl.java:106) at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:358) ... 82 more


The reason is again the same we have not passed the security details to test the service.

Once again go to your service input

Select the owsm policy and test the service.



oracle/wss_http_token_service_policy

Once can search out for oracle documents on the definition of this policy. In this exercise and subsequent we will try to use each of the policies in a business process and then will by pass them.

Use any default process for the same. The assumption is that your server already has owsm and server is up and running.

Go to your em console http://host:port/em

Go to Soa_infra-->partition and click on your bpel process.

Go to the policies tab



Click on attach policies and choose the client as you the security policy to be implemented at the client level as soon as an external application tries to call it.



Now select the above mentioned policy from the list and say attach

Once the policy comes in the list of attached policy as shown just say ok



After you have attached the policy your process should show the same policy in the policies tab



Now go to test button and try to test the service you will get an error like this


java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 403 Forbidden from url http://tokenize:8001/soa-infra/services/default/Replace/dvmreplace_client_ep at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:813) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:385) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:302) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(AstValue.java:187) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297) at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1415) at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:103) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:957) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:427) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:101) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) Caused by: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 403 Forbidden from url http://tokenize:8001/soa-infra/services/default/Replace/dvmreplace_client_ep at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:362) at oracle.sysman.emSDK.webservices.wsdlparser.OperationInfoImpl.invokeWithDispatch(OperationInfoImpl.java:1004) at oracle.sysman.emas.model.wsmgt.PortName.invokeOperation(PortName.java:750) at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:807) ... 79 more Caused by: javax.xml.ws.WebServiceException: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 403 Forbidden from url http://tokenize:8001/soa-infra/services/default/Replace/dvmreplace_client_ep at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:880) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:235) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchImpl.java:106) at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:358) ... 82 more Caused by: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 403 Forbidden from url http://tokenize:8001/soa-infra/services/default/Replace/dvmreplace_client_ep at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.call2(HttpSOAPConnection.java:231) at oracle.j2ee.ws.common.transport.HttpTransport.transmit(HttpTransport.java:75) at oracle.j2ee.ws.common.async.MessageSender.call(MessageSender.java:67) at oracle.j2ee.ws.common.async.Transmitter.transmitSync(Transmitter.java:134) at oracle.j2ee.ws.common.async.Transmitter.transmit(Transmitter.java:90) at oracle.j2ee.ws.common.async.RequestorImpl.transmit(RequestorImpl.java:273) at oracle.j2ee.ws.common.async.RequestorImpl.invoke(RequestorImpl.java:94) at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:824) ... 85 more Caused by: javax.xml.soap.SOAPException: Bad response: 403 Forbidden from url http://tokenize:8001/soa-infra/services/default/Replace/dvmreplace_client_ep at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.processHttpResponseCode(HttpSOAPConnection.java:636) at

This is because now your process is authenticate with a policy and you are not providing any details to by pass this security.

Now go back to your request and add an http authentication parameter,specify the username and password to authenticate (User/pwd to login to server)



This will not allow you to by pass the security layer and test the process successfully.

the user id and password we have passed here is a super user, If you want to create a new user you can create the same in security realm and test with the new user.

Create an LOV in ADF

There are multiple documents in the internet which tells about how to create an LOV in ADF

I will just highlight the points which i felt important during my development.

First create and entity objects and make sure you are using row id as the primary key
Attach a view object and apps module to it and then run and test it works fine.

Next create a view object for read only.
Next in the view object of entity objects create an lov for the attribute which you wanted to show as drop down




Attach the view object newly created to it



go to ui hints tab



Create a jsf page
Drop lov as select item




Drop values as output



Create partial trigger







Asynchronous web service in Jdeveloper 12c

When an asynchronous BPEL process is invoked, one can specify the callback information using WS-Addressing headers. When BPEL has to make a callback to deliver the asynchronous response, it will inspect those headers and use the specified value to send the response. When a BPEL process invokes another asynchronous process, it automatically sets the headers.

Jdeveloper 12c provides a mock web service which can be used to read the response.

It is important to understand how exactly the mock service works to get the response from the asynchronous web service. It does so by creating a mock service based on a WSDL
The WSDL can be located at http://host:port/asyncCallback?wsdl
Here host is the name of your machine and port is dynamically generate by Jdeveloper, It default value is 7199



The definition says

This is a dummy wsdl which has no structural relevance with the provider service to which this is associated with. The main purpose of this wsdl is to have the provider service node appear in the WSIL tree and in the app server navigator not to throw exceptions when clicked it.”

Using this mock WSDL Jdeveloper creates a mock service
http://host:port/asyncCallback
This mock service does not exist really.



To monitor the async service from jdev you can do the following

Go to Tools and select HTTP Analyzer
Following screen will come up



Select “Create New SOAP Request “as shown above
In the new page that will come up, click on open WSDL




Specify the WSDL



Select the include button for Reply to as shown above.
In the drop down box you can find two address coming automatically.
The first service is the mock service provided by Jdeveloper to capture the response from the web service.
http://localhost:7199/asyncCallback
This is a non-existing mock service which Jdeveloper internally creates to fetch the response data from the asynchronous service.




Select the callback URL from the drop down.

Test the service with some dummy data




Go to your HTTP analyzer

and get the post method from the list



Select the POST method to the Async Callback service and double click on it.

scroll down to review the result.




Validate the result by checking the audit details in soa process.


Call an OBIEE report from SOA

OBIEE exposes many api and WSDL file which can be used to call the reports developed in OBIEE.
The complete list of API that OBIEE provides can be found in the following page
http://host:port/analytics/saw.dll?WSDL
OBIEE also exposes some WSDL files that can be used to call a report deployed in OBIEE.
The complete list of WSDL file can be found in the following location:
http://host:port/analytics/saw.dll/wsdl/v6
It can be used to do many operations such as
run a reports,schedule a report and create a report


In order to perform all these tasks OBIEE provides following public web services
ScheduleService and ReportService


To call a report service We will use the
rvice which has the following URL
http://host:port/xmlpserver/services/v2/ReportService?wsdl
Once you will open this WSDL you can find the information that will be required to call a report



Now once you call the report service you need to take care of following things

Assign following parameters to call the web service.
attributeFormat :The format in which you want the output.
reportAbsolutePath :The absolute path where the report is located in BI publisher
reportOutputPath : The path where you want the output file to be generated.
userid : User id to log in to the OBIEE analytics
password : Password to login to the OBIEE analytics

There is an important point that needs to be taken care of otherwise you will land up with below error message
oracle.xdo.webservice.exception.OperationFailedException: PublicReportService: : generateReport for reportAbsolutePath [~weblogic/_temp/Balance Letter.xdo] failed: due to java.lang.SecurityException: Security violation: ~weblogic/_temp/Balance Letter.xdo, user: weblogic, permission: 0
This error occurs if you are not accessing the report using the owner of the report. In order to know the owner of the report
In order to know who is the owner of the report.
Select Report More Permission
There you can find out the owner of the report.




The report absolute path must always be preceded with the owner of the report with a tilde as shown below
~BISystemUser

you can get more details on the same from the following post

Wednesday, March 26, 2014

Create an OBIEE report based on Web Service

For better understanding we will create an Employee web service with few input parameters. This web service will take EmployeeName and EmployeeId as input parameter and display a custom message based on the input values.
Open you Jdeveloper and create a new SOA project and create a synchronous BPEL process







Once you complete the wizard you will get following composite file.



Go to the default schema file and change it to take two input parameter : name and Id as shown below



Open BPEL process and add an assign activity to it.



Add the following logic in the assign to append the input parameter with custom message and map it to output parameter.



Deploy and test your web service

Input



Output




Create Report in OBIEE
Now once we have developed a SOA service we will take this web service as an example to create a report based on this web service.
Log in to OBIEE analytics page and create a data model



Once you create a data model just go to the page and define two parameter Name and Id same as the one in your Web service.



Specify some default value for your output data
Go to Data set and create a data set
Select Web Service as model





Specify the information
WSDL URL will be the wsdl url for the SOA web service and method will be the input operation of the web service.
Add the two parameters as shown below




Save all the changes and create a sample data
Here you can notice that it has automatically created the output data from the result of our web service. So internally it takes the input parameters and calls the web service for the output as each time a report is called with a new set of input parameter an instance is created in the back end em console of SOA suite.



Save this sample data and create a report based on this sample data.
Click on create report




Use the data model we have created
Select your data model




Select the default option




Select the default output variable which the data model has created for you based on the response parameter of the web service.





Save the report as some dummy name.



Save the Report and as soon as you will see the report you will find following output



As you can observer the report has two input parameter which we have the same as our web service
Since we have specified the default value hence it has populated the result with the default input parameter. One can change the input parameter and test it again. The important point is that each time an apply button is clicked a new SOA instance is getting created in the backend SOA to fetch the output result.


Go to the SOA em console
http://host:port/em
and check the instance details for the web service.
Each time when you will say apply a new instance will be created.





The same result can be seen in the Report as an output variable