Httpservice POST headers/XML payload formation

I am trying to use the Quickbase API (see reference below) with a POST.  I am having trouble forming it; specifically, I am clueless as to how to format the header (headers="").  I think the XML Payload is correct, but who knows.  Thanks for your help!
Quickbase API reference:
Example XML Request
POST /db/6c5xatxy HTTP/1.0
Content-Type: application/xml
Content-Length: 88
QUICKBASE-ACTION: API_GetRecordInfo
<qdbapi>
<rid>4</rid>
<ticket>1_6c6482m9_j36_c7mdvh9cmmtn9c8qtr5qchvw33v</ticket>
</qdbapi>
My code:
<fx:Declarations>
  <s:HTTPService id="serviceQBPost" method="POST"
                 url="https://www.quickbase.com/db/beu45unrw"
             headers="Content-Type: application/xml Content-Length: 88 QUICKBASE-ACTION: API_GetRecordInfo"
         result="serviceQBPost_resultHandler(event)"
         fault="serviceQBPost_faultHandler(event)">
                 <s:request xmlns="">
           <qdbapi>
             <rid>4</rid>
                     <ticket>1_6c6482m9_j36_c7mdvh9cmmtn9c8qtr5qchvw33v</ticket>
           </qdbapi>
         </s:request>
  </s:HTTPService>
</fx:Declarations>

Well, I solved my performance problem by using XMLSocket,
instead of HTTPService - a shame, since HTTPService is more
appropriate.
Question: how do I determine whether Adobe knows about this
issue, and whether they care?

