Getting handler chain
I'm trying to get the handler chain with jaxb2.1.
ABCService abcService = new ABCService();
Iterator<QName> iter = abcService.getPorts();
while(iter.hasNext()) { // it has only one port
QName portQName = iter.next();
QName serviceName = abcService.getServiceName();
String bindingId = "{http://abc.cas.de}ABCServiceHttpBinding"; // WSDL line: <wsdl:port binding="tns:ABCServiceHttpBinding" name="ABCServiceHttpPort">
PortInfo pi = new PortInfoImpl(bindingId, portQName, serviceName);
HandlerResolver handlerResolver = abcService.getHandlerResolver();
List<Handler> handlerList = handlerResolver.getHandlerChain(pi);The list is always empty, but a handler is registered with the custom.xml file at the wsimport task. The handler is also called.
I assume my portname, servicename or bindingId is wrong. Only the bindingID is hard coded by me, the rest is retrieved by my proxy.
Any idea what's wrong?
How can i retrieve the bindingId?
Cheers,
Ingo
Hi David,
If you are using WLS 8.1, you can use
weblogic.webservice.context.WebServiceContext
to pass parameters between handler and end
component.
A context example here:
http://manojc.com/?sample30
WLS 7.0 does not support this. A workaround will
be to use ThreadLocal. Details here:
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/ThreadLocal.html
HTHs,
-manoj
http://manojc.com
"David Selvaraj" <[email protected]> wrote in message
news:[email protected]..
Hi,
I want to write a handler chain in which I want to send some parameters inthe Soap request and pass it to the actual class where the web service
method exists.
How can I pass the variable from a handler chain to the actual method.
Please let me know.
Thanks,
David
Similar Messages
-
Firefox doesn't handle chained deadkeys on Windows
It seems that Firefox doesn't handle chained deadkeys as produced by for example this layout http://blogs.msdn.com/b/michkap/archive/2011/04/16/10154700.aspx . Correct characters are not produced as in contrast with them being produced in Windows explorer.
I think it will be hard to get clear answers about custom keyboard layouts here...
I did see a bug that sounds related: [https://bugzilla.mozilla.org/show_bug.cgi?id=791300 791300 – Dead-key diacritics non-functional in text forms and address bar] -- the last comment mentions a code comment that chaining is not supported.
About the bug tracking system:
* [https://bugzilla.mozilla.org/page.cgi?id=etiquette.html Bugzilla Etiquette]
* [https://bugzilla.mozilla.org/page.cgi?id=voting.html Voting] -
Web-services.xml handler chain
Hi All,
My question is this. I use servicegen ant task to generate the web-services.xml
file,
then I open the .ear file using winzip and edit the web-services.xml file to include
the handler-chain information. I have included the following information :
<handler-chains>
<handler-chain name="myChain">
<handler class-name="com.whatever.core.sec.iec.ejb.IECSOAPHandler">
<init-params>
<init-param name="logDirectory" value="C:/temp" />
<init-param name="severityLevel" value="verbose" />
</init-params>
</handler>
</handler-chain>
</handler-chains>
and then I include the following in the operation tag:
<operation method="batchResponseToPSS([B)" component="ejbcomp0" name="batchResponseToPSS"
handler-chain="myChain">
and the also following
<operation method="onlineResponseToPSS([B)" component="ejbcomp0" name="onlineResponseToPSS"
handler-chain="myChain">
Without the handler-chains element my app works fine.
My whole web-sercvices.xml is located at following location:
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=3921&utag=
Any insight will be appreciated.
Thanks
---Radhe
I am still not clear what error you are getting.
1. Are you saying that the handler is not getting
called?
2. or you are not able to invoke the web service
at all?
If it is 1 check the web-service.xml file of the ear
deployed. Make sure that your change is not overwritten
by servicegen.
If it is 2 then check the URL of the web service in
web-service.xml file and use a browser to get to
that URL.
Regards,
-manoj
http://manojc.com
"Radhe" <[email protected]> wrote in message
news:[email protected]...
>
Manoj,
Thanks for your reply. When I bring up the WLS, from the messages on theconsole,
it comes-up pretty cleanly. Theare are no error messages.
I looked into log files and their is nothing. This has surprised me.
I worked with some of my friends and they are clueless. I never thoughtto just
read SOAP Headers, that I have to go through so much pain.
Also part of my web-services.xml file is generated through servicegen,then I
crack open the .ear file strip the web-services.xml file, edit it and putit back.
>
IF there is some error I would have fixed it.
Does handler-chains in web-services.xml work, or it is some fiction, BEAmade
up. I am clueless where I am screwing it up.
Thanks
---Radhe
"manoj cheenath" <[email protected]> wrote:
Can you please post the error message?
This example may also help you:
http://www.manojc.com/?sample4
Regards,
-manoj
http://manojc.com
"Radhe" <[email protected]> wrote in message
news:[email protected]...
Hi All,
My question is this. I use servicegen ant task to generate theweb-services.xml
file,
then I open the .ear file using winzip and edit the web-services.xmlfile
to include
the handler-chain information. I have included the following
information
<handler-chains>
<handler-chain name="myChain">
<handler
class-name="com.whatever.core.sec.iec.ejb.IECSOAPHandler">
<init-params>
<init-param name="logDirectory" value="C:/temp" />
<init-param name="severityLevel" value="verbose" />
</init-params>
</handler>
</handler-chain>
</handler-chains>
and then I include the following in the operation tag:
<operation method="batchResponseToPSS([B)" component="ejbcomp0"
name="batchResponseToPSS"> >> handler-chain="myChain">> >>> >> and the also following> >>> >> <operation method="onlineResponseToPSS([B)" component="ejbcomp0"> >name="onlineResponseToPSS"> >> handler-chain="myChain">> >>> >> Without the handler-chains element my app works fine.> >>> >> My whole web-sercvices.xml is located at following location:> >>> >>>>http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=3921&utag=> >>> >>> >> Any insight will be appreciated.> >>> >> Thanks> >> ---Radhe> >> >> -
Need sample code to get handle of Selected rows from ADF Table
Hi,
I am new to ADF. I have an ADF table based on VO object.On some button action,I need to get handle of selected rows in application module.
If anybody is having sample code to do this then please share with me.
Thanks,
ashokwow now link http://blogs.oracle.com/smuenchadf/examples/#134 is working.thanks a lot.
also the link http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html is very useful. Thanks a lot for Sameh Nassar too.He made it clear that in 11g Select column is not available for a ADF table and provided a solution to get Select column.
Thanks,
ashok -
Problem using Handler chain with JAXWS
Hi, I want to use handler chain on a web service and I'm not sure if I understood correctly how it works. In every example I found on the web the handler chain is applied on the client side (the binding is made on the generated client side). So, when I send a request the handler catch an outbound message and when the web service respond, it receive an inbound message. The problem is that I would like to link the handler on the server side, i.e. when the web service receive a request, the handler receives an inbound message and when the WS respond it receives an outbound message.
Is it possible to do so?? I mean, it makes no sense to link the handler on the client side, since I don't have control on the client side, I produce web services and I want to apply some handlers at this level.
Any idea??? Or is there something that I didn't understand about handler chains??
Thanks,
KorgHello again, I finally found how to do what I wanted to do. The problem came from different examples I found on the web. In my handler.xml file, the structure must be something like:
<jws:handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
<jws:handler-chain>
<jws:handler>
<jws:handler-class>........</jws:handler-class>
</jws:handler>
</jws:handler-chain>
</jws:handler-chains>
In many examples, there is an element at the root that is "handler-config" and it doesn't work if I use it this way. Here's an example of a handler.xml file that doesn't work:
<handler-config>
<handler-chains>
<handler-chain>
<handler>
<handler-class>............</handler-class>
</handler>
</handler-chain>
</handler-chains>
</handler-config>
Korg -
Web-services.xml for EJB component and SOAP Message Handler Chain
I have used the following example for my own web service with EJB component and SOAP
Message Handler Chain:
http://e-docs.bea.com/wls/docs70/webServices/dd.html#1058208
I have a deployment error:
javax.naming.NameNotFoundException: Unable to resolve 'app/ejb/DocumentService.j
ar#DocumentService/home' Resolved: 'app/ejb' Unresolved:'DocumentService.jar#Doc
umentService' ; remaining name 'DocumentService.jar#DocumentService/home'
In attachement is the ear file.
Is there a problem in web-services.xml?
Thanks
[ws_dox_sdi.ear]It works. Thanks,
Ioana
"Neal Yin" <[email protected]> wrote:
The error means your EJB is not deployed.
Adding a EJB module to your application.xml file of the ear should fixe
it.
<application>
<display-name />
<module>
<web>
<web-uri>dox_sdi.war</web-uri>
</web>
</module>
<module>
<ejb>DocumentService.jar</ejb>
</module>
</application>
"Ioana Meissner" <[email protected]> wrote in message
news:3cf640cc$[email protected]..
I have used the following example for my own web service with EJBcomponent and SOAP
Message Handler Chain:
http://e-docs.bea.com/wls/docs70/webServices/dd.html#1058208
I have a deployment error:
javax.naming.NameNotFoundException: Unable to resolve'app/ejb/DocumentService.j
ar#DocumentService/home' Resolved: 'app/ejb'Unresolved:'DocumentService.jar#Doc
umentService' ; remaining name 'DocumentService.jar#DocumentService/home'
In attachement is the ear file.
Is there a problem in web-services.xml?
Thanks -
Handler chain file - validation files
Hi Everyone,
I have webservice where I would like to log all SOAP messages. Back in the WebLogic 8.1 days the developer merely specified an annotation to a soap handler like this:
* @editor-info:link autogen-style="java" autogen="false"
* @jws:handler operation="foo.utils.soaphandlers.BARHandler"
During the WebLogic 10.3 upgrade/import process this annotation disappeared. I am thus trying to restore this link to BARHandler. So... following this documentation:
http://download.oracle.com/docs/cd/E15523_01/web.1111/e13734/handlers.htm#i261458
I add an annotation:
@HandlerChain(file="bar_handler.xml")
and created XML...
<?xml version="1.0" encoding="UTF-8"?>
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
<handler-chain>
<handler>
<handler-class>foo.utils.soaphandlers.BARHandler</handler-class>
</handler>
</handler-chain>
</handler-chains>
BARHandler is a modern SOAP handler I know works in another context...
package foo.utils.soaphandlers;
...snip...
public class BARHandler implements SOAPHandler<SOAPMessageContext>
...snip...
Everything seems to go fairly well, until my <jwsc> task in build.xml blows up with this error (re-spaced for reading):
build.xml:123: weblogic.wsee.tools.WsBuildException: JWS Validation failed:
[Handler chain file validation error for file:
file:/path/src/foo/webservice/bar_handler.xml.
Element handler-chains@http://java.sun.com/xml/ns/javaee is not a valid
handler-config@http://www.bea.com/xml/ns/jws document or
a valid substitution.,
Handler chain file validation error for file:
file:/path/src/foo/webservice/bar_handler.xml.
Element handler-chains@http://java.sun.com/xml/ns/javaee is not a valid
handler-config@http://www.bea.com/xml/ns/jws document or
a valid substitution.]
I worked all day searching for an answer, but no luck so far. I also feel like the gremlins are mocking me! Not only does the validation error repeat twice but the first sentence of JSR 181 specification says all of this is "a simplified programming model". Alas, for me, it hasn't be so "simple" :(
Thanks a bunch for reading and if you reply I will be very grateful!
Cheers,
-RandyHello Randy -
Please check the following thread.
Validation Error in the JWS
Regards,
Justin. -
How to get handle of a button that i created through Customisation?
How to get handle of a button that i created through Customisation?
I tried this in processformrequest ..failed :(
String str2 = paramOAPageContext.getParameter("AutoDialler");
if (str2 != null) {
System.out.println("Inside AutoDialler Hurray");
}this works well
but can you give documentation support of whatever you are saying?
public void processRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
OASubmitButtonBean oasb= (OASubmitButtonBean)paramOAPageContext.getWebBeanFactory().createWebBean(paramOAPageContext,"BUTTON_SUBMIT");
oasb.setID("xxSubmitAutoDialler");
oasb.setUINodeName("xxSubmitAutoDialler");
oasb.setEvent("xxSubmitAutoDialler");
oasb.setText("xxSubmitAutoDialler");
paramOAWebBean.addIndexedChild(oasb);
public void processFormRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
if ( strEvent.equals("xxSubmitAutoDialler"))
//IMPORTANT Get this by calling the Function that loops for records.
System.out.println("Inside processFormRequest Hurray");
} -
Problem in getting handle to EJB Object
Hi All,
I am getting following exception when i try to get handle on my ejb object.
My Client Program:
import synch.*;
import javax.naming.*;
import java.rmi.*;
import javax.rmi.*;
import javax.ejb.*;
import java.io.*;
public class SearlizeClient
public static void main(String[] args) throws Exception
Context ic = new InitialContext();
Object o = ic.lookup("NameBean"); // replace with YOUR JNDI name for the bean
NameHome nameHome = (NameHome) PortableRemoteObject.narrow(o, NameHome.class);
synch.Name obj1 = nameHome.create();
obj1.setName("Balaji");
Handle myHandle= obj1.getHandle();// Getting exception at this place
FileOutputStream out = new FileOutputStream("MyHandle.txt");
ObjectOutputStream s = new ObjectOutputStream(out);
s.writeObject(obj1);
s.flush();
out.close();
I got following excetion when i try to get handle on EJBObject
Dec 6, 2005 11:20:19 AM com.sun.corba.se.impl.encoding.CDRInputStream_1_0 read_value
WARNING: "IOP00810257: (MARSHAL) Could not find class"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.se.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemExcep
tion.java:7756)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
1_0.java:873)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
1_0.java:863)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java
:269)
at synch._Name_Stub.getHandle(Unknown Source)
at SearlizeClient.main(SearlizeClient.java:20)
Caused by: java.lang.ClassNotFoundException
... 7 more
Exception in thread "main" java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested excepti
on is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
at synch._Name_Stub.getHandle(Unknown Source)
at SearlizeClient.main(SearlizeClient.java:20)
Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.se.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemExcep
tion.java:7756)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
1_0.java:873)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
1_0.java:863)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java
:269)
at synch._Name_Stub.getHandle(Unknown Source)
... 1 more
Caused by: java.lang.ClassNotFoundException
... 7 more
Enviroment: This bean is hosted on Sun J2ee Appserver 8.0 and normal client prg is working fine .. But it is failing in getting handle
Please suggest,
Thanks in advanceThe only way is to create your own equivalent of HttpSessionContext.
Its simple enough, just create a class that implements HttpSessionListener (responds to session creation, and destruction)
You can get the sessions as they are created, and keep a global reference to them, and manipulate it as much as you like. In your case you would probably want to index the sessions by userId rather than sessionId for easy access.
Good luck,
evnafets -
IExpense - Could not get handle to the Attachments VO
Friends, I am stuck, so thought to get your help.
On iExpense Final Review Page "FinalReviewPG" Submitt button, We have a requirement to throw the exception to user if he/she does not attach the Receipts Attachments with some specific Attachment Categories. In order to acheive this I need to get Handle to the Attachments VO but I could not as It throws the Java Exception error upon getting handle to the Attachments VO even though i added few atatchments and they showup on screen. Below is the portion of the problematic code and after that the full code. Thanks for your help.
//below is the problmeatic code
OAApplicationModule RootAM = oapagecontext.getRootApplicationModule();
//OAApplicationModule AttachAM = (OAApplicationModule)RootAM.findApplicationModule("OAAttachmentsAM");//doesnt work
//OAApplicationModule AttachAM = (OAApplicationModule)RootAM.findApplicationModule("oracle_apps_fnd_server_OAAttachmentsAM");//get the AM handle but null VOs
OAAttachmentsAMImpl AttachAM = (OAAttachmentsAMImpl)RootAM.findApplicationModule("oracle_apps_fnd_server_OAAttachmentsAM");//throws me java null pointer exception
FndAttachedDocumentsDomExtensionVORowImpl AttachRow =
(FndAttachedDocumentsDomExtensionVORowImpl)AttachAM.getFndAttachedDocumentsDomExtensionVO().getCurrentRow();
String strCategory = AttachRow.getAttachmentCategoryName();
oapagecontext.writeDiagnostics("tc.oracle.apps.ap.oie.webui.TCFinalReviewPageCO",
"IM90978: 14-Feb-2013 14:32 strCategory = "+ strCategory, 2);
//below is my full code
package tc.oracle.apps.ap.oie.entry.summary.webui;
import oracle.apps.ap.oie.entry.summary.webui.FinalReviewPageCO;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageAttachmentLinkBean;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.ap.oie.server.WebExpensesAMImpl;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageAttachmentLinkBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageInlineAttachmentBean;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.ap.oie.server.ExpenseReportHeadersVORowImpl;
import oracle.apps.ap.oie.server.WebExpensesAMImpl;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.webui.beans.layout.OAAttachmentTableBean;
import oracle.apps.fnd.server.FndAttachedDocumentsDomExtensionVORowImpl;
import oracle.apps.fnd.server.FndAttachedDocumentsVORowImpl;
import oracle.apps.fnd.server.*;
import oracle.apps.fnd.server.OAAttachmentsService;
import oracle.apps.fnd.server.OAAttachmentsAMImpl;
import oracle.apps.fnd.framework.*;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.OARow;
public class TCFinalReviewPageCO extends FinalReviewPageCO
public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
super.processRequest(oapagecontext, oawebbean);
public void processFormData(OAPageContext oapagecontext, OAWebBean oawebbean)
super.processFormData(oapagecontext, oawebbean);
public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
String s = oapagecontext.getParameter("OIESubmit");
if (s != null)
OAMessageStyledTextBean oamessagestyledtextbean = (OAMessageStyledTextBean)oawebbean.findChildRecursive("ReceiptRequired");
String strReceiptRequired = oamessagestyledtextbean.getText(oapagecontext);
WebExpensesAMImpl am =
(WebExpensesAMImpl)oapagecontext.getRootApplicationModule();
ExpenseReportHeadersVORowImpl row =
(ExpenseReportHeadersVORowImpl)am.getExpenseReportHeadersVO().getCurrentRow();
String isPaperLessClaim = row.getAttribute5();
OAApplicationModule RootAM = oapagecontext.getRootApplicationModule();
//OAApplicationModule AttachAM = (OAApplicationModule)RootAM.findApplicationModule("OAAttachmentsAM");//doesnt work
//OAApplicationModule AttachAM = (OAApplicationModule)RootAM.findApplicationModule("oracle_apps_fnd_server_OAAttachmentsAM");//get the AM handle but null VOs
OAAttachmentsAMImpl AttachAM = (OAAttachmentsAMImpl)RootAM.findApplicationModule("oracle_apps_fnd_server_OAAttachmentsAM"); // I get error right here :(
FndAttachedDocumentsDomExtensionVORowImpl AttachRow =
(FndAttachedDocumentsDomExtensionVORowImpl)AttachAM.getFndAttachedDocumentsDomExtensionVO().getCurrentRow();
String strCategory = AttachRow.getAttachmentCategoryName();
oapagecontext.writeDiagnostics("tc.oracle.apps.ap.oie.webui.TCFinalReviewPageCO",
"IM90978: 14-Feb-2013 14:32 strCategory = "+ strCategory, 2);
if ("Required".equals(strReceiptRequired) && "Y".equals(isPaperLessClaim))
// Receipt is required, check for required attachment
oapagecontext.writeDiagnostics("tc.oracle.apps.ap.oie.webui.TCFinalReviewPageCO",
"IM90978: 14-Feb-2013 14:32 both conditions met = ", 2);
OAMessageAttachmentLinkBean oamessageattachmentlinkbean = (OAMessageAttachmentLinkBean)oawebbean.findChildRecursive("ReviewGenInfoHeaderAttachments");
String strAttachment = (String)oamessageattachmentlinkbean.getAttributeValue(oapagecontext.getRenderingContext(), TEXT_ATTR);
if("None".equals(strAttachment.trim()))
oapagecontext.writeDiagnostics("tc.oracle.apps.ap.oie.webui.TCFinalReviewPageCO",
"IM90978: 14-Feb-2013 14:32 before exception = ", 2);
throw new OAException("XXTFA", "XXTFA_ATTACH_RECEIPT");
else
super.processFormRequest(oapagecontext, oawebbean);
else
super.processFormRequest(oapagecontext, oawebbean);
else
super.processFormRequest(oapagecontext, oawebbean);
}Hi,
Check and see the below code works or not, see which option suits for you,
1) Check any attachment is there or not
======================================
public boolean checkAttachment(OAPageContext oapagecontext,OAWebBean oawebbean)
OAApplicationModule am = oapagecontext.getApplicationModule(oawebbean);
String amName = "";
String objectivesAMName = "OAAttachmentsAM";
String objectiveVOName = "FndAttachedDocumentsDomExtensionVO";
String nestedAMArray[] = am.getApplicationModuleNames();
oapagecontext.writeDiagnostics(this,"Root AM=>"+am.getName() + " Child AMs=>"+ nestedAMArray.length,1);
OAApplicationModule currentAM = null;
OAViewObject vo = null;
boolean isAttachmentFound = false;
currentAM = am;
for(int i = 0; i < nestedAMArray.length; i++)
amName = nestedAMArray;
oapagecontext.writeDiagnostics(this,"Nested AM Name=>"+amName + "and amName.indexOf(objectivesAMName) "+amName.indexOf(objectivesAMName),1);
currentAM = (OAApplicationModule)am.findApplicationModule(amName);
//Get the view names
oapagecontext.writeDiagnostics(this,"Nested AM Value "+currentAM.getName(),1);
if(!(amName.indexOf(objectivesAMName)==-1))
String[] viewNames = currentAM.getViewObjectNames();
for (int j =0 ;j<viewNames.length ;j++ )
if(viewNames[j].indexOf(objectiveVOName) > 0){
vo = (OAViewObject)currentAM.findViewObject(viewNames[j]);
if(vo!=null && vo.getFetchedRowCount() > 0){
oapagecontext.writeDiagnostics(this,"View object name "+viewNames[j]+" Row Count"+vo.getFetchedRowCount(),1);
isAttachmentFound = true;
break;
oapagecontext.writeDiagnostics(this,"Found Handle to My Nested AM " + amName ,1);
return isAttachmentFound;
2) Check the attachment count when the auto commit is false:
public boolean checkAttachment(OAPageContext oapagecontext,OAWebBean oawebbean){
OAApplicationModule am = oapagecontext.getApplicationModule(oawebbean);
String amName = "";
String objectivesAMName = "OAAttachmentsAM";
String objectiveVOName = "FndAttachedDocumentsDomExtensionVO";
String nestedAMArray[] = am.getApplicationModuleNames();
oapagecontext.writeDiagnostics(this,"Root AM=>"+am.getName() + " Child AMs=>"+ nestedAMArray.length,1);
OAApplicationModule currentAM = null;
OAViewObject vo = null;
boolean isAttachmentFound = false;
currentAM = am;
for(int i = 0; i < nestedAMArray.length; i++)
amName = nestedAMArray[i];
oapagecontext.writeDiagnostics(this,"Nested AM Name=>"+amName + "and amName.indexOf(objectivesAMName) "+amName.indexOf(objectivesAMName),1);
currentAM = (OAApplicationModule)am.findApplicationModule(amName);
//Get the view names
oapagecontext.writeDiagnostics(this,"Nested AM Value "+currentAM.getName(),1);
if(!(amName.indexOf(objectivesAMName)==-1))
String[] viewNames = currentAM.getViewObjectNames();
for (int j =0 ;j<viewNames.length ;j++ )
if(viewNames[j].indexOf(objectiveVOName) > 0){
vo = (OAViewObject)currentAM.findViewObject(viewNames[j]);
if(vo!=null && vo.getFetchedRowCount() > 0){
oapagecontext.writeDiagnostics(this,"View object name "+viewNames[j]+" Row ount"+vo.getFetchedRowCount(),1);
isAttachmentFound = true;
break;
oapagecontext.writeDiagnostics(this,"Found Handle to My Nested AM " + amName ,1);
return isAttachmentFound;
With regards,
Kali.
OSSi. -
How to get handle to all HSSF worksheets
Hi Friends,
Is there any way we can get handle to all the worksheets in the excel file using apache POI classes..
For eg:
If there are 10 worksheets, how to get all the sheet names without using
HSSFSheet sheet = wb.getSheetAt(0)
Thanks and Regards,
JGHi masijade,
I was not aware of the property getNumberOfSheets.
Thanks for notifying me of that property.
and this will property will resolve my issue.
Thanks and Regards,
JG -
Message Handler chain in ALSB2.6
We need to move WLI webservices to ALSB2.6. Webservices used message handler chain which did lots of custom work.
ALSB seems to have java callout but making methods in java call out sysnchronized means performance hit.
Is there anything equivalent to handler chain in ALSB which can be applied to ALL the deployed proxy services?
Thanks.ALSB is not a web service container, simply an intermediary. Therefore there is nothing equivalent to the JAX-RPC handler chain.
Java callout looks like a reasonable alternative. What is your concern about performance? Why would you synchronize the java callout methods and not the message handler chain?
As a best practice, I would suggest you create a local proxy containing the implementation you want to share across ALSB services. The invocation af a local proxy is optimized and as fast as simply replicating an action across every services.
Gregory Haardt
ALSB Prg. Manager
[email protected] -
First, I noticed that Weblogic Workshop projects don't have a
web-services.xml file. Since that's where handler chains are defined, how
does one create handler chains with Workshop? Is it possible?
For Weblogic Server, there is a web-services.xml file and this is where you
define handler chains.
What if you want a global handler? For example you might want a handler that
looks at headers for all message traffic coming into or going out of your
Weblogic Server. Is it possible to define handler chains in a global config
file for this?
If there is no way to do the global config file, how about doing it
programmatically? Is there a way to make the server load your own custom
class on startup, and have that custom class register a handler chain for
all inbound and outbound SOAP calls?
Thanks,I put it in the debugger and found that HandlerRegistryImpl fires for both
client & server side calls. Looks like this will work.
"manoj cheenath" <[email protected]> wrote in message
news:[email protected]..
I think that is also client side. I think the best option for you
is to contact support and file an enhancement request for
global handler chain.
http://manojc.com
"Michael R. Clements" <[email protected]> wrote in message
news:[email protected]..
"manoj cheenath" <[email protected]> wrote in message
news:3ee0d4d3$[email protected]..
weblogic.webservice.core.rpc.ServiceFactoryImpl is used
only on the client side. Subclassing and adding handler may
work at the client side, but this usecase is not planned or tested.That gave me a different idea. Is HandlerRegistryImpl used for bothclients
and servers?
Suppose we override HandlerRegistryImpl to always add our handler to
every
chain, even for QNames that don't have chains. Then this single "hook"would
always fire our handler in both cases, and no server or client code
would
even know it exists. -
How to get handle to a MST bean for a particular row in an advanced table
Hi
Requirement:
My advanced table has 2 columns, the 1st one has a LOV and the 2nd one is a switcher which toggles from LOV to MST depending on the value in the 1st column.
Implementation Steps:
1) Trap LOV event in 1st column and pass row index to the AM
2) Get the VO row from the row index (EVENT_SOURCE_ROW_REFERENCE), set the switcher attribute to MST/LOV depending on Business Logic
3) Get the view attribute value of the 2nd column (to which LOV/MST is mapped).
My LOV/MST gets rendered correctly on the page. However, when the LOV renders in the 2nd column, the view attribute is correctly populated in the LOV. But the MST renders with no value.
I understand that the MST loses value on form submission and that this value needs to be set in the PR of the CO. For that how do I get a handle to the MST bean of the particular row?
This is urgent!!
Thanks
RituPointers?
Anyway I can make the MST in the row return the correct view attribute? -
Can I get handle to Database Row before an entity is deleted
Hi,
We are using stored procedure to list, insert , update and delete entity objects.To use the stored procedure I override the default queries generated by Toplink and make use of the stored procedure query.The issue here is that my Stored Procedure requires more arguments (like name of the user doing the insert) than there are fields in the entity.I need to provide these argument values to the call.For this I do something like
session.getDescriptor(MyClass.class).getEventManager().addListener(new DescriptorEventAdapter(){
public void aboutToInsert(DescriptorEvent evt) {
evt.getRow().put("USER",evt.getSession().getProperty("username"));
I set the username in the unitOfWork out of which I can grab the value in the eventHandler and put it inside the row just before insert.I do the same for modify too.But I dont see a similar methods for "delete".Do we have a aboutToDelete() method where I can get a handle to the row.The preDelete() does not provide a handle to the row.How can I insert additional arg values to the delete query?
Thanks,
HariniHello Harini,
Wow, you are correct there is no aboutToDelete, I guess manipulating the row before deletetion is not that common for our TopLink clients as this is the first request I have heard for it. I will add this request to our enhancement database. You might want to follow it up with support if it is a priority for you.
As a workaround you could use the preDelete event to change the stored procedure call with the user name argument (i.e. build the procedure call dynamically in preDelete and set it into the query. The query will have been cloned at this point so there should be no concurrency issues. Make sure when doing this that you do not set the deleteQuery in the descriptor query manager as this will override the original query if set.
Example:
descriptor.getEventManager().addListener(new DescriptorEventAdapter() {
public void preDelete(DescriptorEvent event) {
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName("Delete_proc");
call.addNamedArgument("P_ID", "ID");
call.addNamedArgumentValue("USER", "scott");
call.addNamedArgumentValue("TIME", new java.util.Date());
event.getQuery().setCall(call);
});
Maybe you are looking for
-
Dear ALL, i am trying to export the combained PDF based on BOOK opetion using below scripts. but i am getting following error message "Invalid value for parameter 'to' of method 'exportFile'. Expected File, but received 1952403524". anyone knows, ple
-
Need new Apple ID for iCloud ASAP! Please read!
In 2003 I created an Apple ID for iTunes using my work e-mail address. Needless to say I have moved on. I have a Macbook Pro and and iPhone 5. I can get anything to work on my phone because of the old e-mail address. If anyone could provide me wit
-
How do I sync photo album created in ipad running ios5 to my apple laptop running os lion?
-
i want to send image to another server'database,and can get it later. how to transport image on net, who can paste some code? thanks !
-
Have downloaded and installed iCloud Control Panel 2.1 but get 'server error' after entering my Apple ID. Have tried web access to iCloud.com and got blocked even when Firewall turned off. Am running 128-bit Windows 8. Is there a compatibility issue?