How to pass a XML message as a string and to change the string back to XML

Hi there,
in our current application, we have to access a webservice with a message whose XML Schema Definition was provided by the service's provider. But when accessing the webservice's WSDL, it says that the service expects the message part as a string type.
How can I accomplish to send this structured message (as defined by the .XSD) to the webservice as a string?
Thanks in advance,

Michal,
thanks very much for your help!
I've managed to correctly serialize a xml into a string with the tips in your blog. However, I've not managed to perform the string -> xml (unserialize) step (I'm using Udo's sugestion).
The problem is that XI generates a namespace prefix in runtime (it can be ns0, ns1, ns2..., depending on the context), and so I need to reference this namespace into the unserializing XSLT. With XMLSpy, I've managed to correctly transform it using the XPath "//*:my_tag" to the string tag, but this approach didn't work in XI.
If I try to use just "//my_tag" the transformation concludes successfully, but XI says that the generated XML is not well-formed (probably because it doesn't fits the Schema of the target message, but I'm just guessing here). If I try to use "//:*my_tag", it doesn't even performs the transformation, and gives a "Problem When Testing" error, which says "Transformer configuration exception occurred when loading XSLT ...".
Any ideas on how to reference namespace prefixes in XSLTs in XI?
The codes of my XSLT's are below:
XML to string:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<my_tag>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
<xsl:copy-of select="/"/>
<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
</my_tag>
</xsl:template>
</xsl:stylesheet>
String to XML:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my_prefix="http://my_namespace">
<xsl:template match="/">
<xsl:for-each select="//*:my_tag">
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Thanks again!

