Needed UDF in Shabarish Vijayakumar's weblog
Hi,
In the Shabarish Vijayakumar's weblog
/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
1. I need code for the following UDFs
ChkSum and AnyError
and
2. how Constant (RDFILE) can be created ?
Thanks,
ss
Message was edited by:
s s
Hi Mudit,
I tried the code as advanced UDF but it gave me
<b><u>Source code has syntax error:</u></b>
C:/usr/sap/SXI/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapfc96f4b0a30f11dba64f001676478b29/source/com/sap/xi/tf/_RD_MM_.java:86: cannot resolve symbol symbol : variable amount location: class com.sap.xi.tf._RD_MM_ for(int i=0;i<amount.length;i++) ^
C:/usr/sap/SXI/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapfc96f4b0a30f11dba64f001676478b29/source/com/sap/xi/tf/_RD_MM_.java:88: cannot resolve symbol symbol : variable amount location: class com.sap.xi.tf._RD_MM_ totAmount=totAmount+Integer.parseInt(amount); ^
C:/usr/sap/SXI/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapfc96f4b0a30f11dba64f001676478b29/source/com/sap/xi/tf/_RD_MM_.java:90: cannot resolve symbol symbol : variable sum location: class com.sap.xi.tf._RD_MM_ if(totAmount==Integer.parseInt(sum[0])) ^
C:/usr/sap/SXI/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapfc96f4b0a30f11dba64f001676478b29/source/com/sap/xi/tf/_RD_MM_.java:97: cannot resolve symbol symbol : variable Input1 location: class com.sap.xi.tf._RD_MM_ if(Input1.equals("true") && Input2.equals("0")) ^
C:/usr/sap/SXI/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapfc96f4b0a30f11dba64f001676478b29/source/com/sap/xi/tf/_RD_MM_.java:97: cannot resolve symbol symbol : variable Input2 location: class com.sap.xi.tf._RD_MM_ if(Input1.equals("true") && Input2.equals("0")) ^
C:/usr/sap/SXI/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapfc96f4b0a30f11dba64f001676478b29/source/com/sap/xi/tf/_RD_MM_.java:98: cannot return a value from method whose result type is void return "0"; ^
C:/usr/sap/SXI/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapfc96f4b0a30f11dba64f001676478b29/source/com/sap/xi/tf/_RD_MM_.java:100: cannot return a value from method whose result type is void return "1";
what went wrong ?
Thanks,ss
Similar Messages
-
Same filename from a sender to receiver :: DO we really need UDF ?
Hi
This is in refrence of Weblog " <i>same filename from a sender to a receiver file adapter "</i> by <i>Michal Krawczyk</i>.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Actually I worked on another weblog by " <i>Shabarish Vijayakumar</i> "-->
/people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
And I am getting file created on the receiver side with the same file name as on the sender side without using the user-defined function mentioned in Michal's weblog.
Now my question do we really need UDF for same file name when on the sender we are polling for one file only by its name.
I am not exaclty getting the benefit of this feature. Can you tell me why do we need this feature as in whatever scenarios I worked I mentioned the file names in both Sender & Receiver File Adapters.
So I am not getting what is the use of using this UDF, when we mention the name of file needs to be created on Receiver side.
- Lalit Chaudhary -Hi
I put this code for UDF -->
<i>String valueNew;
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String valueOld = conf.get(key);
if (valueOld != null)
valueNew = valueOld.replaceAll("input123",name);
conf.put(key, valueNew);
return valueNew;</i>
Signature of UDF is this :: <u>public String GetFileName(String name,Container container)</u>
But when I am testing this UDF, I am getting following RunTime exception -->
<i>Runtime exception during processing target field mapping /ns0:FileFTP_InOut_MT/File_nm. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._FileFTP_MsgMapping_UDF_ method GetFileName$[lalit, com.sap.aii.mappingtool.tf3.rt.Context@735df3b0] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:FileFTP_InOut_MT/File_nm. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._FileFTP_MsgMapping_UDF_ method GetFileName$[lalit, com.sap.aii.mappingtool.tf3.rt.Context@735df3b0]</i>
I am not much of Java Guy, can you pls. suggest what am I doing wrong, I copied this code from <a href="http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm">SAP Help</a>
- Lalit - -
Need help with getResource() problem under weblogic 6.1
Hey all,
I've got a serious problem that I can't figure out. This should be really
simple - but it's alluding me. I have an ear file with a number of servlets
inside it. This ear file also contains a resource that my servlets want to
read from. This resource is located (within the ear file) at:
"/content/structure/a.txt". The file contains raw ascii.
To have my serlvet read from this file, I thought it would be as simple as:
URL content =
servlet.getServletContext().getResource("/content/structure/a.txt");
// pw is an instance of PrintWriter
pw.print(content.getContent());
However, when I execute the above I get the following exception:
java.lang.NullPointerException
at
java.net.URLConnection.stripOffParameters(URLConnection.java:1011)
at java.net.URLConnection.getContentHandler(URLConnection.java:979)
at java.net.URLConnection.getContent(URLConnection.java:581)
OK, so fine - I figure that I'm new to this. The documentation for the URL
class tells me there is another way around this. It says that rather then
calling getContent() directly, I can open a stream on the URL and read from
that, like so:
URL content =
servlet.getServletContext().getResource("/content/structure/scenario2resourc
es.txt");
FileInputStream fis = content.openStream();
but when I do this I get the following different exception:
java.lang.ClassCastException: weblogic.utils.zip.SafeZipFileInputStream^M
at Utility.writeFileToOutput(Utility.java:134)^M
Apparently this thing is trying to return a web-logic-specific stream (which
is incompatible with an FileInputStream) - which I don't want to use or
learn about since I want my stuff to work under other webservers.
Can anyone tell me what I'm doing wrong? This should be simple.
-john
John Hilgedick
WisdomTools, Inc.
[email protected]
Wenjin,
I appreciate your response. I tried treating it as a normal InputStream -
but it didn't make any difference. Here's what I did:
URL content =
servlet.getServletContext().getResource("/content/structure/scenario2resourc
es.txt");
InputStream is = (InputStream)content.getContent();
And here's the exception:
java.lang.NullPointerException^M
at
java.net.URLConnection.stripOffParameters(URLConnection.java:1011)^M
at
java.net.URLConnection.getContentHandler(URLConnection.java:979)^M
at java.net.URLConnection.getContent(URLConnection.java:554)^M
at java.net.URL.getContent(URL.java:807)^M
at Utility.writeFileToOutput(Utility.java:134)^M
You can see that it is definitely breaking somewhere in getContent().
If you have any other ideas, I'd appreciate hearing about them.
-john
----- Original Message -----
From: "Wenjin Zhang" <[email protected]>
Newsgroups: weblogic.developer.interest.servlet
Sent: Wednesday, November 20, 2002 5:03 PM
Subject: Re: Need help with getResource() problem under weblogic 6.1
>
> The "/" in getServletContext().getResource("/content/structure/a.txt")
means the
> web (WAR) application root, not your EAR root.
>
> The ClassCastException is because that content.openStream() is not
FileInputStream
> and has nothing to do with Weblogic. You should treat it as normal
InputStream.
>
>
> "John Hilgedick" <[email protected]> wrote:
> >Hey all,
> >
> >I've got a serious problem that I can't figure out. This should be
really
> >simple - but it's alluding me. I have an ear file with a number of
servlets
> >inside it. This ear file also contains a resource that my servlets want
> >to
> >read from. This resource is located (within the ear file) at:
> >"/content/structure/a.txt". The file contains raw ascii.
> >
> >To have my serlvet read from this file, I thought it would be as simple
> >as:
> >
> >URL content =
> >servlet.getServletContext().getResource("/content/structure/a.txt");
> >// pw is an instance of PrintWriter
> >pw.print(content.getContent());
> >
> >However, when I execute the above I get the following exception:
> >
> >java.lang.NullPointerException
> > at
> >java.net.URLConnection.stripOffParameters(URLConnection.java:1011)
> > at
java.net.URLConnection.getContentHandler(URLConnection.java:979)
> > at java.net.URLConnection.getContent(URLConnection.java:581)
> >
> >OK, so fine - I figure that I'm new to this. The documentation for the
> >URL
> >class tells me there is another way around this. It says that rather
> >then
> >calling getContent() directly, I can open a stream on the URL and read
> >from
> >that, like so:
> >
> >URL content =
>
>servlet.getServletContext().getResource("/content/structure/scenario2resour
c
> >es.txt");
> >FileInputStream fis = content.openStream();
> >
> >but when I do this I get the following different exception:
> >
> >java.lang.ClassCastException: weblogic.utils.zip.SafeZipFileInputStream^M
> > at Utility.writeFileToOutput(Utility.java:134)^M
> >
> >Apparently this thing is trying to return a web-logic-specific stream
> >(which
> >is incompatible with an FileInputStream) - which I don't want to use
> >or
> >learn about since I want my stuff to work under other webservers.
> >
> >Can anyone tell me what I'm doing wrong? This should be simple.
> >
> >-john
> >
> >
> >--
> >John Hilgedick
> >WisdomTools, Inc.
> >[email protected]
> >
> >
>
-
What needs to be changed to run Weblogic as a service and not as an application?
The server is running Windows 2000. Weblogic was installed on the server as an
application and not as a service. We need Weblogic to run as a service, could
someone please provide me with information on the easiest way of doing this, as
we can not re-install the Weblogic at this point. Any assistance would be greatly
appreciated.hi.
Run the installNtService.cmd script.
Regards,
Michael
Mariet wrote:
The server is running Windows 2000. Weblogic was installed on the server as an
application and not as a service. We need Weblogic to run as a service, could
someone please provide me with information on the easiest way of doing this, as
we can not re-install the Weblogic at this point. Any assistance would be greatly
appreciated.--
Michael Young
Developer Relations Engineer
BEA Support -
Need to install ADR in my weblogic server 10.3.6
Hi,
I have installed my Standalone weblogic server in my laptop. And i tried to deploy one of my EAR file ( Developed using Fusion Web application - ADF). It shows some exception and i finally came to know that in need to install the ADR. (ADF Runtimes). I downloaded the ADR 11.1.1.6.0.
Kindly help me to install this.
Regards,
Prasad K T,Hi Prasad,
Please unzip the ADR and follow the below steps :-
If the OS is Linux/Unix :-
====================
Set your JAVA_HOME
Cd to the location wheren you have unzipped the installer file
Run the below command :-
./runInstaller -jreloc <path to JRE location >
If the OS is Windows :
========================
open a command prompt
Set your JAVA_HOME and then execute the installed as below :-
Cd to the location wheren you have unzipped the installer file
Run the below command :-
setup.ex -jreloc <path to JRE location >
For More Information please review the below documentation which has installer screens in it :-
How-To: ADF Deployment Guide [ The doc refers 10.3.3 + ADR [11.1.1.3.0] but the same is applicable even for 10.3.6 and 11.1.1.6.0
Section :- "Download and Install Application Development Runtime (ADR)"
Regards,
Prakash. -
Mapping issue, maybe need UDF
Hi Gurus,
I am having a source message like this:
ITEM (1..unbounded)
>SOURCEFIELD (1..1)
Sourcefield is below Item.
In the target side, there is a field called TARGETFIELD (1..unbounded) that needs to be created with next condition:
for each nonrepeteable sourcefield value, one targetfield must be created. For example:
<Item>
<Sourcefield>1</Sourcefield>
</Item>
<Item>
<Sourcefield>1</Sourcefield>
</Item>
<Item>
<Sourcefield>2</Sourcefield>
</Item>
<Item>
<Sourcefield>2</Sourcefield>
</Item>
<Item>
<Sourcefield>3</Sourcefield>
</Item>
In this example, 3 TARGETFIELD must be created, since there are only 3 non repeteable values (1, 2 and 3).
Something important to notice is that values will ALWAYS come sorted.
How can I do this in mapping? Should I develop an UDF? Or can I use PI's common functions?
Thanks!
Edited by: chapa_akd on Mar 31, 2011 12:18 AMHi,
You can use
Source Segment -
>Removecontext-->Splitby value(Value Change)--
>Target Segment
and
Source Field--->Removecontext>Splitby value(Each Value)--
>Target Field
Thanks and Regards,
Neethu -
Hi All,
Source File
Eno ename
10 AA
20 BB
10 AA
30 CC
My requirement is need to identify the duplicate records at the mapping level.
Condition as below.
If eno and ename > 2 then status = "X"
else
Status = " "
Please provide me the JAVA UDF code for this.
Thanks,
Sagar.Try something like this:
public void TEST(HashMap<int,String> INPUTTABLE,ResultList result,Container container){
HashMap<String,int> frequencymap = new HashMap<String,int>();
foreach(String a in INPUTTABLE) {
if(frequencymap.containsKey(a)) {
frequencymap.put(a, frequencymap.get(a)+1);
result.addValue("1");
break;
else{ frequencymap.put(a, 1); } -
I need the server run time for weblogic server. Please help
Hi ^^,
I am trying to create a web project in Eclipse WTP europa. I do not have the bea weblogic server installed on my desktop. My organization has issues running it locally. I need to first create a project and then create a war and then deploy it on server.
I am going through the tutorial at the following website:
http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html
It says "To do this tutorial you will need a server runtime that is supported by WTP"
Also "During web application development, we will need a server runtime environment to test, debug and run our project".
Hence I need the link where I can download the server runtime for bea weblogic server.
I have tried to download the tomcat runtime from the following location:
http://apr.apache.org/download.cgi
But tomcat is not accepting it as a server runtime, pls help...Crossposted over all places:
[http://forums.sun.com/thread.jspa?threadID=5347690]
[http://forums.sun.com/thread.jspa?threadID=5348001]
[http://forums.sun.com/thread.jspa?threadID=5348002]
Don't crosspost. It's very rude. -
Need UDF for concatnating three fields
hi all,
need java coding concatnating three fields , please help me as i dont know java
thanking you
SridharHi Sridhar,
use following code
public void calculate(String[] var1, ResultList result, String[] var2, String[] var3, String[] var4, String[] var5, String[] var6, String[] var7, String[] var8, String[] var9, String[] var10, String[] var11, Container container) throws StreamTransformationException{
for(int i = 0 ; i < var1.length;i++)
if (var1<i>.equals("true"))
result.addValue(var11<i>+ var2<i>var3<i>var4<i>var5<i>var6<i>var7<i>var8<i>var9<i>var10<i>);
else
result.addValue(ResultList.SUPPRESS);
while creating this UDF:
Select Execution Type as "All values of Queue" (you will see this option when you go for creating UDF)
In signature Variable Declare 11 variable 1st will hold true or false and rest will be for concatination
First input is output of comaparison ("WE")
Now var1 will hold the output of comaparison. if it is true it will concate 10 value if false it will pass suppress (Same as if withoutelse)
Thanks
Sunil Singh -
Need help for develop websevice on weblogic
Hi to all,
I created a webservice.ear, using servicegen and I've deployed it on Weblogic with success. But when I try to use the test-link I receive some server errors.
I use this task in my build.xml file :
<target
name="ear-webservice"
depends="ejb-jar" >
<servicegen
destEar="${build_ear}/${ear-file}"
warName="${war-file}"
contextURI="${ws-context-uri}">
<service
ejbJar="${dist}/${ejb_jar_file}"
targetNamespace="my-webservice"
serviceName="MYWebService"
serviceURI="/MYWebservice"
generateTypes="True"
expandMethods="true">
</service>
<classpath refid="webservice.classpath"/>
</servicegen>
<wsdlgen ear="${build_ear}/${ear-file}"
warName="${war-file}"
serviceName="MYWebService"
wsdlFile="${build_wsdl}/${wsdl-file}"/>
</target>
and the first exception in weblogic's logs is
javax.naming.NamingException: Could not lookup EJB home, tried .....
Can you help me ?
I have only avaible the ejb.jar
Thanks very much in advace.
best regards
francyHi,
You should use afterrange with the combination of EVSUM function. EVSUM function will show the totals, before sending the data to the database. Please refer to the below links from help.sap:
http://help.sap.com/saphelp_bpc75_nw/helpdata/en/66/a04d49392d401382d0dc1b099acad0/content.htm
http://help.sap.com/saphelp_bpc75_nw/helpdata/en/b2/f117dd464b4252a279ab7f67b4436d/content.htm
Hope this helps. -
Message mapping problem / experts needed / UDF?
Hello experts,
I have the following problem in a message mapping:
Source structure is as follows:
- Node a (min 1, max 999)
- Subnode b (min 0, max 999)
- Each Subnode b has the element "number" (1,1)
This structure must be mapped to the following target structure:
- Node c (1,999)
- Subnode d (0,999)
- Each subnode d has the following elements:
- e1
- e2
- e3
- e11
1 Source node a should create 1 target node c.
All numbers in all subnodes b of one source node a should be mapped to the e1, e2,...e11 elements of the target structure. As one target node d can only contain up to eleven numbers, there must be several d nodes.
I have already tried to create a UDF, but it does not work.
Any experts who would like to share their knowledge?
Thanks in advance.
CHRISTOPH
Edited by: Christoph G. on Apr 23, 2008 10:46 PMHello again,
meanwhile I have worked hard on it and I have found the solution (just one UDF (queue function) which gets the article numbers as well as constant(targetField). So the UDF covers the creation of the "groups" as well as the mapping of the article numbers.
It was really interesting and it made me ambitious to find the solution myself I do not have access to the system today, but I will post my solution as far as I have access again. Maybe you still want to search for a solution? It really may be fun, just like some kind of a puzzle game.
In order to make it more clear, here comes the source and target structure with an example. Let me once more explain it: In the source, there are positions, each with unlimited article numbers. Each position will create a targetPosition. The node "targetPosition" has the subNode "articlenrs" (unbounded). Articlenrs has 11 differnet elements, calles a1, a2, a3, ..., a11. That means, all article numbers from a source postion should be mapped to "groups of 11 target article numbers". Please be aware the there are 11 differnet target fields for article numbers: a1, a2, ... a11.
I think that' why the solution of Liang Ji and Rohit Kalugade will not work...
SOURCE
<position>
<articlenr> 123 </articlenr>
<articlenr> 456 </articlenr>
<articlenr> 4783 </articlenr>
<articlenr> 123 </articlenr>
<articlenr> 456 </articlenr>
<articlenr> 4783 </articlenr>
<articlenr> 123 </articlenr>
<articlenr> 456 </articlenr>
<articlenr> 4783 </articlenr>
<articlenr> 123 </articlenr>
<articlenr> 496 </articlenr>
<articlenr> 4783 </articlenr>
. (unbounded)
</positon>
<position>
<articlenr> 543 </articlenr>
<articlenr> 865 </articlenr>
<articlenr> 643 </articlenr>
</positon>
TARGET
<targetPosition>
<articlenrs>
<a1> 123 </a1>
<a2> 456 </a2>
<a3> 4783 </a3>
<a11> 496 </a11>
<articlenrs>
<articlenrs>
<a1>4783 </a1>
</articlenrs>
</targetPosition>
<targetPosition>
<articlenrs>
<a1> 543 </a1>
<a2> 865 </a2>
<a3> 643 </a3>
</articlenrs>
</targetPosition>
Thanks,
Christoph
Edited by: Christoph G. on Apr 30, 2008 10:20 AM -
Need help regarding certification alternative to weblogic portal developnme
Hi All,
I was planning to give weblogic portal certification (1z0-110).
But I found that the 1z0-110 certification is retired.
Can anybody guide me to some other alternative.
I am a JAVA developer who is interested in doing some server certification. I am not going for admin certification because I think that will not help me as a JAVA developer.
Thanks in advanceQuestion moved to:
Forum Home » Technology Network Community » Certification -
Need commpress-html-template with in weblogic.xml using Weblogic 10.0 MP1
Hi All,
Is there any way to use compress-html-template with weblogic.xml with in Weblogic 10.0 MP1.
I added this as current xsd reference for weblogic 10.0 MP1 but throws me error that it could unable to identify the library reference.
Here is the following XSD file /
(http://xmlns.oracle.com/weblogic/weblogic-javae/1.0/weblogic-javaee.xsd)
Any suggestion for this would be really great.
Regards,
Kal.
Edited by: kalyan Pasupuleti on Jul 20, 2009 11:07 AMThe error appears to come from the ariba code. I suggest asking them.
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at ariba.j2ee.weblogic.Properties.initialize(Properties.java:53) -
Help Needed with wlst distributeApplication and deploy weblogic 10x
Looking for help on missing steps...
Trying to distribute an application .war from one host (adminServer host) to all cluster members.
I first distribute the app which appears to work:
PackagePath = '/opt/wls/domain1/deploy/app1.war
clusterName= 'SomeCluster'
myapp = 'app1'
distributeApplication(PackagePath, targets=clusterName)
I then execute a deploy cmd, pointing to where the distributed application should be on each host:
deploy(myapp, PackagePath, targets=clusterName)
At this point everything completes without error, but on the admin Server console I see two deploys now for app1:
1. app1 is deployed and active
2. app1.war is deployed in Prepared state with the status as distribute Defferred.
Im guessing #2 is there from the distributeApplication call... how do I deploy the app after executing the distributeApplication call?
Thanks
Edited by: user9253444 on Jul 29, 2010 5:29 AMOk, so it looks like I only need to call a startapplicaiton after the distribute to make this work.
-
Need oracle 64 bit Licensed version weblogic 10.3.0.0
please help me to direct a point of contact to download 64 bit Licensed version weblogic 10.3.0.0
Hi NZL,
As the Weblogic version 10.3.0.0 is not available in OTN or edelivery so request you to open a Service Request so that shipment team will provide FTP link so that it could be downloaded.
Also please refer to the note:Error Correction Support Dates for Oracle WebLogic Server (Doc ID 950131.1)
Regards,
Prakash.
Maybe you are looking for
-
I have just bought a MacBook Pro and want to synchronise all data (excluding photos and music) and emails currently on my desktop iMac. First question, how to I plug in an Ethernet cable to the MacBook so that the two can be connected to the same net
-
Sender File Adapter: No Messages
Hi, I have configured a sender file adapter to read a flat file using file format conversion, in the file poler mode using NFS. I could confirm that the File is being read, and the adapter status from the Adapter framework (is:port/AdapterFramework)
-
Accented characters do not display correctly if there is a variable beside it
Hello, We are experiencing a problem when we have text with accented characters an a variable beside it within the same text box. The problem is that the accented characters in the text do not display correctly in the preview or publised course to Fl
-
ITunes 8.2.1 crashes or will not load, reprots unknow error [13010]
I recently upgraded to iTunes 8.2.1 and have had several errors and it crashes when ever it try to copy files to my iTouch. The program installed and ran the first time but on subsequent starts the program would return a message iTunes cannot load, u
-
Please help. Been on the phone twice now and they ...
So I have had a steady 8mb for the past 5-6 years then all of a sudden I'm getting less than 2 for the past two weeks. I think it has something to do with the IP Profile being stuck at 2 because it says I am able to download 8mb. Hopefully those scre