Custom Axis handler deployment
Hi!
I have the requirements to develop custom handler for Axis adapter of PI 7.11. I`ve kindly looked through the SAP Note 1039369 FAQ XI Axis Adapter, but can`t find what have to be name and structure of sda file to be deployed to AS Java.
From FAQ:
There are several places you can package your handlers. If your handlers do not require any references to any service or application components, they can be simply packaged in the standard 3rd party library SDA aii_af_jmsprovider.sda or com.sap.adapter.lib.sda depending on the adapter engine version (i.e., the former for the 640/700 engine and the latter for the 710 engine).
In blog http://scn.sap.com/people/alessandro.guarneri/blog/2011/01/10/soap-fault-in-sap-pi-hijack-it Alessandro advices just to put complied java class to aii_af_axisprovider.sda and deploy it. Refer to SAP Note 1028961 this package should be named as com.sap.aii.af.axisproviderlib.sda.
Is this a working approach? Does the sda have to include all required adapter jars or I can put just compiled handler class?
The other approach described in Axis FAQ is to use Axis SDK package:
If your handlers require some references to some service or application components, they must be packaged in a component that has references to these components and has its own start/stop life-cycle management. Your handlers should be registered to the Axis's class utility registry at the start up. In particular, if the adapter uses some handler classes that are not included in the standard library components of the Axis adapter, the class loaders of these classes must be registered in the org.apache.axis.utils.ClassUtils registry.
This step can be automatically performed when you simply include your handler classes in the Axis sample adapter package and add these class names in its axis-application-classes.properties file. In this case, the Axis sample adapter will automatically register these classes. Read What is the Axis sample adapter SDK? for more information.
The Axis sample adapter SDK for the 7.1x codelines is available as two deployable archives com.sap.aii.adapter.axis.sample.rar and com.sap.aii.axis.sample.app.sda.
Could anyone clarify what archive should I use to deploy handler? Both or just one?
I`ve found axis-application-classes.properties in com.sap.aii.adapter.axis.sample.jar include with com.sap.aii.adapter.axis.sample.rar.
So do I need to put compiled handler class to com.sap.aii.adapter.axis.sample.jar, add it to sda and deploy?
Thanks for help in advance.
Best regards,
Sergey.
And here is the server/provider.xml
<?xml version="1.0"?>
<provider-descriptor>
<display-name>XPI Axis Provider Library</display-name>
<component-name>com.sap.aii.af.axisproviderlib</component-name>
<provider-name>sap.com</provider-name>
<references>
<reference type="library" strength="strong" provider-name="sap.com">com.sap.base.technology.facade</reference>
<reference type="library" strength="strong" provider-name="sap.com">engine.j2ee14.facade</reference>
</references>
<jars>
<jar-name>lib/addressing-1.0.jar</jar-name>
<jar-name>lib/axis.jar</jar-name>
<jar-name>lib/com.sap.aii.adapter.axis.sample.ejb.jar</jar-name>
<jar-name>lib/com.sap.aii.adapter.axis.sample.jar</jar-name>
<jar-name>lib/com.vces.axis.jar</jar-name>
<jar-name>lib/commons-codec-1.4.jar</jar-name>
<jar-name>lib/commons-discovery-0.2.jar</jar-name>
<jar-name>lib/commons-httpclient-3.0.jar</jar-name>
<jar-name>lib/commons-logging-1.0.4.jar</jar-name>
<jar-name>lib/commons-net-1.0.0-dev.jar</jar-name>
<jar-name>lib/opensaml-1.0.1.jar</jar-name>
<jar-name>lib/wsdl4j-1.5.1.jar</jar-name>
<jar-name>lib/wss4j-1.5.11.jar</jar-name>
<jar-name>lib/xalan-2.7.1.jar</jar-name>
<jar-name>lib/xercesImpl-2.9.1.jar</jar-name>
<jar-name>lib/xmlsec-1.4.4.jar</jar-name>
</jars>
</provider-descriptor>
Similar Messages
-
Just curious. I made a custom event handler that is
dispatched from within a class when an XML document is loaded. The
listener is attached to the instance of that class in the FLA. The
attached code to this thread is what is for the class instance.
Does that have to be out there? Is there a cleaner way to do it so
that the code would be away in a class? Just wondering....
Thanks!Well I need my instance to know when the data is loaded into
the object, but I wish there was a more transparent way to do it. I
guess I could somehow put that stuff into the initiation of the
class.... -
ADF Custom error handler not working.
Hi All,
i am using jdev version 11.1.1.5.0. i have created one custom error handler class in model layer which extend DcErrorHandlerImpl class.
and do the entry in Databinding.cpx file
*<Application ErrorHandlerClass="mypackage.classname"/>*
i have override getDisplayMessage(BindingContext ctx, Exception ex) method to show SQL Exception which comes from database table trigger.
code is following-
package com.in.jagran.view.services;
import java.sql.SQLException;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCErrorHandlerImpl;
import oracle.jbo.JboException;
public class AclasErrorHandler extends DCErrorHandlerImpl {
public AclasErrorHandler(boolean setToThrow) {
super(setToThrow);
System.out.println("Inside Error Handler class");
public AclasErrorHandler() {
super(true);
// this(true);
* Returns the message that will be reported to JSF for each error that occurs.
* Returning "null" is the way the custom error handler signals that a given exception
* should not be reported to the client.
@Override
public String getDisplayMessage(BindingContext ctx, Exception ex)
if (ex instanceof oracle.jbo.ValidationException) {
return super.getDisplayMessage(ctx, ex);
else {
// Extract and return the error message that has to be displayed
Exception exception = ex;
String message = "";
// If this exception is an instance of JboException,
// try to find the cause by recursing over the eventual causing exceptions
if (exception instanceof JboException)
Throwable[] exceptionList = ((JboException)exception).getExceptions();
while (exception instanceof JboException
&& exceptionList != null && exceptionList.length > 0)
exception = (Exception)exceptionList[0];
if (exception instanceof JboException) {
exceptionList = ((JboException)exception).getExceptions();
// *** Special processing of SQLExceptions
if (exception instanceof SQLException) {
message = exception.getMessage();
// Ignore the lines in the error message that indicate the line number in the PLSQL code that the error resulted on.
int ind = message.indexOf("ORA-06512");
if (ind > 0)
message = message.substring(0, ind);
// *** If the the reason for the JboException was data creation exception then display the message
// of the top JboException (i.e. JBO-*****: Invalid numeric value, date format or time format)
else if (exception instanceof NumberFormatException || exception instanceof IllegalArgumentException) {
// Report the top exception
message = ex.getMessage();
// Otherwise report the message of the lowest exception in the hierarchy
else {
message = exception.getMessage();
return message;
}but it is not working for me.
thanks in Advance.yes i have used dubugger.
i have set break point to following line-
return super.getDisplayMessage(ctx, ex);
if (ex instanceof oracle.jbo.ValidationException) {
return super.getDisplayMessage(ctx, ex);
}when atttribute validation done like i have attribute of type number and i have done the validation "must be greater than 0" now when i have given negative value control go to above line.
and i have added following code also in handler class
@Override
public void reportException(DCBindingContainer dCBindingContainer,
Exception exception) {
System.out.println(exception.getMessage());
super.reportException(dCBindingContainer, exception);
}now when i have done commit operation control go to here and println statement print follwoing error on log window.
JBO-26041: Failed to post data to database during "Rollback to Savepoint": SQL Statement "null". -
Problem reading custom property file from custom event handler.
Hi,
My custom event handler needs some bits of information that I have set up in a property file. However, when the event handler runs it throws a FileNotFound exception - actually its because permission was denied.
I have added the code System.getProperty("user.name") to find out the actual user that the event handler is running as. It reports that "oracle" is the user.
That's great. However, the permissions on the file will allow oracle to read/write the file. If I log onto the server where OCDB runs (as oracle), I can vi the file.
The file is owned by another user, but the "oracle" is a member of the group that has read/write (we're running on a unix box). The file is not 777.
The event handler is actually calling a static utility method that returns the Properties. This utility is used elsewhere in other custom apps in conjunction with OCDB (on the same server). It works there, so the utility is functioning correctly.
Is there something going on that I'm missing? Like somehow the event handler is acually runn as somebody else?
Here is the node log.
2007/07/17 12:52:16 [oracle.ifs] [37] 434364 system FINE: Error /opt/csc/sfi/configuration/sfi.properties (Permission
denied) Additional INFO: java.io.FileNotFoundException: /opt/csc/sfi/configuration/sfi.properties (Permission denied)
Thanks in advance for the help.
WinstonMatt,
Sorry to have wasted your time. It was a server reboot issue. The ocdb server hasn't been restarted since early July. We added the users and groups late last week. Although we tested on line, the server wasn't quite up to speed with the new changes.
We bounced the server and all is well.
Thanks
Winston -
I am creating a custom view handler , but I want that this view is used only for specific files(views) and for all other files I want that default handler to be used , can we do this in JSF ??If yes then how ??
In your createView method of custom view handler, One of your parameter represents viewName. I guess you can inspect the viewName and delegate the method calls the appropriate implementation. You may also use a resource bundle in conjuction with this.
This strategy depends on the enhancements that you wish to do in your custom implementation.
I have never tried this before but dont you think its possible in your case? -
How to set up a label control from custom event handler?
Hi,
Below I try to describe my problem:
I have a single instance of MyClass (I use Cairngorm framework), with ArrayCollection as a variable, in which I would like to keep a couple addresses from database.
Additionaly I created a custom components with a list of people retrieved from database, with eventhandler for a doubleclick event. After I doubleclick on some person, I create a custom event and dispatch it. In command class connected with this event I connect to the database and get full data about this person and a set of her addresses. This set of addresses I placed into ArrayCollection in my model variable. And now I have a problem, because one of this address (the birth place) I would like to display below the list with persons, in a Panel with a couple of label control, but .... I can't to bind label control to my model.addresses[???] because I don't know if this doubleclicked person has this birth address at all?
I wonder if it is possible to set up label control in my custom components in time when I'm receiving the data from database in my custom event handler???
One of the way to achieve this is to define a string var in my model and placed this special address in it, and then the label control to this variable, for instance {model.birthplace}, but this is only needed for a moment, I don't want to keep this address in extra variable in model, because I have already it in my ArrayCollection in model, so it would be a duplicate.
I hope that you could understand me and my english :-)
Best regardsLooks like I migh not be a novice swing programmer for long then.
-
Custom Error handling in DataSheet View with pop-up message or label controls or HTML
I have a requirement in which DataSheet view is used to bulk edit or input list items and handle validations while in the process.
We have validations done in event recievers before creating the list item. But could not provide a pop up or message with summary of all validation errors. these are buiness custom validations.
Is there a way to custom error handle datasheet view? Is there a way to invoke a UI in context from event recievers?I have a requirement in which DataSheet view is used to bulk edit or input list items and handle validations while in the process.
We have validations done in event recievers before creating the list item. But could not provide a pop up or message with summary of all validation errors. these are buiness custom validations.
Is there a way to custom error handle datasheet view? Is there a way to invoke a UI in context from event recievers? -
Implement custom fault handling in bpel
Hi,
Can you please provide some link on how to implement custom fault handling in bpel
Thanks,
kprSee the article below for details on implementing custom fault handling.
http://beatechnologies.wordpress.com/2011/07/18/fault-handling-in-oracle-soa-suite-advanced-concepts/ -
Hi,
Is there any posibility to add custom exception handler to EDT? I'm thinking to implement an automatic feed-back from a client aplication. When an exception occurs in EDT it will automatically send to server. The problem is that unsigned webstart application have no permissions to call Thread.setUncaughtExceptionHandler() on EDT.
Is there any workaround?
AntonHi,
Is there any posibility to add custom exception handler to EDT? I'm thinking to implement an automatic feed-back from a client aplication. When an exception occurs in EDT it will automatically send to server. The problem is that unsigned webstart application have no permissions to call Thread.setUncaughtExceptionHandler() on EDT.
Is there any workaround?
Anton -
ADF11g+ Custom error handler
Hello,
I am using Build JDEVADF_11.1.1.2.0_GENERIC_091029.2229.5536
I defined the custom error handler as mentioned in the ADF development guide.Facing weired issue when AM method is called from task flow.
e.g,
AM method
public showSuccessMessage(){
this.getDBTransaction().addWarning(new JboWarning("Hello Sample message from AM"));
Above method is called from taskflow and corresponding action is specified in the page.I have task flow ErrorHander activity defined for the task flow also.When I click the button to call the AM method,Jbo warning raised in AM and catched by the task flow error handler and after this control is passed to CustomErrorHandler and message shows properly.But this happens only first time.After that control never goes to custom error handler. Am I missing some thing??
Any idea why??
Thanks
RBHi Frank,
Thanks
What I noticed is,
Case:1
when warning is raised using the addWarning api from AM, binding layer throws exception of type Warning,catches in task flow error handler and directly goes to get getDisplay message method of the custom error handler which is defined in databinding.cpx only once.After that it catches in taskflow error handler and never goes to custom error handler defined in data binding.cpx
Case2:
When I raised it as throw new JboException flow goes reportException of custom error handler and which calls the getDisplay message.In this it even not going to task flow error handler.
If you can confirm this is expected behavior or it is bug that would be great,it helps us define the exception handling framework.
Thanks
RB -
Hello,
I would like to create a custom error handler in a model file similar to the ErrorHandlerExample.seq.
In my case, I will be handing errors genereated in several different dlls. We are trying to avoid writing wrappers around the dll functions to fill in the TestStand error strings. However, this information is available by calling a "get error message" function in the dll. Since I have more than one dll and more than one handle that I will need to check the errors for, I need to know the information about the step that caused the error. Is there a way to get more information about the step that caused the error? I might have a dll function call that had the format:
kiOpenVSA(StationGlobals.KiManager, StationGlobals.VsaSession, StationGlobals.VsaResourceString, StationGlobals.DisplayEnable, StationGlobals.SendInitCommands)
Based on the parameters of the function call, I would be able to call the correct error handling function.
Thanks,
Mike
Solved!
Go to Solution.Hi Mike,
If you want to pragmatically get the name of the DLL file, DLL function and parameters that were called in a previous step, you will first need to reference the step in which the DLL call was made and use the following TestStand API.
Assuming that the DLL was called in the previous step you can use the following expressions using TestStand 4.1.
Access the dll function expression
RunState.PreviousStep.Module.CommonCModule.FunctionCall
Access the dll function name
RunState.PreviousStep.Module.CommonCModule.FunctionName
Access the parameters
RunState.PreviousStep.Module.AsDllModule.Parameters.item(index)
Note that if you are using an older version of TesStand, these functions may not work and you may have to use the ActiveX/COM steps to access this information.
I hope this helps.
Message Edited by S_Hong on 02-10-2009 05:02 PM
Message Edited by S_Hong on 02-10-2009 05:07 PM
S_Hong
National Instruments
Applications Engineer -
Custom Protocol Handler in WL6.0
Hi
I wrote my own url protcol handler for retrieving data with custom URLs.
It works fine in a client application, but when my custom URLs are invoked
in EJB code running inside WL6, the URL is not recognized : I get a
MalformedURLException.
Note that I added a debug statement that checks the value of the system
property java.protocol.handler.pkgs
and my package is correctly listed there after many weblogic packages.
has anyone ever been able to use a custom protocol handler inside WL6 ?
regards,
EdoHi,
First, I want to know what kind of Windows do you use? If it is a Windows server system, there might be a security setting that prevents this, you can try to turn it off in this way:
Open the Server Manager, then select IE ESC,
Turn off the Internet Explorer Enhanced security configuration both for administrator and users in the way as the screenshot below:
If you are using a Windows client system, try to add the local address to the local intranet security setting in this way:
Open Internet Explorer, then select Internet option, click “security” item.
Select Local Intranet then click “sites”, then click “advanced”.
Add the local sites as the screenshot below:
Wade Liu
TechNet Community Support -
Custom error handler examples and/or instruction
I'm finishing up an application and would like to customize some of the error reporting.
I've started playing around with the custom error handler VI's with some success. I would, however, like to see some examples from people who know what they are doing (unlike me).
As always, your feedback is appreciated.
ToddLook at this message.
http://forums.ni.com/ni/board/message?board.id=170&message.id=45649
Do a search for "General Error Handler" and you'll find some others.
I'm also trying to find a simple way to define custom error codes and descriptions in an error cluster. I can produce my codes easily enough using the vi posted by Aristos Queue in the message noted above. I can also display my user-defined descriptions using a dialog, but I haven't found an easy way to make the user-defined descriptions in the array appear in the error cluster.
Any help on this would be appreciated.
Attachments:
Error_Demo.vi 37 KB -
Custom SICF handler read URL parameters
Hello,
I have written a custom SICF handler.In the SICF handler method of handle request,how do i read URL parameters.
regards
KaushikHi,
Using GET_HEADER_FIELD() / GET_HEADER_FIELDS(), the HTTP request handler can access all attributes of the HTTP header (name/value pairs).
Refer Accessing Header Fields (SAP Library - Components of SAP Communication Technology)
Regards,
Chandra -
Custom value handler mapping not instantiated
Hi,
Am using a custom value handler mapping which which gets inserted from a standalone client.
But whn i try to insert using the same in a aplpication server, I get the following error:
kodo.jdo.FatalUserException: Field "keyValue" declared custom mapping strategy "KeyHandler", but this strategy cannot be instantiated.
This error is seen while parsing the package.jdo within the container.
yohannjHi Andy,
When you search ‘category’ in crawled properties(Central Administration->Search Service Application->Search Schema), you will see ows_Category is mapped to DiscussionCategory, like the screenshot:
So, I suggest you create a new column using another name, then test again, compare the result.
Best Regards,
Wendy
Wendy Li
TechNet Community Support
Maybe you are looking for
-
Wifi; lost my connection and can't print to my Epson Artisan 800. Have tried 3 downloads from Epson and one driver download from Apple... Zip? The only way I can print from my Mac Desktop is hooking back up the USB cable direct to printer. on/off, un
-
i use measurement studio for vc6.0 to draw a 3DGraph. now i use Plot3DSurfaceof CNi3DGraph to draw a 3D graph the x data is time,the y data is from 0 to 2048,and the z data is the voltage which is from my usbdevice. so the plot is real time. and i se
-
hard drive crashed, replaced drive and need to reinstall CS5 Extended but I don't have serial number, only product code on box. How do i get my serial number?
-
Why did I have to create a new ID when I logged into Communities this morning? Appears I don't have any history anymore either. I used the same browser and username/password (its stored in my browser) and it asked me to fill out my profile and pick a
-
Can anyone help with this error message when trying to use publish services? An internal error has occurred: ?:0: attempt to index field 'exportSettings' (a nil value)