XMLAnonymizer Bean - File Adapter
Hi,
I am working on removing the name space from the XML payload using the XMLAnonymizer Bean. I am using the file adapter to write the output file to a directory.
Remove namespace prefix or change XML encoding with the XMLAnonymizerBean
The above blog works for the JMS adapter. Do I need to do anything different for the file adapter.
Any help is apprectiated.
Joe
Hi ,
I am trying to remove Namespace from the XML Payload being sent to a file.
1. I tried Stefan's Blog with the XMLAnonymiser and that did not work as I probably did not configure it correctly for the file adapter. Do you have any experience with this.
2. I tried to develop a adapter module with XSL and failed
3. I removed the XML Namespace in the Message type and the payload still has the message type
Is there a way to remove the Message type from the XML payload?
4. I know if I use an external definition I can loose the namespace and message type
Any help on 1, 2 or 3 is greatly appreciated.
Joe
Similar Messages
-
Errro when referring a Bean in Sender file adapter
Hi
I have created a sample code and deployed in the server and when i refer that in the sender file adapter module processor using the naming format
localejbs/sap.com/com.vas.mod/GetFileNameBean
where
com.vas.mod is the EAR Project name
GetFileNameBean is the Bean name
I am getting the erro in the XI Adaptor monitor as follows
<b>- 2006-07-31 13:06:51 UTC: Error: NameNotFoundException: Path to object does not exist at com.vas.mod, the whole lookup name is localejbs/sap.com/com.vas.mod/GetFileName.</b>
I checked theJNDI name in the server it is exactly the same.
can some one help me on this please?
vasagam R KHi Vasagam,
Please check these threads..
They deal with ur question...
NameNotFoundException during JNDI lookup for Deployable WebService Proxy
Strange Lookup Error (SAP Resource Adapter)
cheers,
Prashanth
P.S Please mark helpful answers -
Using Request Response Bean Module in FILE Adapter
Hi Experts,
Can we use Request Response Bean Module in FILE Adapter in reverse way. That is can we configure thses adapter modules in Reciever file channel and call a sender file channel in it?
My case is RFC to File synchronous case? How do we do this?
Thanks & Regards,
priyankaCan we use Request Response Bean Module in FILE Adapter in reverse way. That is can we configure thses adapter
modules in Reciever file channel and call a sender file channel in it?
My case is RFC to File synchronous case? How do we do this?
The above is not possible....Bean works only for Sender channel and not for Receiver.....requirement not possible using even a BPM as FILE does not support SYNC communication in receiver end......max you can do is split the scenario into SYNC-ASYNC bridge.
Regards,
Abhishek. -
Unzip file using PayloadZipBean in Sender FILE adapter
I am trying to unzip a flat file in Sender FILE adapter using PayloadZipBean.
I am getting mapping error. The problem is File adapter is reading data without unzipping. I am getting weird characters/data, so mapping error.
I searched all the blogs/ forum threads and help.sap.com, everywhere the focus is on zipping, not unzipping.
the file I have is with .gz extension, but I tried with .zip extension also.
Please help in resolving this issue.
Edited by: Gopal Janagama on May 2, 2008 11:42 PMGopal,
GZIP and ZIP format are slightly different, as stated here :
"GZIP compresses only one file and does not have a header. ZIP contains header information about what files are contained in the file."
So I'm not sure the PayloadZipBean supports GZIP format ... Try to ungzip and then zip its content and see if the bean works for it
Rgds
Chris -
File Adapter: trailing space in field using XSD:Decimal in a CSV file
Hi Folks,
I have a problem which i am unable to understand fully.
We have a SAP to file via XI scenario where a mail adapter is used. We are producing a CSV file as an mail attachment.
The issue is all the decimal fields have an extra space before the next delimiter i.e. comma.
The data type used in mapping is XSD:Decimal with 'fraction' set as 2.
I have checked the source XML and there is no trailing spaces there. Initially i thought this might be due to doing the conversion using transformation beans in mail adapter, to rule this out i checked other files produced using FILE adapter they also appear to have same issue.
I can't get my head around it, could not find any parameter i need to pass in content conversion either in MAIL adapter or FILE adapter to supress trailing space before the delimiter.
I suppose this must have occured with others as well.
Any directions would be greatly appreciated.
Btw, we are on PI 7.0 and ECC 6
-Praveen
Edited by: - External Consultants Mouchel on Sep 15, 2009 5:34 PMHi Mouchel,
I personally didnot encounter this kind of issue with the file adapter at any point of time. I would suggest you to check the message mapping before and after payload in sxmb_moni. If you see in mapping you may not find out, so view the source in notepad and then see.
Regards,
---Satish -
Need to get the Mail attachment name as it is to the receiver file adapter
I am doing a Mail to File scenario. I need to get the attachment from the mail and store it on the file server. I am using the PayloadSwap bean in the sender mail adapter. My requirement is to carry forward the attachement name as it is to the receiver file adapter side and store the file with the same name.
Did any one try doing this? I was looking at developing an adapter module but got struck as I could not find whether the attachement name is stored in the XI payload after it has got swapped using the swap bean.
Any help would be appreciated.
VJOops pressed the send key. Take two.
This is becoming a damn nightmare. When I run the adapter I am getting ModuleExceptions. Can you pass your eyes over these Java config settings to see what I am doing wrong. Using NWDS CE 7.1 with PI 7.1 both at SP07. All the imports were taken from PI 7.1 after SP07 was applied. The build id of NWDS is
SAP NetWeaver Developer Studio
SAP NetWeaver 7.1 Composition Environment SP07 PAT0001
Build id: 200901152336
APPLICATION.XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>MailPOP_EAR</display-name>
<description>EAR description</description>
<module>
<ejb>MailPOP_EJB.jar</ejb>
</module>
</application>
APPLICATION-J2EE-ENGINE.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
<application-j2ee-engine>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="service">engine.security.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="library">engine.j2ee14.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="service">com.sap.aii.af.svc.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="interface">com.sap.aii.af.ifc.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="library">com.sap.aii.af.lib.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="library">com.sap.base.technology.facade</reference-target>
</reference>
<fail-over-enable mode="disable" />
</application-j2ee-engine>
EJB-J2EE-ENGINE.XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">
<ejb-j2ee-engine>
<enterprise-beans>
<enterprise-bean>
<ejb-name>GetMailAttachment</ejb-name>
<jndi-name>GetMailAttachment</jndi-name>
<session-props/>
</enterprise-bean>
</enterprise-beans>
</ejb-j2ee-engine>
EJB-JAR.XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<description>EJB JAR description</description>
<display-name>EJB JAR</display-name>
<enterprise-beans>
<session>
<ejb-name>GetMailAttachment</ejb-name>
<home>com.sap.aii.af.lib.mp.module.ModuleHome</home>
<remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>
<local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
<local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
<ejb-class>sample.GetMailAttachment</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
SENDER MAIL ADAPTER modules
1 AF_Modules/PayloadSwapBean Local EB 1
2 GetMailAttachment Local EB 2
3 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local EB 3
1 swap.keyName payload-name
1 swap.keyValue MailAttachment-1
RECEIVER FILE MODULES
1 localejbs/AF_Modules/DynamicConfigurationBean Local Enterprise Bean 1
2 localejbs/CallSapAdapter Local Enterprise Bean 2
1 key.0 write http://sap.com/xi/XI/System/File FileName
1 value.0 message.interface
VARIABLE FILENAME SUBST WITH ASMA TURNED ON
fName message:interface_name
JAVA SOURCE
package sample;
import javax.ejb.CreateException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import com.sap.aii.af.lib.mp.module.Module;
import com.sap.aii.af.lib.mp.module.ModuleContext;
import com.sap.aii.af.lib.mp.module.ModuleData;
import com.sap.aii.af.lib.mp.module.ModuleException;
import com.sap.engine.interfaces.messaging.api.Message;
import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;
import com.sap.engine.interfaces.messaging.api.TextPayload;
import com.sap.engine.interfaces.messaging.api.XMLPayload;
import com.sap.aii.af.service.cpa.Channel;
@ejbHome <{com.sap.aii.af.lib.mp.module.ModuleHome}>
@ejbLocal <{com.sap.aii.af.lib.mp.module.ModuleLocal}>
@ejbLocalHome <{com.sap.aii.af.lib.mp.module.ModuleLocalHome}>
@ejbRemote <{com.sap.aii.af.lib.mp.module.ModuleRemote}>
@stateless
<code>GetMailAttachment</code>
@SuppressWarnings("unused")
public class GetMailAttachment implements SessionBean, Module {
private static final long serialVersionUID = 7612238514043673502L;
private SessionContext myContext;
private MessagePropertyKey myFileName;
public void ejbRemove() {
public void ejbActivate() {
public void ejbPassivate() {
public void setSessionContext(SessionContext context) {
myContext = context;
@throws CreateException
public void ejbCreate() throws CreateException {
public void getMessageProperty(MessagePropertyKey FileName) {
myFileName = FileName;
@param moduleContext
Contains data of the module processor that might be important
for the module implementation such as current channel ID
@param inputModuleData
Contains the input XI message as principal data plus eventual
set supplemental data
@return ModuleData Contains the (changed) output XI message. Might be the
response message if the module is the last in the chain.
@exception ModuleException
Describes the cause of the exception and indicates whether
an retry is sensible or not.
@SuppressWarnings("deprecation")
public ModuleData process(ModuleContext moduleContext,
ModuleData inputModuleData) throws ModuleException {
try {
Message msg = (Message) inputModuleData.getPrincipalData();
TextPayload payload = msg.getDocument();
String contentType = payload.getContentType();
// Content Type could be something like
// text/plain;charset="UTF-8";name="file.txt"
contentType = contentType.replaceAll("\"", "");
int i = contentType.lastIndexOf("=") + 1;
String fileName = contentType.substring(i);
msg.setMessageProperty(myFileName, fileName);
inputModuleData.setPrincipalData(msg);
} catch (Exception e) {
return inputModuleData;
JAVA ERRORS
2009-02-04 11:41:14 Information Mail: calling the module processor for channel LMK_Common_Mail_Sender
2009-02-04 11:41:14 Information Swap: swapping by payload-name ? MailAttachment-1
2009-02-04 11:41:14 Information Swap: successfully swapped
2009-02-04 11:41:14 Information Mail: message leaving the adapter (call)
2009-02-04 11:41:14 Information The application tries to send an XI message asynchronously using connection AFW.
2009-02-04 11:41:14 Information Backward validation is enabled
2009-02-04 11:41:14 Error Unable to validate the message with message ID 8702df71-f254-11dd-9b9b-001a64a73518
2009-02-04 11:41:14 Error Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
2009-02-04 11:41:14 Error Mail: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
2009-02-04 11:41:14 Error Mail: error occured: com.sap.aii.af.lib.mp.module.ModuleException -
Unable to clone File Adapter receiver channel for parallel processing
Hi Experts,
I am using variable substitution for File - RFC - File with out BPM scenario(using request response, oneway bean).
While i placed the file in the sender FTP folder, the file didnt get picked up, but in communication channel monitoring, i am getting error ' Unable to clone File Adapter receiver channel for parallel processing'.
Can anybody provide me suggestions to solve this error.
Note : without variable substitution , the interface is working good.
Is it due to, i am trying the source structure field in response file adapter?Hi,
In your CC, do you use some additional paramaters ?
like these one of point 47/48 of [Oss note 821267 - FAQ: XI 3.0 / PI 7.0/ PI 7.1 File Adapter|https://service.sap.com/sap/support/notes/821267]
Maybe there is conflict with a parallel connexion and the bean used to do asynch-synch bridge...
Mickael -
File Adapter Polling issue(Is there critical value of File size )?
Hi
I use File adapter as the Activation to initialize a BPEL process instance .The source data is a kind of Delimited file format.On my PC, when the file size is less than 4M ,everything works fine ,But when the size increased. The BPEL process will not initialize the instance.When the source data is XML data , the "critical value " is about 12M. The error msg is below.
<2005-08-08 12:48:26,209> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Processing file : D:\Temp\WOSSystemIntegration\InBoundFiles\LOADPLAN_DATA_200508041708.xml
<2005-08-08 12:48:29,455> <INFO> <default.collaxa.cube.activation> <FileAdapter::Inbound> Sending message to Adapter Framework for posting to BPEL engine: { file=D:\Temp\WOSSystemIntegration\InBoundFiles\LOADPLAN_DATA_200508041708.xml
<2005-08-08 12:48:40,197> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::l
ogError> Error while invoking bean "cube delivery": Delivery callback message se
rialization failed.
An attempt to serialize the delivery callback messages for conversation "LocalGU
ID:d0b7ccf8e4242850:134b07e:10594606738:-7ffc", message "d0b7ccf8e4242850:134b07
e:10594606738:-7ffb" to binary format has failed. The exception reported is:
<2005-08-08 12:48:40,245> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::l
ogError> Error while invoking bean "delivery": Delivery callback message seriali
zation failed.
An attempt to serialize the delivery callback messages for conversation "LocalGU
ID:d0b7ccf8e4242850:134b07e:10594606738:-7ffc", message "d0b7ccf8e4242850:134b07
e:10594606738:-7ffb" to binary format has failed. The exception reported is:
<2005-08-08 12:48:40,245> <ERROR> <default.collaxa.cube.activation> <AdapterFram
ework::Inbound> [Read_ptt::Read(loadPlanCollection)] - JCA Activation Agent was
unable to perform delivery of inbound message to BPEL Process 'bpel://localhost/
default/P2E_WOS_LP~1.0/' due to: Delivery callback message serialization failed.
An attempt to serialize the delivery callback messages for conversation "LocalGU
ID:d0b7ccf8e4242850:134b07e:10594606738:-7ffc", message "d0b7ccf8e4242850:134b07
e:10594606738:-7ffb" to binary format has failed. The exception reported is:
<2005-08-08 12:48:40,245> <ERROR> <default.collaxa.cube.activation> <AdapterFram
ework::Inbound>
com.oracle.bpel.client.ServerException: Delivery callback message serialization
failed.
An attempt to serialize the delivery callback messages for conversation "LocalGU
ID:d0b7ccf8e4242850:134b07e:10594606738:-7ffc", message "d0b7ccf8e4242850:134b07
e:10594606738:-7ffb" to binary format has failed. The exception reported is:
at com.collaxa.cube.engine.delivery.DeliveryHandler.initialPostAnyType(D
eliveryHandler.java:328)
at com.collaxa.cube.engine.delivery.DeliveryHandler.initialPost(Delivery
Handler.java:219)
at com.collaxa.cube.engine.delivery.DeliveryHandler.post(DeliveryHandler
.java:83)
at com.collaxa.cube.ejb.impl.DeliveryBean.post(DeliveryBean.java:181)
at IDeliveryBean_StatelessSessionBeanWrapper22.post(IDeliveryBean_Statel
essSessionBeanWrapper22.java:861)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.
java:161)
at oracle.tip.adapter.fw.AdapterFrameworkListenerBase$DeliveryServiceMon
itor.send(AdapterFrameworkListenerBase.java:2340)
at oracle.tip.adapter.fw.AdapterFrameworkListenerBase.executeDeliverySer
viceSend(AdapterFrameworkListenerBase.java:478)
at oracle.tip.adapter.fw.AdapterFrameworkListenerBase.deliveryServiceSen
d(AdapterFrameworkListenerBase.java:535)
at oracle.tip.adapter.fw.jca.AdapterFrameworkListenerImpl.performSingleA
ctivation(AdapterFrameworkListenerImpl.java:699)
at oracle.tip.adapter.fw.jca.AdapterFrameworkListenerImpl.onMessage(Adap
terFrameworkListenerImpl.java:567)
at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage
(MessageEndpointImpl.java:121)
at oracle.tip.adapter.file.inbound.ProcessWork.publishMessage(ProcessWor
k.java:651)
at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork
.java:456)
at oracle.tip.adapter.file.inbound.ProcessWork.processMessages(ProcessWo
rk.java:200)
at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:139)
at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267)
at java.lang.Thread.run(Thread.java:534)
<2005-08-08 12:48:40,245> <INFO> <default.collaxa.cube.activation> <File Adapter
::Inbound> Failed to send message {D:\Temp\WOSSystemIntegration\InBoundFiles\LOA
DPLAN_DATA_200508041708.xml} to Adapter Framework.
<2005-08-08 12:48:40,245> <WARN> <default.collaxa.cube.activation> <AdapterFrame
work::Inbound> [Read_ptt::Read(loadPlanCollection)] - onReject: Sending invalid
inbound message to Exception Handler: file://D:/Temp/WOSSystemIntegration/Reject
edMessages
<2005-08-08 12:49:44,617> <FATAL> <default.collaxa.cube.activation> <AdapterFram
ework::Inbound> [Read_ptt::Read(loadPlanCollection)] - Resource Adapter requeste
d Process shutdown
<2005-08-08 12:49:48,676> <INFO> <default.collaxa.cube.activation> <AdapterFrame
work::Inbound> Adapter Framework instance: OraBPEL - performing endpointDeactiva
tion for portType=Read_ptt, operation=Read
<2005-08-08 12:49:48,676> <INFO> <default.collaxa.cube.activation> <File Adapter
::Inbound> Endpoint De-activation called in adapter for endpoint : D:\Temp\WOSSy
stemIntegration\InBoundFiles
<2005-08-08 12:49:49,042> <INFO> <default.collaxa.cube.activation> <AdapterFrame
work::Inbound> JCAActivationAgent::onStateChanged State is changed for process '
bpel://localhost/default/P2E_WOS_LP~1.0/', state=OFF
how can i solve this problem?can i predeploy some parameter? Is there some critical value of File size for the processing of File Adapter ?Hi,
There is no specific parameters to specify the maximum file size to be read in. It is just limited by the heap size of the JVM running the BPEL engine.
If you have enough RAM on your machine you can change the current heap size from 512Mbyte to 1Go by editing the startorabpel.bat file
and modifying the line :
set MEM_ARGS=-Xms512m -Xmx512m -Xmn300m -XX:MaxPermSize=80m
to
set MEM_ARGS=-Xms512m -Xmx1024m -Xmn300m -XX:MaxPermSize=80m
But only do it if you have at least 1.5 Gb of RAM on your machine, otherwise ot will keep spawing and you will have very bad performance.
Speaking about performance, do you really need to have a BPEL payload of 4 to 12 Mb ?
Will the BPEL process really need to access it ? if so, the best solution would be using batching techniques to cut you file in pieces and process it piece by peice.
FB. -
File Adapter BPEL Process getting switched off
The file adapter BPEL process reads a csv file which has a series of records in itfrom /xfer/chroot/data/aramex/accountUpdate/files. In between reading the files, the BPEL process gets switched off. The below snippet is the error we found in the domain.log. Anybody can you please suggest what to do?
<2010-11-25 16:22:28,025> <WARN> <PreActivation.collaxa.cube.ws> <File Adapter::Outbound>
java.io.FileNotFoundException: /xfer/chroot/data/aramex/accountUpdate/files/VFQ-251120101_1000.csv (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at oracle.tip.adapter.file.FileUtil.copyFile(FileUtil.java:947)
at oracle.tip.adapter.file.inbound.ProcessWork.defaultArchive(ProcessWork.java:2341)
at oracle.tip.adapter.file.inbound.ProcessWork.doneProcessing(ProcessWork.java:614)
at oracle.tip.adapter.file.inbound.ProcessWork.processMessages(ProcessWork.java:445)
at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:227)
at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:280)
at java.lang.Thread.run(Thread.java:619)
<2010-11-25 16:22:28,025> <INFO> <PreActivation.collaxa.cube.ws> <File Adapter::Outbound> Processer thread calling onFatalError with exception /xfer/chroot/data/aramex/accountUpdate/files/VFQ-251120101_1000.csv (No such file or directory)
<2010-11-25 16:22:28,025> <FATAL> <PreActivation.collaxa.cube.activation> <AdapterFramework::Inbound> [Read_ptt::Read(root)]Resource Adapter requested Process shutdown!
<2010-11-25 16:22:28,025> <INFO> <PreActivation.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - performing endpointDeactivation for portType=Read_ptt, operation=Read
<2010-11-25 16:22:28,025> <INFO> <PreActivation.collaxa.cube.ws> <File Adapter::Outbound> Endpoint De-activation called in adapter for endpoint : /xfer/chroot/data/aramex/accountUpdate/files/
<2010-11-25 16:22:28,095> <WARN> <PreActivation.collaxa.cube.ws> <File Adapter::Outbound> ProcessWork::Delete failed, the operation will be retried for max of [2] times
<2010-11-25 16:22:28,095> <WARN> <PreActivation.collaxa.cube.ws> <File Adapter::Outbound>
ORABPEL-11042
File deletion failed.
File : /xfer/chroot/data/aramex/accountUpdate/files/VFQ-251120101_1000.csv as it does not exist. could not be deleted.
Delete the file and restart server. Contact oracle support if error is not fixable.
at oracle.tip.adapter.file.FileUtil.deleteFile(FileUtil.java:279)
at oracle.tip.adapter.file.FileUtil.deleteFile(FileUtil.java:177)
at oracle.tip.adapter.file.FileAgent.deleteFile(FileAgent.java:223)
at oracle.tip.adapter.file.inbound.FileSource.deleteFile(FileSource.java:245)
at oracle.tip.adapter.file.inbound.ProcessWork.doneProcessing(ProcessWork.java:655)
at oracle.tip.adapter.file.inbound.ProcessWork.processMessages(ProcessWork.java:445)
at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:227)
at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:280)
at java.lang.Thread.run(Thread.java:619)
<2010-11-25 16:22:28,315> <ERROR> <PreActivation.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "cube delivery": Process state off.
The process class "BulkAccountUpdateFileConsumer" (revision "1.0" ) has not been turned on. No operations on the process or any instances belonging to the process may be performed if the process is off.
Please consult your administrator if this process has been turned off inadvertently.This patch is not for 10.1.3.1.
I have provided a response to on the following post
BPEL Process Going into Dead State Automatically.
cheers
James -
Sender File Adapter - Restrict number of file polled at each poll interval
Hi all,
PI 7.0 SPS16.
We would like to know whether it is possible to configure a sender file adapter (file conversion mode) in order to restrain the number of file taken at each poll interval and if yes how ?
Thanks for your future answers.
Jean-CharlesHi Jean
Standard adapter do not provide functionality to take an input like number of files to be taken at poll interval. But using adapter module you can achieve this.
SAP PI is having the function to set poll timings and scheduling. You can write adapter module and execute this module using File adapter type communication channel before the standard bean and you can restrict the number of files.
Check the link given above as well as this How to Guide
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
Thanks
Gaurav -
File Adapter picks up the file but cant see it in MONI/Message Monitoring
Hi
I am using FCC in Sender File Adapter and have only one sub structure under Recordset hence I have not used the 'Key Field Name' though ''Key Field Type' by default is 'String(Case-Sensitive)'. Besides the 'fieldNames' heading I have mentioned all the fields of the sub structure in the same order as I have mentioned in the Data Type.
The problem that I am facing is that even though the file is picked up from ftp successfully still I cant see any traces of it in either MONI or Message Monitoring though
The error that I receive in the MDT is -
Success : Entire file content converted to XML format
Warning : Empty document found. Proceed without sending message
Success : File "Test.csv" deleted after processing
and I have data in the file.
Can u suggest a solution?
Warm regards,
Vaibhav> Hey
> >>So I have filled my test excel file with the values
> A and B in adjacent columns
> are you picking up some .xls file?if yes,then Content
> conversion wont work,You have to create adapter
> module processor and you have to add to your module
> processor bean to the adapter...Just check the
> following procedure...
> https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/
> 1967
> Thanx
> Aamir suhail
Hi Aamir
I had a look at the blog and according to that I will need to create a module...the prob with that is in the blog he hasnt provided the full steps for that. Also I had tried this thing earlier of using an excel file and saving it in .csv format and it had worked. I cant figure out what the error is this time
Have u worked on creating amodule for excel files b4?
Vaibhav -
Converting .XSL file to RFC using File Adapter
Hi,
I need to convert .xsl file using XI and send an RFC. I am not sure how to do that. Do i need to write some JAVA API's for the same. Is File adapter capable of converting .xsl files.
Any pointers are most welcome.
Thanks in Advance
Regards,
VikasHI,
try in the following ways
Write a simple XSLT mapping or java mapping to change the value of the attribute "encoding" to "ISO-8859-1" in the output XML of message mapping . Include this XSLT or Java map as the second mapping step in your interface mapping.
An example of the XSL code might be as follow:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='xml' encoding='ISO-8859-1' />
<xsl:template match="/">
<xsl:copy-of select="*" />
</xsl:template>
</xsl:stylesheet>
OR
see the below links
/people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
How to write ModuleData process exit bean in the sender file adapter
Adapter module for file renaming
Module processor usage in File ADapter
Regards
Chilla -
How to use File Adapter Receiver to write attachments
Hi,
i have a scenario, in which our own XInotes adapter sends an XIMessage from an IBM Lotus Notes database into XI. This XIMessage contains an XML document as application main document and several PDF files as additional attachments
On the receiver side, i must use a File Adapter to write both the XML documents and the PDF attachments into a directory.
The problem is i don't know how to use the file adapter receiver to write the attachments. In the Channel Monitoring, i can see that all PDF files are transferred to the file receiver. But the file adapter writes only the XML document into the directory.
I've also tried the AF_Modules/PayloadSwapBean, but it can only swap one PDF file into the application payload. And the file name must be hard coded in the module configuration as swap.KeyName.
Could anyone give me any ideas?
thanks a lot in advance
Xianghi,
receiver file adapters do not supprt attachments.
Only File Sender adapter is capable of handling attachments not the receiver.
http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm
Configuring the sender FILE adapter
The sender file adapter is configured to pick the normal payload (file1.xml), which is specified in the File
access parameters, and the additional image file (file1.jpg) that is to be sent as an attachment is configured
under the Additional File(s) as shown in the screenshot below. The file type would still remain binary.
Since, by default, XI sends payload and attachments in XML format, we need to call two beans, namely the
MessageTransformBean and the PayloadSwapBean to help us is transforming the content to jpeg format
and also change the file extension.
The PayloadSwapBean module is used to replace the application payload of the XI message that holds the
data with another payload which is appended to the message as an attachment. In our case, the payload
would be file1.xml whereas the attachment would be file1.jpg
The swap module is denoted in our scenario with the module key swap. It has two parameters from the
MIME header.
regards,
pradeep. -
Xmlanonymizer bean and xslt - both not working for namespace change
Hi All
I have a source structure below
<ns1:Product_MT xmlns:ns1="urn:alpha:websub" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
</Header>
<Item>
</Item>
</ns1:Product_MT>
I am using a soap sender getting called from SOAP UI to consume a PI web service and send the output message to receiver HTTP channel
the receiver needs the namespace of the XML structure as below (ns1 changed to ns)
<ns:Product_MT xmlns:ns="urn:alpha:websub" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
</Header>
<Item>
</Item>
</ns:Product_MT>
I tried to put the xmlanonymizer bean in receiver HTTP but its not doing anything. I am stil getting the output with ns1 namespace
Attached screenshot of receiver http adapter configuration in module
also, I tried to use XSLT mapping as below but this is also not doing anything. Probably, the XSL has to be modified to use in my case . Please help. and let me know.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ns:Product_MT xmlns:ns="urn:alpha:websub">
<xsl:copy-of select="." />
</ns:Product_MT>
</xsl:template>
</xsl:stylesheet>
thx
mikeI had to tweak the XSL little bit to make it work in PI. See updated version below -
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml" version="1.0"/>
<xsl:variable name="root">MT_Product</xsl:variable>
<xsl:variable name="rootns">urn:mdt:udiwebsubmission</xsl:variable>
<xsl:template match="*">
<xsl:choose>
<xsl:when test="local-name()=$root">
<xsl:element name="ns:{local-name()}" namespace="{$rootns}">
<xsl:apply-templates select="node()"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="{local-name()}">
<xsl:apply-templates select="node()"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Regards,
Sameej -
How to read files with codepage UTF16LE with "Sender File Adapter"
Hi everybody,
I am using a XI-Filesender-Adapter to get a (UTF-16LE encoded) file und process it in XI-Mapping.
This is my File-Content:
Cost Centre,Cost Code,Page Count (B&W),Page Count (Colour),Job Count
Unknown,Lexmark,"37,480",334,"11,968"
Unknown,Unknown,312,0,177
110000,Lexmark,128,228,43
The HEX-representation of this content is:
FF FE 43 00 6F 00 73 00 74 00 20 00 43 00 65 00
(The starting 2 Bytes FF FE represent UTF16-LE )
And this is the payload I get for mapping:
<?xml version="1.0" encoding="utf-8" ?>
<ns:MT_POM_KOSTEN xmlns:ns="http://aua.com/pom">
<POM_REC>
<COSTCENTER>uFEFFCost Centre</COSTCENTER>
<COSTCODE>Cost Code</COSTCODE>
<PAGECOUNT_BW>Page Count (B&W)</PAGECOUNT_BW>
<PAGECOUNT_COL>Page Count (Colour)</PAGECOUNT_COL>
<JOBCOUNT>Job Count</JOBCOUNT>
</POM_REC>
<POM_REC>
<COSTCENTER>Unknown</COSTCENTER>
<COSTCODE>Lexmark</COSTCODE>
<PAGECOUNT_BW>37,480</PAGECOUNT_BW>
<PAGECOUNT_COL>334</PAGECOUNT_COL>
<JOBCOUNT>11,968</JOBCOUNT>
</POM_REC>
<POM_REC>
<COSTCENTER>Unknown</COSTCENTER>
<COSTCODE>Unknown</COSTCODE>
<PAGECOUNT_BW>312</PAGECOUNT_BW>
<PAGECOUNT_COL>0</PAGECOUNT_COL>
<JOBCOUNT>177</JOBCOUNT>
</POM_REC>
<POM_REC>
<COSTCENTER>110000</COSTCENTER>
<COSTCODE>Lexmark</COSTCODE>
<PAGECOUNT_BW>128</PAGECOUNT_BW>
<PAGECOUNT_COL>228</PAGECOUNT_COL>
<JOBCOUNT>43</JOBCOUNT>
<POM_REC>
I can see the correct strings (for example Cost Centre) in payload, but the string-comparison in the user defines function cannot recognize the equality of the strings:
for (int i =0; i < a.length; i++) {
if (
(a<i>.equals("Cost Centre")) )
result.addSuppress();
else
result.addValue("");
Actually I am using UTF-8 as codepage in Fileadapter (and Text as type)
When I try to use UTF16 (or UTF-16LE) as Codepage, I am getting unreadable characters.
I also tried binary, UTF16-BE,...
The only way is to covert the file to ANSI before I use it with XI. Then my function does work correctly.
Does anybody have an idea, how I can read a UTF16-LE File and process it correctly in XI?
I am using XI 7.00 0023 and JSDK 1.4.2-34
Thanks a lot
ArminHello Armin,
I have gone through some SAP notes and blogs to find solution to your problem, here is what I found
1. SAP NOTE 821267
q) How do I correctly configure the File Encoding used by the File
Adapter?
Flat Files with File Content Conversion
For a File Sender channel, configure the encoding of the source
file. The file will be interpreted according to the configured
encoding and converted to XML with an UTF-8 encoding.
For a File Receiver channel, configure the encoding to match
the encoding you would like to be written to the target flat
file.
- Flat Files without File Content Conversion
Whether to configure an encoding in this case depends on if you
want to pass through the file "as is", e.g. within a File
Sender to File Receiver scenario, or if you want to convert the
file's encoding on its way through the Integration Server. For
"as is" processing, configure both the sender and the receiver
using the File Type setting "Binary".
To apply an encoding conversion, configure the respective
source and target encoding in both the sender and receiver
channel.
Important: Configuring an encoding in the receiver channel
will only lead to the expected results if the payload sent to
the receiver channel is in UTF-8 format (e.g., by having
specified an encoding conversion in the Sender channel).
So as per this note if you configure the encoding scheme of sender communication channel to UTF-16LE, adapter should be able to convert it to UTF-8 by default. But you have posted that this encoding scheme is leading to unreadable charcters
2) SAP note 880173
This speaks of use of module XMLAnonymizerBean which can be applied to XML payload to change its encoding.
3) How to guide on encoding : http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42?QuickLink=index&overridelayout=true
4) SAP note:960663
http://help.sap.com/saphelp_nw04/helpdata/en/45/da2deb47812e98e10000000a155369/content.htm
TextCodePageConversion Bean details which might solve your problem.
5) Finally if nothing above works you need a java mapping code to convert to target XML structure without any File content conversion. The mapping will convert the received file to proper target XML in "UTF-8" encoding. Please let us know if you need help on the code with this final option.
Regards
Anupam
Maybe you are looking for
-
HOW CAN I DOWNGRADE MY IPOD TOUCH TO 3.0
can any one tell hw can i downgrade my i podtouch to 3 from 4.1.2!!!! in 4.2.1 each song in an album is creating as a new album so that if i have 4 songs in an album i am getting it as 4albums with each song as a new album how can i fix it???in 3.0 s
-
1 Itunes match library, different accounts on iOS devices.
My wife and I have all our music in one itunes library, that's been uploaded to itunes match, under my apple ID. However, we use our own app store/itunes accounts as well as our own icloud accounts on our iOS devices. Is there any way I can have the
-
I have an iphone 4, macbook air, time capsule 500gb apple tv 3. When I try to play a video airplay with iphone, video is loaded very slowly, and goes excerpts. When I try to play the video on Apple TV 3 with my homework COLLECTIONS which is located o
-
Query to find out the Activities done against a table
Hi, One table has been truncated and data reloaded into the table by the user. But at latter stage user deny that activity. I believe all these activities stored in any oracle 10g database table. Need a query to find out the activities done on a spec
-
iP4300 stopped printing anything but some of test pages. Help?