Similar Messages

  • HTTPService POST with XML does not declare charset encoding

    Hi all.
    I'm trying to do a HTTP POST of some XML using HTTPService
    and I've got it working apart form the fact that the HTTP message
    sent does no declare what charcater set it is using for encoding.
    As a test I send a 'ñ' character and it seems from the
    resultant bytes that the charset being used is UTF-8.
    My ActionScript is...
    var xml:XML=new XML(<root/>);
    xml.@testCharacter="ñ";
    xml.appendChild(<login/>);
    xml.login.@username="bob";
    xml.login.@password="secret";
    var httpService:HTTPService=new HTTPService();
    httpService.url='
    http://app.localhost/null';
    httpService.method="POST";
    httpService.contentType=HTTPService.CONTENT_TYPE_XML;
    httpService.request=xml;
    httpService.send();
    And what seems to get sent over the wire is (shown in
    8bit-ASCII)...
    POST /null HTTP/1.1
    Host: app.localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
    rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7
    Accept:
    text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png ,*/*;q=0.5
    Accept-Language: en,en-us;q=0.7,en-gb;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Content-type: application/xml
    Content-length: 77
    <root testCharacter="A±">
    <login username="bob" password="secret"/>
    </root>
    Anyone know (1) how I can control what character set gets
    used for encoding and (2) how I can get either XML or HTTPService
    to declare what the encoding is?
    Thanks in advance, Neil.

    Jarod,
    XML parser product managers who might be able to help you on a parser-specific issue like this "hang out" here on OTN in the XML forum. Have you tried posting there to catch their attention? Thanks.

  • How to pass XML payload to HTTP POST Service.

    Hi All,
    I am calling a RestFul service using Http Post method.
    If the payload type is "url-encoded" then my directly assignment of values using assign activity is working fine.
    But when i change the payload type to "xml" , It's erroring out saying the value is not provided for the parameters..
    You can also try this using below details to reproduce the issue.
    Details:
    =====
    URL : http://api.geonames.org/postalCodeSearch
    Used HttpBinding as reference in composite.
    XSD :
    <?xml version= '1.0' encoding= 'UTF-8' ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org" targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xsd:element name="geonames">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="totalResultsCount" type="xsd:integer"/>
    <xsd:element name="code" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="postalcode" type="xsd:string"/>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="countryCode" type="xsd:string"/>
    <xsd:element name="lat" type="xsd:float"/>
    <xsd:element name="lng" type="xsd:float"/>
    <xsd:element name="adminCode1" type="xsd:string"/>
    <xsd:element name="adminName1" type="xsd:string"/>
    <xsd:element name="adminCode2" type="xsd:integer"/>
    <xsd:element name="adminName2" type="xsd:string"/>
    <xsd:element name="adminCode3" type="xsd:integer"/>
    <xsd:element name="adminName3" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Input">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="postalcode" type="xsd:string"/>
    <xsd:element name="username" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    We need to send following input values to the service.
    postalcode = 90110
    username =siddhardha
    Can someone let me know how to make it work with XML payload.Looks like i am not constructing the XML payload correctly in assign.
    Please send me the sample to [email protected].
    Thanks in advance,
    Siddhardha.

    Sid,
    I am still trying the same, here we need to change the input type to mimeXml
    have a look at this link....
    https://blogs.oracle.com/reynolds/entry/oracle_http_adapter
    I am trying multiple ways, everytime i get the same below error...
    <messages>
    <Invoke1_Request-Response_InputVariable_2>
    <part name="Input">
    <Input>
    <postalcode>90110</postalcode>
    <username>siddhardha</username>
    </Input>
    </part>
    </Invoke1_Request-Response_InputVariable_2>
    <Invoke1_Request-Response_OutputVariable>
    <part name="geonames">
    <geonames>
    <status message="Please add a username to each call in order for geonames to be able to identify the calling application and count the credits usage." value="10"/>
    </geonames>
    </part>
    </Invoke1_Request-Response_OutputVariable>
    </messages>
    Thanks,
    N

  • Post  XML Payload to other application in java

    Hi All,
    I am trying to post an xml file as a string to another url using a HttpURLConnection,OutputStream classes. My code will look like below:
    String xmldata = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
    + "<cust><firstNmTxt>"
    + firstNmTxt
    + "</firstNmTxt><midInitTxt>"
    + lastNmTxt
    + "</midInitTxt><lastNmTxt>"
    + lastNmTxt
    + "</lastNmTxt>"
    + "<addrLine1Txt>"
    + addrLine1Txt
    + "</addrLine1Txt><addrLine2Txt>"
         + addrLine2Txt
    + "</addrLine2Txt><cityNm>"
         + cityNm
         + "</cityNm><postlStCd>"
         + postlStCd
         + "</postlStCd><zipCd>"
         + zipCd
         + "</zipCd><phoneNum>
         + phoneNum
         + "</phoneNum><emlAddrTxt>"
         + emlAddr
         + "</emlAddrTxt></cust>";
    HttpURLConnection con = null;
    OutputStreamWriter output = null;
    try
    URL portalUrl = new URL("http://sampleurl/PayloadsServlet");
    con = (HttpURLConnection) portalUrl.openConnection();
    con.setDoOutput(true);
    con.setRequestMethod("POST");
         System.out.println("Requested Method IS : " + con.getRequestMethod() + " AND Requested URL IS:" + con.getURL());
    con.setRequestProperty("Content-Type", "text/xml");
    con.connect();
    output = new OutputStreamWriter(con.getOutputStream());
    output.write(xmldata);
         System.out.println("CONTENT:" + output.toString());
    //Clean-up resources
    output.close();
    String line;
    BufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));
    while ((line = reader.readLine()) != null)
         System.out.println("Response From Application URL:" + line +"\n");
    catch (Exception e)
    // Handle exception
    e.printStackTrace();
    // Log exception          
    finally
    if (output != null)
    output.close();
    if (con != null)
    con.disconnect();
    The issue with this code is when I am printing the response from the URL, I couldn't see the data I am sending( i.e.xml payload) But I could see the the output of the URL page I have given to connect.
    Do I need to commit the "output" after writing it to the URL's Outputstream?
    Please anybody help me with this. I am in hurry.
    Thanks in Advance,
    NB
    Edited by: user7470167 on May 6, 2011 3:33 AM

    This can't be done.
    Windows Token are unique to each process.  To pass a token from one process to another in Windows, you need to call DuplicateHandle() which requires process handles in each process.
    thanks
    Frank K [MSFT]
    Follow us on Twitter, www.twitter.com/WindowsSDK

  • Retreive xml payload from Orabpel meta table.

    Hi guys,
    I am trying to trace where does the invoking xml payload get persisted for gor each bpel invocation
    By analyzing the orabpel meta tables at a high level i thought i might have to join tables cube_instance, invoke_message, xml_document on conversation_id and message_guid. But on some more investigation, it seems its not that simple.
    For each invocation of a "HelloWorld" program, a row is getting added to cube_instance but nothing gets into invoke_message & xml_document tables.
    So, how can i drill down to my actual payload for EACH invocation?
    Anybody tried this before?
    Thanks in advance
    Sumit

    Edit your posting and copy and paste the following two tags before and after your PL/SQL code.. [code] and [/code]
    This will properly format your PL/SQL code and make it a lot more readable. Remember that none here gets paid to read code and assist - so by making code easier to read ensures that it is easier to provide assistance and suggestions.
    A couple of comments.
    It seems like the code is confused about whether it is a web server process responding to a HTTP request, or a web browser initiating a HTTP request.
    It mixes HTP (web browser) calls with UTL_HTTP (web server) calls.
    I have posted sample code for a PL/SQL web browser in [url http://forums.oracle.com/forums/thread.jspa?messageID=1925304#1925297]this thread. Perhaps that will assist on the web browser side (using PL/SQL as a web browser to retrieve XML from a web server via a HTTP command).
    If you're intention is to be the actual web server process supplying the XML, then the code seems all wrong to me. You need to use OWA calls and mod_plsql to interface the PL/SQL procedure with a web server.

  • SSL/TLS security certificate data match with XML Payload in SAP PI

    Hi,
    We are working on a solution where we would want to use SSL/TLS or WS Security with client server mutual authentication using client server certificates.
    But, once the sender is authenticated using the certificates, can the XML payload be matched for the correctness with the certificate information? Is this available to PI integration engine at any time? Like Sender A autheticated as A using certificates, must be stopped if his XML payload is saying that he is sender B (which is most unlikely if we trust the senders but did not want to leave a loophole).
    Any ideas here?
    Thanks and Regards,
    Vijay

    Hi Wolfgang,
    Cross-posting is discouraged and against the forum rules, because it is misused and makes a mess of the search due to distributed discussions and answers.
    I will move it to the PI forum and add a watch on it as it is security forum related.
    Unfortunately, the forum software does not have the option to "mirror" threads.
    Cheers,
    Julius
    Edited by: Julius Bussche on Sep 14, 2009 9:50 PM

  • XML Payload to Transaction Input

    Hi,
    For clarification, used to be (and still appears to be) that for transaction input properties, data type needed to be 'simple' (ie: string etc), and although we can have transaction input properties of type XML, they still appear in the WSDL as string.  Although I can see that this works fine even if the string content is actually XML, and the inbound data (which in fact is XML as a string) still looks like XML in the transaction, is this still the recommended approach?  Or is there another recommended way to get an XML payload passed in to a transaction using Runner / SOAPRunner from an external application.
    Additionally, when calling the Runner (or SOAPRunner) from an external application, is there then any limit to the length of the URI call?  I know that browsers have limits on the path, but here we're playing with a path + query string outside of browsers? 
    Are there any limitations on the Netweaver side?
    By the way, currently using MII V12.2.2
    Regards
    Kevin.

    Hi Kevin,
    You can pass XML as string to a transaction and make input parameter as XML in transaction.
    That is perfectly fine.
    As far as I know about the limit of URL, It depends on the server.
    However there are two methods to call a http webservice. GET and POST.
    Use the POST method which is having more limit than GET method. I have faced issue with GET on high volume of data so replaced it with POST method. I have used the url with query parameters of a few MB's (approx 4-5) and never faced the limit issue with POST. You can check exact limit with some load testing on the server.
    Thanks
    Anshul

  • Xml payload in a single field

    Hi All,
    I hve a scenario like this ERP->XI->Monitoring system
    In the mapping, I need to assign the outbound payload (whole xml) to a field in the target
    message field since the (Target) Monitoring system wants to receive the whole xml message in single field.
    How can i achieve this?
    Thanks
    Deno

    try this.. some of the imports are not required.. however I just copied from my code..
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.mp.module.Module;
    import com.sap.aii.af.mp.module.ModuleContext;
    import com.sap.aii.af.mp.module.ModuleData;
    import com.sap.aii.af.mp.module.ModuleException;
    import com.sap.aii.af.ra.ms.api.Message;
    import com.sap.aii.af.service.trace.Trace;
    import java.util.Hashtable;
    //XML Parsing and Transformation classes
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.io.InputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.StringWriter;
    import com.sap.aii.af.ra.ms.api.XMLPayload;
    import com.sun.org.apache.xml.internal.serialize.OutputFormat;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    import javax.xml.transform.*;
    import javax.xml.transform.Source;
    import javax.xml.transform.Result;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;     
    Object obj = null; //Handler to get principal data
              Message msg = null;// Handler to get message object
              String getXMLtoField = null;
              try {
                   obj = inputModuleData.getPrincipalData();
                   msg = (Message)obj;
                   XMLPayload xmlpayload = msg.getDocument();
                        DocumentBuilderFactory factory;
                        factory =DocumentBuilderFactory.newInstance();
                        DocumentBuilder builder = factory.newDocumentBuilder();
                        // parse the XML Payload
                        Document document = builder.parse((InputStream)
                        xmlpayload.getInputStream());
                        OutputFormat format = new OutputFormat(document);    // Serialize DOM
                        StringWriter stringOut = new StringWriter();    // Writer will be a String
                        XMLSerializer serial = new XMLSerializer(stringOut, format);
                        serial.asDOMSerializer();                       // As a DOM Serializer
                        serial.serialize(document.getDocumentElement());
                        String FileContent = stringOut.toString();
              return getXMLtoField;

  • Attempt to process file failed with Exception in XML Parser-format problem

    Hi all,
    Iam getting an unusual error in the J2EE stack in XI.
    And the message is:
    006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)' 2006-11-30 17:31:07 Error Exception caught by adapter framework: null 2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
    My scenerio iam posting IDOC to a flat file with content conversion in the receiver side,the mapping got executed successfully and in the audit log i found that the error was after the 'Start converting XML document content to plain text'.
    This means that error occured during content conversion of XML to the prescribed file format.
    Can anyone suggest any better approach using which we may trace the junk data in IDoc. Manual adhoc approach could take time and is error prone.
    Thanks in advance...
    karun

    Hi Bhavesh,
    Thanks for the early reply. I checked the mapping and everything is fine and the output is also in valid XML format.
    The audit log shows that the mapping got executed successfully and the error is after the step 'Start converting XML document content to plain text '. Is there any constraint in the file adapter regarding the message size for parsing.
    2006-11-30 17:30:50 Success Transfer: "BIN" mode, size 2912595 bytes, character encoding -
    2006-11-30 17:30:50 Success Start converting XML document content to plain text
    2006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)'
    2006-11-30 17:31:07 Error Exception caught by adapter framework: null
    2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
    2006-11-30 17:31:07 Success The asynchronous message was successfully scheduled to be delivered at Thu Nov 30 17:36:07 GMT 2006.
    2006-11-30 17:31:07 Success The message status set to WAIT.
    2006-11-30 17:31:08 Success Acknowledgement creation triggered for type: SystemErrorAck
    2006-11-30 17:31:08 Success Acknowledgement sent successfully for type: SystemErrorAck
    2006-11-30 17:36:08 Success Retrying to deliver message to the application. Retry: 1

  • Passing XML payload from Servlet to JMS

    Hi All,
    My requirement is that servlet will receive the HTTP request , convert it into XML format and publish it to JMS queue.
    Now, I am stuck at the part where I need to publish the XML payload to JMS queue.
    Is it possible to send the XML payload from servlet to JMS queue? Is yes, please let me know how can we achieve this.
    Thanks

    I suggest you go to the following page: [http://edocs.bea.com/wls/docs103/pdf.html] .
    In the "Programming" section, download and read at least "Programming WebLogic JMS" and perhaps "Developing Web Applications, Servlets, and JSPs for WebLogic Server" and "Developing Applications with WebLogic Server".

  • Create a Rules Language process which add a XML payload

    how to create a Rules Language process which add a XML payload in to the ICEPAYLOADEXT table??

    Take a look at this post: How to send a request from MDM 1.6.1 to CC&B using JMS servers?

  • HTTPService Request w/XML

    I am getting insanely frustrated over this.
    I keep getting an error from the server saying wrong_node,
    and I noticed after sniffing the HTTP post the xml is out of order
    then what I have written here:
    quote:
    <mx:HTTPService id="shareRequest" resultFormat="e4x" url="
    http://box.net/api/1.0/xml"
    useProxy="false" method="POST" contentType="application/xml">
    <mx:request xmlns="">
    <request>
    <action>public_share</action>
    <api_key>v6gf5ghjppgc24n6gr</api_key>
    <auth_token>ghhgn556df4s</auth_token>
    <target>file</target>
    <target_id>{idtxt.text}</target_id>
    <password>{passwordtxt.text}</password>
    <message></message><emails></emails>
    </request>
    </mx:request>
    </mx:HTTPService>
    And heres what it sends:
    quote:
    <request><action>public_share</action><api_key>v6mx99comslgqjth5ujb1jppgc24n6gr</api_key> <auth_token>e0903lezcyy4xetzl0772ose0drl2afs</auth_token><emails
    /><message
    /><password>fgg</password><target>file</target><target_id>71407783</target_id></request>
    Its posting in alphabetical order and this looks like its
    unacceptable to the server. Is there any way I can get around this
    and get it to post in the order I want? Id really appriciate any
    help.

    Are you sure it is the order that the server is having
    difficulty with? I would not expect that, and have not seen it with
    any web server platforums I have worked with. The name=value pair
    structure should make this moot. Oh, wait, i see you have changed
    the contentType. I know some folks have had trouble with that. I
    send my xml as strings in a normal name=value parameter.
    Tracy

  • How to export table contents in xml file format through SQL queries

    hi,
    i need to export the table data in to xml file format. i got it through the GUI what they given.
    i'm using Oracle 10g XE.
    but i need to send the table name from Java programs. so, how to call the export commands from programming languages through. is there any sql commands to export the table contents in xml format.
    and one more problem is i created each transaction in two tables. for example if we have a transaction 'sales' , that will be saved in db as
    sales1 table and sales2 table. here i maintained and ID field in sales1 as PK. and id as FK in sales2.
    i get the combined data with this query,
    select * from sales1 s1, sales2 s2 where s1.id=s2.id order by s1.id;
    it given all the records, but i'm getting two ID fields (one from each table). how to avoid this. here i dont know how many fields will be there in each table. that will be known at runtime only.
    the static information is sales1 have one ID field with PK and sales2 will have one ID filed with FK.
    i need ur valuable suggestions.
    regards
    pavan.

    You can use DBMS_XMLGEN.getXML('your Query') for generating data in tables to XML format and you can use DBMS_XMLGEN.SETROWSETTAG to change the parent element name other wise it will give rowset as well as DBMS_XMLGEN.SETROWTAG for row name.
    Check this otherwise XMLELEMENT and XMLFOREST function are also there to convert data in XML format.

  • ABAP to XML file - Formatting problem and UTF-8 requirement

    Hi Everyone,
    Could you please guide us on the ABAP coding required to get the proper XML file format. We have prepared the code for downloading SAP transaction data into an XML file format. However, we are stuck with an improper format as per Example 1.
    The file format we get is this:
    Example 1:
    <?xml version="1.0"?><FDXLMDOrd><FXNHdrLp><CrtDtTm>20070613094517</CrtDtTm><MsgID>319304155</MsgID><MsgTyp>850</MsgTyp><MsgSubTyp>SALES_A</MsgSubTyp><Pr
    <RcvTP>FSCS</RcvTP><SndSrc>FXN</SndSrc><RcvSrc>EIB</RcvSrc><UsrID>VAR</UsrID></FXNHdrLp><OrdHdrLp><OrdNbr>319304155</OrdNbr><OrdActnCD>9</OrdActnCD><Ord
    teCarrReq>FDE</RteCarrReq><RteTptSvcReq>FEIP</RteTptSvcReq></DprtRteLp><SpecInstrLp><SpecInstrTyp>SHIP</SpecInstrTyp><SpecInstr>Example Packing Instruct
    les Order</RefDesc></RefLp><RefLp><RefIDQual>CPO</RefIDQual><RefID>test 1 line 1 pc - s</RefID><RefDesc>Customers Customer Purchase Order</RefDesc></Ref
    Typ><EntIDQual>91</EntIDQual><EntID>H00092</EntID><EntNm>VLAD BOBES</EntNm><Cty>MONTREAL</Cty><PstlCD>H3X 2N5</PstlCD><RgnalCD>QC</RgnalCD><CtryISOCD>CA
    ></AdrLnLp><ConLp><ConTypCD>IC</ConTypCD><ConNm>VLAD BOBES</ConNm><CommLp><CommNbrQual>TE</CommNbrQual><CommNbr>514-731-8361</CommNbr></CommLp></ConLp><
    <Cty>MONTREAL</Cty><PstlCD>H3X 2N5</PstlCD><RgnalCD>QC</RgnalCD><CtryISOCD>CA</CtryISOCD><AddlNmLp><AddlNm1>VLAD BOBES</AddlNm1></AddlNmLp><AdrLnLp><Str
    However, the format need to look like this as in Example 2 below.
    We also need help in how to get  " encoding="UTF-8"?> " as part of the file format.
    Example 2:
    <?xml version="1.0" encoding="UTF-8"?>                
    <FDXLMDProdRcpt>                                      
        <FXNHdrLp>                                        
            <CrtDtTm>20070612151817</CrtDtTm>             
            <SessID>26796</SessID>                        
            <MsgTyp>861</MsgTyp>                          
            <MsgSubTyp>WRE_A</MsgSubTyp>                  
            <PrcsingPrty>5</PrcsingPrty>                  
            <SndTPQualCD>ZZ</SndTPQualCD>                 
            <SndTP>FSCS</SndTP>                           
            <RcvTPQualCD>ZZ</RcvTPQualCD>                 
            <RcvTP>EIB</RcvTP>                            
            <SndSrc>YANTRA</SndSrc>                       
            <RcvSrc>EIB</RcvSrc>                          
            <UsrID>VAR</UsrID>                            
        </FXNHdrLp>                                       
        <ProdRcptHdrLp>                                   
            <ShpID>VAR20070612NCHIC1</ShpID>              
            <ShpTyp> </ShpTyp>                            
            <ShpActnCD>00</ShpActnCD>                     
            <InTransMrgTyp> </InTransMrgTyp>              
            <ShpVolUOM>CI</ShpVolUOM>                     
            <ShpWgtUOM>LB</ShpWgtUOM>                     
            <ShpTotVol>310022.00</ShpTotVol>              
            <ShpTotWgt>861.00</ShpTotWgt>                 
            <DtTmLp>                                      
                <DtTyp>050</DtTyp>                        
                <DtTmQual>501</DtTmQual>                  
                <DtTm>2007-06-12T15:07:41-04:00</DtTm>    
            </DtTmLp>                                     
            <AdrLp>                                       
                <EntTyp>RC</EntTyp>                       
                <EntIDQual>93</EntIDQual>                 
                <EntID>NCHIC</EntID>                      
                <EntNm>NCHIC</EntNm>                      
                <AutoCrtTrdPar>0</AutoCrtTrdPar>          
                <AutoCrtTrdParRole>0</AutoCrtTrdParRole>  
                <AutoUpdtTrdPar>0</AutoUpdtTrdPar>        
            </AdrLp>                                      
            <ProdRcptTptLp>                               
                <TptIDQual>BOL</TptIDQual>                
                <TptSCAC> </TptSCAC>                      
                <TptID> </TptID>   
    Thanks and Best Regards
    Sitaraman

    You could try to use the following coding:
    *& Report  ZUS_SDN_UC_XML_TO_UTF8_TRANSF
    REPORT  zus_sdn_uc_xml_to_utf8_transf.
    define local data
    CONSTANTS:
      gc_encoding           TYPE string VALUE 'UTF-8'.
    DATA:
      gd_result             type string,
      go_ixml               TYPE REF TO if_ixml,
      go_stream_factory     TYPE REF TO if_ixml_stream_factory,
      go_encoding           TYPE REF TO if_ixml_encoding,
      go_resstream          TYPE REF TO if_ixml_ostream.
    DATA:
      gt_knb1    TYPE STANDARD TABLE OF knb1,
    gd_xml     TYPE string,
      gt_xml     TYPE TABLE OF string.
    START-OF-SELECTION.
      SELECT * FROM knb1 INTO TABLE gt_knb1 UP TO 10 ROWS
          WHERE bukrs = '1000'.
      go_ixml = cl_ixml=>create( ).
      go_stream_factory = go_ixml->create_stream_factory( ).
      go_encoding = go_ixml->create_encoding( character_set = gc_encoding
                                            byte_order = 0 ).
      go_resstream =
                  go_stream_factory->create_ostream_cstring( gd_result ).
      CALL METHOD go_resstream->set_encoding
        EXPORTING
          encoding = go_encoding.
    XML Transformieren
      CALL TRANSFORMATION id_indent
        SOURCE     itab = gt_knb1
        RESULT XML go_resstream.
      APPEND gd_result TO gt_xml.
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
         BIN_FILESIZE              =
          filename                  = 'C:\temp\xml_to_utf8.txt'
         FILETYPE                  = 'ASC'
         APPEND                    = SPACE
         WRITE_FIELD_SEPARATOR     = SPACE
         HEADER                    = '00'
         TRUNC_TRAILING_BLANKS     = SPACE
         WRITE_LF                  = 'X'
         COL_SELECT                = SPACE
         COL_SELECT_MASK           = SPACE
         DAT_MODE                  = SPACE
         CONFIRM_OVERWRITE         = SPACE
         NO_AUTH_CHECK             = SPACE
         CODEPAGE                  = SPACE
         IGNORE_CERR               = ABAP_TRUE
         REPLACEMENT               = '#'
         WRITE_BOM                 = SPACE
         TRUNC_TRAILING_BLANKS_EOL = 'X'
       IMPORTING
         FILELENGTH                =
        CHANGING
          data_tab                  = gt_xml
        EXCEPTIONS
          file_write_error          = 1
          no_batch                  = 2
          gui_refuse_filetransfer   = 3
          invalid_type              = 4
          no_authority              = 5
          unknown_error             = 6
          header_not_allowed        = 7
          separator_not_allowed     = 8
          filesize_not_allowed      = 9
          header_too_long           = 10
          dp_error_create           = 11
          dp_error_send             = 12
          dp_error_write            = 13
          unknown_dp_error          = 14
          access_denied             = 15
          dp_out_of_memory          = 16
          disk_full                 = 17
          dp_timeout                = 18
          file_not_found            = 19
          dataprovider_exception    = 20
          control_flush_error       = 21
          not_supported_by_gui      = 22
          error_no_gui              = 23
          OTHERS                    = 24.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    END-OF-SELECTION.
    However, I like to mention that the file created from out ECC 5.0 (6.40, non-Unicode) contains a special character between the XML header and the data part (when displayed using NotePad Editor):
    ...xml version="1.0" encoding="utf-8"?>[special character]<asx:abap xmlns:asx="http://www.sap.com/a...
    Using a HexEditor the special character (0x0A) is displayed as a dot.
    Also Check with FM - TREX_TEXT_TO_UTF8
    Reward Points if it is helpful
    Thanks
    Seshu

  • In PI how do I convert the XML payload (input) to a text file and send out

    I am extracting data from SAP and sending thru XI / PI to a file (non-sap system).
    On the receiving end, I need the file to be a text file, with one row for each "FTZ_Row concatenated_data" tag in the input.  It needs to be just a plain text file with no XML tags.
    Currently the file gets one record which matches exactly to the XML payload below.
    I want it to create a file that looks like this :
               CONCATENATED DATA 1
               CONCATENATED DATA 2
                012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12
    here is the payload going thru XI
      <?xml version="1.0" encoding="utf-8" ?>
    - <n0:FTZ_Concatenated_Row xmlns:n0="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" xmlns:prx="urn:sap.com:proxy:FI0:/1SAI/TAS0C0412CDBC3E782D0219:700:2008/06/25">
      <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
      <FTZ_Row concatenated_data="CONCATENATED DATA 2" />
      <FTZ_Row concatenated_data="012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12" />
      </n0:FTZ_Concatenated_Row>
    thanks
    jay

    thanks for the input but I am still having issues - I get an empty file when I use the content conversion option.
    My payload coming into XI is :
            <?xml version="1.0" encoding="utf-8" ?>
    - <n0:FTZ_Concatenated_Row xmlns:n0="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" xmlns:prx="urn:sap.com:proxy:FI0:/1SAI/TAS0C0412CDBC3E782D0219:700:2008/06/25">
    <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
    <FTZ_Row concatenated_data="CONCATENATED DATA 2" />
    <FTZ_Row concatenated_data="012345678912345678MAKTX-TEST LB 123123123123 01/02/2009 Z001WCHA9876543210.12" />
    </n0:FTZ_Concatenated_Row>
    Here is the layout of my data type - I am using the same for input & output
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone" targetNamespace="http://intel.com/xi/INTEL_PROCUREMENT/ForeignTradeZone">
       <xsd:complexType name="FTZ_Concatenated_Row">
          <xsd:sequence>
             <xsd:element name="FTZ_Row" maxOccurs="unbounded">
                <xsd:complexType>
                   <xsd:attribute name="concatenated_data" type="xsd:string" />
                </xsd:complexType>
             </xsd:element>
          </xsd:sequence>
       </xsd:complexType>
    </xsd:schema>
    I mapped these items :  FTZ_Concatenated_Row & FTZ_Row & concatenated_data
    I set up my content convesion with :
      recordset structure   FTZ_Row
    FTZ_Row.fieldSeparator     #
    FTZ_Row.endSeparator     'nl'
    I am not sure why the following row looks like this ??
        <FTZ_Row concatenated_data="CONCATENATED DATA 1" />
    I thought FTZ_Row would be one tag and "concatenated_data" would be another one.
    any help would be appreciated.
    I have read many entries/blogs/etc in SDN but and tried many different setups, but nothing is working.
    thanks

Maybe you are looking for

  • Dynamic file names on file based  processing

    Hi Experts we are doing file to file scenario using file based processing not on message based ( No Reposiitory Objects - No mapping , no interface objects ). we need to pickup the file name from the source directory and place it in the target direct

  • I updated to Lion. Now when I preview a document, there is no Save As button, it is either Save a version or duplicate. How do I get back my Save As button?

    I updated to Lion. Now when I preview a document that I have in Downloads or Documents and I want to Save As, when I go to File, instead of Save As, I now have Save Version, then when I click on that it says the document is locked, do I want to unloc

  • Navigation from destination a.b.c to a.b.d

    I'm using states as my waypoints. Problem is really simple. Navigation structure is something like this: a.b a.c a.d.a a.d.b a.d.c a.e a.f.a a.f.b a.f.c a.g Everything works fine if I'm navigation on 2nd level. From a.b to a.c, a.g to a.e works great

  • Java package Access Problem

    Hi i created 2 packages with different name 1st package package user.book; public class bookStore      public String departmentCode = "";      public String departmentName = "";      public bookStore ()           System.out.println("bookStore initial

  • Datapump error

    We are running Oracle 10.2.0.4 on RHEL 5.2 64bit (kernel is 2.6.18-92). We have a Windows share mounted on the machine using the cifs filesystem type. Data punp reports the following error: Export: Release 10.2.0.4.0 - 64bit Production on Wednesday,