Similar Messages

  • How do I delete an account from my Mac and not change the itouch?

    how do I delete an account from my Mac and not change the itouch?

    What does this mean: "I don' t have an image"?
    If you are in the Mail app yo can just delect the message and select delete. See chapter 12 of the users guide
    iPod touch User Guide iOS 6

  • I used my iphone to send a message in French. I have changed the settings back to English but when I send a text or write a message it still thinks I am typing in French. Any suggestions?

    Any thoughts on how to resolve the above ? Namely I went into settings changed the language to French. Sent a message to soemone in France in French. Went back to settings selected British English. Reset the phone into English, But it still thinks it is 'French' when sending a message or text. Have gone back to settings tried to reset the keyboard to original factory settings. No joy. Switched the phone on and off. No joy, It still assumes it is French when sending a text or email even though the settings are all set for English. Any suggestions on  how to resolve tbis ???

    Amazing response. Unbelievably fast. Totally helpful. Totally
    accurate.
    A thousand thanks
    Damian

  • How do you take a imovie that got deleted and is in the trash back into imovie

    Please help

    First, click on the Trash Can at the bottom right of your dock to open the Finder window for the trash. If you have a project (.rcproject) in there, drag it to the Movies/iMovie Projects folder. If you have an Events folder in there, drag it to the Movies/iMovie Events folder. Then restart iMovie.

  • The ctrl+click method of opening a link in a new tab has changed to opening in a new window. How do I open in a new tab with a hotkey/change the hotkey back?

    This is consistent and started with the beta.

    I have no problem with {Ctrl + Click} opening a link in a new Tab in 4.0b9. And {Shft + Click} still opens a link in a new Window.
    Do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • How to pass a xml CDATA in string element when OSB calling a webservice?

    How to pass a xml CDATA in string element when OSB calling a webservice?
    I have a business service (biz) that route to operation of a webservice.
    A example of request to this webservice legacy:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eg="example">
    <soapenv:Header/>
    <soapenv:Body>
    <ex:execute>
    <ex:arg><![CDATA[<searchCustomerByDocumentNumber>
    <documentNumber>12345678909</documentNumber>
    </searchCustomerByDocumentNumber>]]></ex:arg>
    </ex:execute>
    </soapenv:Body>
    </soapenv:Envelope>
    the type of ex:arg is a string.
    How to pass this CDATA structure to webservice in OSB?

    Steps to solve this problem:
    1. Create a XML Schema. E.g.:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         elementFormDefault="unqualified">
         <xs:complexType name="searchCustomerByDocumentNumber">
              <xs:sequence>
                   <xs:element name="documentNumber" minOccurs="0">
                        <xs:annotation>
                             <xs:documentation>
                             </xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string" />
                        </xs:simpleType>
                   </xs:element>
         </xs:sequence>
         </xs:complexType>
         <xs:element name="searchCustomerByDocumentNumber" type="searchCustomerByDocumentNumber"></xs:element>
    </xs:schema>
    With this XSD, the XML can be generate:
    <?xml version="1.0" encoding="UTF-8"?>
    <searchCustomerByDocumentNumber xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="searchCustomerByDocumentNumber.xsd">
    <documentNumber>documentNumber</documentNumber>
    </searchCustomerByDocumentNumber>
    2. Create a XQuery to create a searchCustomerByDocumentNumber ComplexType. E.g.:
    (:: pragma bea:global-element-return element="searchCustomerByDocumentNumber" location="searchCustomerByDocumentNumber.xsd" ::)
    declare namespace xf = "http://tempuri.org/NovoSia/CreateSearchCustomerByDocumentNumber/";
    declare function xf:CreateSearchCustomerByDocumentNumber($documentNumber as xs:string)
    as element(searchCustomerByDocumentNumber) {
    <searchCustomerByDocumentNumber>
    <documentNumber>{ $documentNumber }</documentNumber>
    </searchCustomerByDocumentNumber>
    declare variable $documentNumber as xs:string external;
    xf:CreateSearchCustomerByDocumentNumber($documentNumber)
    3. In your stage in pipeline proxy add a assign calling the XQuery created passing the document number of your payload.
    Assign to a variable (e.g.: called searchCustomerByDocumentNumberRequest)
    4. Create another XQuery Transformation (XQ) to create a request to the webservice legacy. E.g.:
    <ex:arg>{fn-bea:serialize($searchCustomerByDocumentNumberRequest)}</ex:arg>
    For more information about xquery serialize function:
    41.2.6 fn-bea:serialize()
    You can use the fn-bea:serialize() function if you need to represent an XML document as a string instead of as an XML element. For example, you may want to exchange an XML document through an EJB interface and the EJB method takes String as argument. The function has the following signature:
    fn-bea:serialize($input as item()) as xs:string
    Source: http://docs.oracle.com/cd/E14571_01/doc.1111/e15867/xquery.htm

  • How do i cancel iTunes match? i am trying to change the country details as i am now in germany, but keep getting a message saying i first need to dance the existing iTunes match

    how do i cancel iTunes match? i am trying to change the country details as i am now in germany, but keep getting a message saying i first need to dance the existing iTunes match

    When you try to change your county, you might see one of these messages:
    You have an active iTunes Match subscription; you must cancel it before you can change stores.
    You have at least one incomplete pass. Passes must be complete before you can change stores.
    You have rentals that have not expired; they must expire before you can change stores.
    You have a store credit balance; you must spend your balance before you can change stores.
    You have one or more pending store credit refunds. You must wait a few hours for these to complete before you can change stores.
    You are part of a family. You must leave the family before you change stores.
    From
    Can't change the country of your iTunes Store, App Store, iBooks Store, or Mac App Store account - Apple Support

  • HT204053 How do i make icloud work if my husband and I share the same itunes account but we dont want to get each others contacts, messages, apps etc?

    How do i make icloud work if my husband and I share the same itunes account but we dont want to get each others contacts, messages, apps etc?

    Each of you should set up your separate iCloud account on your own computer using your Apple ID. This gives you two independent iCloud accounts.
    Note that an iPad is not a multi-user device. It can only be synced with one account.

  • How to pass containers to a task when I want to invoke the task?

    Hi experts,
    Does any1 have any ideas about how to pass containers to a task when I want to invoke the task? Because the task has 2 required import element.
    Points will be rewarded.
    Vincent.

    Hi
    Check the links
    Workflow automates the steps and activities in a business process according to predefined procedures and rules.
    Workflow presents information and documents to the appropriate knowledge worker or agent (another entity such as a program) to make a decision or perform an activity.
    Workflow tracks each and every step in the process flow and maintains an ongoing status.
    Workflow also collects and reports all of the metrics associated with the execution and completion of the process.
    Check the below links u will get lot of info..
    http://www.sap-press.com/product.cfm?account=&product=H950
    Workflow
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    For examples on WorkFlow...check the below link..
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    Go through the following links on FORK :
    http://help.sap.com/saphelp_nw04/helpdata/en/24/e2283f2bbad036e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/25f1e7454311d189430000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/c5/e4a930453d11d189430000e829fbbd/content.htm
    http://www.insightcp.com/res_23.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPM/BCBMTWFMPM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    For more reference on workflow: http://****************/Tutorials/Workflow/Workflow.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/04/9277a346f311d189470000e829fbbd/frameset.htm
    Check these links.
    http://www.sapgenie.com/workflow/index.htm
    /people/ginger.gatling/blog/2005/12/01/link-workflow-business-objects-to-your-collaboration-tasks
    http://help.sap.com/saphelp_nw04/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
    http://help.sap.com/saphelp_bw33/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
    http://help.sap.com/saphelp_bw31/helpdata/en/8d/25f94b454311d189430000e829fbbd/content.htm
    http://www.sap-press.com/product.cfm?account=&product=H950
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    Workflow
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    For examples on WorkFlow...check the below link..
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    For examples on WorkFlow...check the below link..
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    Workflow tutorials with step-by-step and with screenshots are available at http://www.****************/Tutorials/Workflow/Workflow.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/42/c14a9b55103116e10000000a1553f7/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/c5/e4a930453d11d189430000e829fbbd/frameset.htm
    http://www.sapgenie.com/workflow/
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2857887
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2855919
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2735228
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPM/BCBMTWFMPM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    Debug a workflow.
    This has a step by step procedure :
    http://fuller.mit.edu/workflow/debugging.pdf
    www.erpgenie.com/sap/workflow/debugging.htm
    http://www.erpgenie.com/workflow/debugging.htm?2b5de440
    Workflow tutorials with step-by-step and with screenshots are available at
    http://www.****************/Tutorials/Workflow/Workflow.htm
    http://www.sapgenie.com/workflow/
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2857887
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2855919
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2735228
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/WORKFLOW_tutorial.html
    Reward points for useful Answers
    Regards
    Anji

  • How can I receive text messages on my iPhone and iPad ?

    How can I receive text messages on my iPhone and iPad?

    If you are using the iMessage app on your iPad, you need to use the same email address you use on your iPhone.  But, be advised, that when people email your cell number on your iPhone, you will not get the message on your iPad.  iPad is not a cell phone.  And also know that iMessage on iPad is intended to only let you text with other iOS (iPhone, iPad, iPod Touch) devices. 
    If you want to be able to text to anyone from your contacts list (those for example who do not own an iOS device), there are free apps in the App Store, such as TextFree, which you can download.  But, TextFree will assign you a number (I know kind of odd since iPad is not a cell phone), which you can then text anyone you want.  You'll just need to let your friends know the texts are coming from you.

  • I have an IPad mini and I changed the Apple ID and the password almost one year ago and, for a while, a message asking me to sign in to iCloud pops- up constantly. My iCloud account is registered with an old email and password. I do not remember the

    I have an IPad mini and I changed the Apple ID and the password almost one year ago and, for a while, a message asking me to sign in to ICloud pops- up constantly. My ICloud account is registered with an old email address and password. I do not remember the password to my ICloud account, and ID address that my ICloud account is registered under is an old email adress which is deleted right now (the old mail account is deleted). I don’t have a rescue email adress and I don’t know the answers to the security questions, so I have no way of changing the ICloud password. A message asking me to sign in to ICloud pops up constantly, but I always just hit cancel. However, now I am unable to access Find My IPad. How do I get my ICloud account changed and registered to be under my current Apple ID (email) and password? It is possible to set the device as New Ipad?

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

  • How do I find and/or change the pre-set voltage selection switch in an HP TouchSmart IQ500 series

    how do I find and/or change the pre-set voltage selection switch in an HP TouchSmart IQ500 series (specifically an IQ524)
    This question was solved.
    View Solution.

    Doesn't it use an external AC Adapter? If so, all you should need to use in another country is an adpater plug to match the wall socket.
    ... an HP employee expressing his own opinion.
    Please post rather than send me a Message. It's good for the community and I might not be able to get back quickly. - Thank you.

  • In the message class M7 i NEED TO CHANGE THE MESSAGE 301 FROM E to w.

    In the program LMBGBFES I want to change the mesage e301 to w301 in the enhancement point but sap is not allowing to do so.
    CAN YOU GIVE A SOLUTION TO HOW TO DO IT.
    with regards ,
    Mahasweta Mitra

    hai mahasweta,
    u cant change the message from E301 to W301 as the code where the message is placed does not come under any enhancement point so that cannot be enhanced , u can do even with implicit enhancements but that does nto fall under it i mean uisng implicit enhancement options u can add some new code at start and end of the programs, u can use enahcnement poitns to enhance the code which comes under that point and it is obvious sap do not allow everythign to be modifed , so if u want to really chnage ti then u cna use access key and change it but it has implications on other programs from where this is called
    regards
    m.a

  • Help - I have an apple id account, where is my iPod and iPad registered, but also the iPod of my daughter. How can I make an account for my daughter and keep all the apps she has on her iPod?

    Help - I have an apple id account, where is my iPod and iPad registered, but also the iPod of my daughter. How can I make an account for my daughter and keep all the apps she has on her iPod and in her own iTunes?

    Sorry, content bought with one Apple ID cannot be merged or transferred to another Apple ID.

  • How do I move an object from one photo to another and then change the scene, i.e.  winter to sum?

    How do I move an object from one photo to another and then change the scene, i.e.  winter to summer?

    OK.
    Open the picture with the new scene. This will be your canvas.
    Open the picture with object A, select it with one of the selection tools, go to Edit>copy
    Go back to the new scene/canvas, Go to Edit>paste
    Repeat for object B
    Use the move tool to position A & B, each on its own layer. Use the corner handles of the bounding box to resize, if necessary
    You should have 3 layers: Background layer, and the 2 layers with A & B
    Note: It's best if the resolution of the 3 picture files is the same value.

  • I made a big mistake to change the setting of my Mac book pro to "me only". Now ofcourse It cannot open the login page, for how would the mac know it is me? How can I change the setting back to "everyone"?

    I made a big mistake to change the setting of my Mac book pro to "me only". Now ofcourse It cannot open the login page, for how would the mac know it is me? How can I change the setting back to "everyone"? I have back up in the past but the last month I have not. I really want to keep the data.
    So how can I go in and change the setting, It stays ofcourse at the apple screen with wheel. All info is there and the computer works fine, just cannot use it or have been able to log in.

    wjosten is spot on.  If you really want iCloud, then you will need to acquire a new or second hand MBP that can run Lion.
    Ciao.

Maybe you are looking for

  • Skydrive built in app wont let me update it and it doesn't work

    A day after the name change became official my built in skydrive app stopped working. Every time I click on the app it loads the clouds then goes to a message "This location can't be found, please try again later", then it flat crashes and I am back

  • Open file & close folder that it's in - in one step

    I want to be able to double click a file to open it and then the folder this file is in closes so that it is no longer open on my desktop. Is there a one step way to do this?

  • Problem editing material in .wmv and saving

    in QT pro, if i'm editing out (deleting) material from a .wmv or .avi and then go to save, it always saves to a .mov for some reason. funny thing is that the new saved .mov is often larger in Mbs than the original .wmv or .avi. i need the edited one

  • How to assign fields to access sequence

    Hi expert i have assigned condition table to  access sequence but it contains nothinng.its not showing the fields available in the table can someone help me how to add these fields in acess sequence i was able to add condiion table in access sequence

  • Can a device be added to my iCloud account using the serial number?

    I'm hoping to find an option to get an iPad added to my iCloud account without having the device in hand. Situation - my new iPad was stolen prior to getting it set up with the Find My iPad app. I have the original packaging with serial number and ha