Modify the SOAP attachment name
hi,
I have a Service with Party, which sends messages in SOAP format to XI.
When the SOAP message sent to XI contains a '&' character in its attachment name, the message gets failed to processed through XI.
I believe this happens since '&' character is a wildcard character in XML hence XI expects a escape character sequence following it and cannot parse through the '&' character. Also as per the IR tests executed for the SOAP message, when the '&' is replaced with its escape sequence the message is processed through successfully.
Is it possible to replace the '&' character with its escape sequence in the SOAP attachment name before it is processed by the XI Integration Engine. That is at the adapter level?
regards,
Diptee
Edited by: diptee s on Oct 26, 2010 4:47 PM
hi,
i have created the Java Mapping .
in the pdf document How Tou2026Work with Character Encodings in Process Integration from SAP, for the Escape sequences it is said that for adding Escape sequences to the unescaped characters, add the Java mapping before the required mapping.
however, i am not able to test the interface in the IR even after adding the new Java mapping.
please suggest.
regards,
Diptee
Similar Messages
-
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 -
How do I customize the Email Attachment name in Email Bursting?
I had worked on BI Publisher extensively on 10g and 11g. I have a client requirement with BIP email bursting to deliver the reports as email attachments. I'm able to do it, and also customize mail body etc. However the email attachment file name is randomly generated with some numbers. I read through the docs, and couldn't find any parameter mapping to the attachment/file name (like we do it with File bursting). How do I specify the mail attachment file names in my Busrting properties?
Thanks,
PadmaPlease go through the following link:
http://garethroberts.blogspot.com/2008/03/bi-publisher-ebs-bursting-101.html
I think after the 'Output' we can specify the filename -
How can I modify the display field names on the output port of my bi query
Hello,
I integrate my bi query in the visual composer storyboard.
Then I click on my output port of the query and see the output fields.
The display field names are very strange.
For example:
ABZCNQMDOPWJGHS1Q5Q27090
I have never save such a field name while I create my query in the query designer.
Have somebody an idea, where I can modify my displayed field names??
Thanks.
ThomasHi Thomas,
the cryptical names are the technical names of your query components. If there is no decription available (depends also on your portal language) then the technical names are displayed. Check your portal language in your user settings and then check if you have entered a description in the query designer for this language.
Best Regards,
Marcel -
How to modify the soap header of ebxml control?
I need to change the soap header information of the ebxml control
from
<eb:CPAId>http://www.openuri.org/cpa</eb:CPAId>
to
<eb:CPAId>MyString</eb:CPAId>
and I want to add some additional information to the header such as the wsse feature
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility">
<wsse:UsernameToken>
<wsse:Username>1234</wsse:Username>
<wsse:Password>5678</wsse:Password>
<Organization>abc</Organization>
<Domain>DEFAULT</Domain>
</wsse:UsernameToken>
</wsse:Security>
Does anyone know where I can change the type value?
Thanks, KunYour code works. But if I place the TextInput in the formItem
and form tags, the Y value becomes 0. You can try this one:
<?xml version="1.0"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Form paddingBottom="0" paddingTop="0"
paddingRight="0">
<mx:FormItem label="Title:">
<mx:TextInput width="275" id="newSongTitle"/>
</mx:FormItem>
<mx:FormItem>
<mx:Button id="submitSongData" label="Add Song"
width="150"/>
</mx:FormItem>
</mx:Form>
<mx:Text text="{newSongTitle.x}" width="322"/>
<mx:Text text="{newSongTitle.y}" width="322"/>
<mx:Button label="set Y" click="{newSongTitle.y =
newY.value}"/>
<mx:NumericStepper id="newY" value="50" minimum="0"
maximum="400"/>
</mx:Application> -
Want to modify the Global Database Name in Oracle 10g R2
Hi All,
I have a global database name like GS77.UK.ORA.COM , I want it to be just GS77.What are the possible workarounds for modifying this.
Thanks & Regards,
Gaurav S.If your problem is really just the global name, yes.
You can check with
Select * from global_name;
Check the documentation first to ensure you checked all implications first
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_1004.htm#i2079942
Regards,
PP -
Problem: Original Attachment Name from SOAP Sender changes to attachment-1
Hi everybody,
we have a scenario where a SOAP sender receives a xml message describing several documents. Each document has a mime type and a file name, size, md5 checksums etc as attributes.
The documents are send as attachments with the same Web service in SWA(SOAP with attachment style).
The web service calls an ABAP proxy provider class in a R/3 backend.
The ABAP proxy class will save the attached documents for further processing and must use the original document names.
At the soap communication channel monitoring(Java Stack) we still see the original attachment names in the message content tab.
At the Integration Server(sxmb_moni) the attachment name changes to attachment-1, attachment-2 and so on.
Using the method
IF_AI_ATTACHMENT ->GET_DOCUMENT_NAME
in the provider ABAP proxy class returns the name attachment-1.
We can see that there is a mapping of the new attachment-1 name to the old, original name in the manifest section of this message on the Integration server.
Is there a way to access the manifest section at a provider ABAP proxy class? Or otherwise a PI configuration setting to preserve the original attachment names.
Thanks a lot,
Heiko
=> PI 7.1 SP9Hi Stefan,
(I was hoping you would find that thread ...)
I see a good reason why the attachment names are changed as the PI message protocol sends the main document as an attachment as well. So no problem with that because the information of the mapping old to new names still exists in the manifest part and is visible at the sxmb_moni.
We see a manifest part like this (Sorry cant post the whole xml doc as the formatting for longer messages isn't working in the forum)
<SAP:Payload xlink:href="cid:4cc43edd-839f-423f-b7c6-7e44294d663a_sig.p7m">
<SAP:Name>attachment-1</SAP:Name>
<SAP:Description>attachment</SAP:Description>
<SAP:Type>ApplicationAttachment</SAP:Type>
</SAP:Payload>
The (red) cid entry is the original file name. This manifest is from the sxmb_moni in the r/3 backend. So all the information is there.. The question is how to retrieve this information .. Any idea?
Best Regards,
Heiko Bergmann -
SOAP adapter looses attachment name
We have a very annoying problem regarding the SOAP adapter. PI "looses" the attachment names when we send from one to the other PI system with the SOAP adapter. E.g. source attachment name is "invoice.pdf", on the target side it is "attachment-1". It seems to be a general shortcoming/bug of the SOAP adapter. I do not know if it gets lost in the SOAP receiver channel or later in the sender channel of the other party.
Is there any way to get around this, so that the partner receives the correct attachment name ? Some configuration in the SOAP channels ? One solution is to pass a name in the content-type (I think that will be preserved), but that I consider only as workaround.
We have that problem on PI 7.0 and even on PI 7.1
Regards,
Christian SyHello,
The following note may help with this issue
1255507 Attachments not being sent to the receiver
Also you could check:
1522630 XI runtime: Payload ignored due to parsing error
1501345 XI runtime: Manifest <attachment-name> is initial
Regards,
Sarah -
How to process a SOAP Attachment in XI
Hi,
I have a SOAP-RFC-SOAP Synchronous scenario. Here the SOAP Message comes with an attachment. I need to process the SOAP Attachment through XI and need to map the content to the RFC and send the response back to the webservice. Here PayloadSwapBean does not work in Sender soap Adapter. Is there any other option of achieving this.
Thanks,
BhargavAsk Michal
The specified item was not found.
Need need to implement the other direction.
Regards
Stefan -
How to download a SOAP attachment using pl/sql
Gurus,
I have a custom pl sql application that is web services based. The custom pl sql application invokes the external web services and updates Oracle Field Service application.
One of the new requirements is to get the signatures from SOAP Attachments (a binary file) and attach it to Field Services transactions in Oracle.
Does anyone has an example of how to download the SOAP attachment file from web service using pl/sql.
The pl sql program uses UTL_HTTP to access web services.
Much Thanx.I think you may be in the wrong forum, but anyways...
What I think your looking for is the htp.print('insert html here'); function. It's plsql, and writes out html to the web server that calls it.
if you search for htp.print you should find loads of examples.
hope this helps.
Merv. -
EmailEventGenerator Document and attachment names
Hi,
I am using this method call to get the email attachment names from the EmailEventGeneratorDocument
this.emailEventGeneratorDocument.getEmailEventGenerator().getAttachments()
The method returns a string of comma delimited file names attached with the email. I use a file control to retrieve the contents of the file by parsing the returned comma delimited file.
The problem I am facing is that, if the attached file name in the email has a comma, the getAttachments()method gives me a truncated file name, which breaks the process. Is there a work around for this problem ?
Thx
ChandraI've got this working by running the report to file, reading the file back using TEXT_IO and then using UTL_SMTP to send the email, with attached report. It works fine but it's a bit of work, especially if you want to send emails externally past your firewall, as all emails sent using UTL_SMTP are effectively the same as a spoofed email, and the firewall needs to be changed to handle this.
If you're interested I've posted the solution up under another message in the Forms forum, title: E-mail and Attachment Problem on web...
Let me know if you need more details.
Jayesh Kavia -
Acrobat 9: Auto-Populate Subject line with Attachment Name
Hello,
I am trying to auto-populate the subject line of an email with the .pdf attachment name. I don't care either way if this functionality is available or not. I just need a difinitive yes or no answer. And, of course, if yes I need to know how to do it. Email client is Outlook 2007.
Thanks in Advance,
MattIn that case, I don't believe so.
You could set up in Acrobat a custom menu item or toolbar button that uses the doc.mailDoc JavaScript method, which is able to set the subject line text. The script could get the current file name and set the subject of the email to the same. More information here: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.505.html -
How to change the TestStand directroy name?
Hi,
I'm interested to change the TestStand directroy name to 'TestStand' instead of 'TestStand 3.0' or 'TestStand 3.1'.
I'm facing a problem with this name. Here is an explanation:
Right now we have TS3.0 and TS3.1 installed on several computers. We work on projects that share modules (like GPIB). These modules are in a ClearCase system, so each one of us can use them and modify them. These modules call to some TS files like 'tsutil.fp' (which is located on the C drive). As a result of different TS names, the project which formerly called a file in TestStand 3.0 directory is now looking for the same file in TestStand 3.1 directory which it doesn't find...
Can you advice me how to modify the TestStand directory name to 'TestStand'?.
Thanks
RafiIn TestStand, if you go to the Configure>>Search Directories menu, you can add user defined paths to search directories. You have the option to add/remove/move up and move down the search directories. However these options are valid only for user defined search directories. The paths to directories that come shipped with TestStand cannot be removed or moved up/down. In your case, I would suggest that you create a custom path to the directory where you want to search and move it right to the top of the list using the "move up" button. In this way that particular directory will be searched first.
Thank you
Nandini Subramaniam
Applications Engineer
National Instruments -
Email sender cc: how to work on messages with different XI attachment names
I am currently facing the following problem:
I have to integrate a scenario using email as communication protocol (both in and outbound).
On the outbound way I know what I am getting, so this is no problem.
On the inbound way though I am facing one huge problem:
I am using a module that needs the source attachment name to do its job.
But as I am receiving emails, this source attachment name can be "MailMessage" if someone sends the content inlined or "MailAttachment-1" if someone sends the content attached.
As I am using one channel to poll a mailbox where basically both these situations can occur, I am looking for a means to use either MailMessage OR MailAttachment-1, depending on what is present.
So far I only know of ways to hard code the source attachment which will cause the cc to fail forever if a wrong message hits the inbox.
I have thought of a workaround, polling the messages from the mailbox without using any module chain, sending them to a file receiver and picking them up again with a file sender that has "archive errorneous messages" set. But this does not look like a nice solution to me at all.
Any ideas how to solve that are highly welcomed!
Thanks and cheers!
StefanHi Francesco,
two follow-up questions:
Can your module cope with an attachment that is not there (as mentioned I might receive messages with "MailMessage" OR "MailAttachment-1" set - never both...)?
Just out of curiousity: is there a possibility to process more than one attachment in the Integration Engine (routing, mapping, ...) from one XI message?
Cheers!
Stefan -
Java.lang.IllegalStateException: Attempt to modify the CacheName
Hi,
I received an error today that I had never seen before -
2007-12-05 17:04:43.006 Oracle Coherence GE 3.3/387 <Error> (thread=ReplicatedCache, member=1): Terminating ReplicatedCache due to unhandled exception: java.lang.IllegalStateException
2007-12-05 17:04:43.007 Oracle Coherence GE 3.3/387 <Error> (thread=ReplicatedCache, member=1):
java.lang.IllegalStateException: Attempt to modify the CacheName: CacheHandler{Name=PRICES-2007-11-20-EMEA-IR,IRS, Index=114, ServiceName=ReplicatedCache, ClassLoader=weblogic.utils.classloaders.ChangeAwareClassLoader@384621f finder: weblogic.utils.classloaders.CodeGenClassFinder@3846290 annotation: monitor-service@monitor-service} to WORKFLOW-TASK-2007-11-20-EMEA
at com.tangosol.coherence.component.util.CacheHandler.setCacheName(CacheHandler.CDB:10)
at com.tangosol.coherence.component.util.CacheHandler.fromXml(CacheHandler.CDB:3)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.ReplicatedCache.onCatalogUpdate(ReplicatedCache.CDB:14)
at com.tangosol.coherence.component.util.cacheHandler.CatalogHandler.entryInserted(CatalogHandler.CDB:6)
at com.tangosol.util.MapEvent.dispatch(MapEvent.java:191)
at com.tangosol.util.MapEvent.dispatch(MapEvent.java:164)
at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
at com.tangosol.coherence.component.util.CacheHandler.onLeaseUpdate(CacheHandler.CDB:83)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.ReplicatedCache$LeaseUpdate.onReceived(ReplicatedCache.CDB:10)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.onMessage(Service.CDB:9)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.onNotify(Service.CDB:21)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.ReplicatedCache.onNotify(ReplicatedCache.CDB:3)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:35)
at java.lang.Thread.run()V(Unknown Source)
This caused the ReplicatedCache to restart.
Note that the "PRICES-2007-11-20-EMEA-IR,IRS" cache and the "WORKFLOW-TASK-2007-11-20-EMEA" cache would have been created around about the same time.
Does anyone have any suggestions as to what happend?
Thanks,
DermotHello,
I believe this support issue is currently being addressed via an Oracle service request through Metalink.
Thanks,
Patrick
Maybe you are looking for
-
Mainstage 2.1 - EXS sound stop when playback loop start
Hi, i use with MacBookPro 4(Go) and audio Kontrol (Native instrument) i have some concert with exs24 sound violin , when i play a note and start a loop in Playback after, the violin sound stop! do you have an issu? Thanks
-
Not able to move files to new folders in Bridge CS6
Hello all. I am trying to move files around through bridge CS6 but I keep getting : " The operation cannot be completed because you do not have sufficient permissions". How do I fix this annoyance? This is really screwing with my work flow and forc
-
Capital projects and Grants Accounting
We looking at the feasibility of creating capital projects in Grants Accounting as part of our R12 project. I need to know whether it is possible to combine non-sponsored capital project types with our existing sponsored projects funded by awards. I
-
Center multi-point cursor in a XY graph
Hi all, i need to programmatically bring to center the only cursor of a XY graph (a multi-point cursor made of 4 plots). I realized an algorithm to calculate the x value to send to the "Cursor.Cursor position:Cursor X" property of the graph. The curs
-
Network issue between Macbook Pro and Windows
I have a Macbook Pro 2012 model running 10.8.5. Also have a Win7 PC. When both are connected to the home router via wire (or the Windows on wireless), everything is fine from network connectivity point of view. However if I move the Mac to Wireless (