How to parse Soap response of anytype structure

I have went through almost all url regarding this in stackoverflow but could not make it work even after following same steps,either getting property not found or arrayindex exception ,the response i am trying to parse is has below and this can contain 'n ' number of table data
anyType{
  schema=anyType{
  element=anyType{
  complexType=anyType{
  choice=anyType{
  element=anyType{
  complexType=anyType{
  sequence=anyType{
  element=anyType{
   };element=anyType{
   };element=anyType{
   };element=anyType{
   };element=anyType{
   };diffgram=anyType{
   NewDataSet=anyType{
   Table=anyType{
   RemMessage=ExeedDiscountLimitonInvoicedatedon05/03/2015forCSHAH,
  from3-LokhandwalaShowroom;InvM_Id=77693;DocType=3;PrmR_TypeId=3;PrmR_Id=1820;
anyone could parse this with considering multiple entries would be very useful,i have tried with one approach here Not able to parse the response getting Invalid array range: 5 to 5

I have went through almost all url regarding this in stackoverflow but could not make it work even after following same steps,either getting property not found or arrayindex exception ,the response i am trying to parse is has below and this can contain 'n ' number of table data
anyType{
  schema=anyType{
  element=anyType{
  complexType=anyType{
  choice=anyType{
  element=anyType{
  complexType=anyType{
  sequence=anyType{
  element=anyType{
   };element=anyType{
   };element=anyType{
   };element=anyType{
   };element=anyType{
   };diffgram=anyType{
   NewDataSet=anyType{
   Table=anyType{
   RemMessage=ExeedDiscountLimitonInvoicedatedon05/03/2015forCSHAH,
  from3-LokhandwalaShowroom;InvM_Id=77693;DocType=3;PrmR_TypeId=3;PrmR_Id=1820;
anyone could parse this with considering multiple entries would be very useful,i have tried with one approach here Not able to parse the response getting Invalid array range: 5 to 5

Similar Messages

  • How to compress SOAP response generated by weblogic 7.x web service??

    can anybody tell me how to compresse SOAP response generated by weblogic webservice before sending it to client. i have my handler chain to process that response but how to compress that response .My webservice generates response that contains lots of XML data ~25 mb size . it's taking time to reach it to client for that i wanted to compress it . How to do that?can anybody help me?
    Thanks........
    Rahul

    Answered on my own:
    Just have to use
    x_result = http_client->response->get_data( ).
    instead of
    x_result = http_client->response->to_xstring( ).
    Just don't knwo why the filesize is wrong also - but I can work with this image!

  • Parsing Soap Responses

    Hello,
    I am fairly new to CF and am trying to parse and then query a soap response from a third-party api. I have been able to get a response in xml format, but that is where I am stuck. Below the xml response I am getting an error that reads Element.LOGINRESPONSE.LOGINRESULT.XMLTEXT is undefined in LOGINXML.
    I realize my code is a mess, but I am just trying out various things. Does anyone have any insight how to get at the Login Response variable in my soap response so that I can query it?
    Thanks for any insight!!
    <!--- WSDL --->
    <cfset wsdl_url="http://somewebsite/sirewebsvc/sire.asmx?wsdl">
    <cftry>
        <!--- Compose SOAP message to send to Web Service--->
        <cfsavecontent variable="soap"><?xml version="1.0" encoding="UTF-8" ?>
             <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                 <soapenv:Body>
                     <Login xmlns="http://www.siretechnologies.com/">
          <LicenseKey>LicenseKey</LicenseKey>
          <Username>username</Username>
          <Password>password</Password>
          <LicenseType>2</LicenseType>
          <APIKey>APIKey</APIKey>
          <SiteKey></SiteKey>
          <CryptKey></CryptKey>
          <WebOnly>false</WebOnly>
        </Login>
                  </soapenv:Body>
              </soapenv:Envelope>
        </cfsavecontent>
            <!--- Invoke web service to send message--->
            <cfhttp url="#wsdl_url#" method="post" >
                <cfhttpparam type="header" name="content-type" value="text/xml">
                <cfhttpparam type="header" name="SOAPAction" value="http://www.siretechnologies.com/Login">
                <cfhttpparam type="header" name="content-length" value="#len(soap)#">
                <cfhttpparam type="header" name="charset" value="utf-8">
                <cfhttpparam type="xml" name="message" value="#trim(soap)#">
            </cfhttp>
    <p><cfoutput>#xmlFormat(cfhttp.fileContent)#</cfoutput> </p>
            <cfset MyXML = XmlParse(CFHTTP.FileContent)>
            XmlSearch(MyXML, "/LoginResponse/LoginResult/")
      <cfcatch type="any">
            <cfdump var="#cfcatch#">
        </cfcatch>
    </cftry>
    <cfsavecontent variable="XMLFile"><?xml version="1.0"?>
    <LoginResponse>
        <LoginResult>
      ???How do I get this from above, or make it a variable???
        </LoginResult>
    </LoginResponse>
    </cfsavecontent>
    <!--- Parse the XML --->
    <cfset MyXMLDoc = xmlParse(XMLFile) />
    <!--- Dump the XML --->
    <h2>Dump</h2>
    <cfdump var="#MyXMLDoc#">
    <cfset MyNodes = xmlSearch(MyXMLDoc,'/LoginResponse/LoginResult')>
    <cfoutput>
        <h2>Nodes</h2>
        <cfloop from="1" to="#arraylen(MyNodes)#" index="i">
            <!--- The array contents need to parsed so you can easily get at the child nodes children and attributes. --->
            <cfset LoginXML = xmlparse(MyNodes[i]) />
            <b>SessionKey:</b> #LoginXML.LoginResponse.LoginResult.xmltext#<br>
        </cfloop>
    </cfoutput>
    --->

    I think I figured it out. Thanks to all who helped!! If anyone is interested, this is how I retrieved the session key from my Soap response.
    <!--- WSDL --->
    <cfset wsdl_url="http://SOMEURL/sire.asmx?wsdl">
        <!--- Compose SOAP message to send to Web Service--->
        <cfsavecontent variable="soap"><?xml version="1.0" encoding="UTF-8" ?>
             <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                 <soapenv:Body>
                     <Login xmlns="http://www.siretechnologies.com/">
          <LicenseKey>LicKey</LicenseKey>
          <Username>user</Username>
          <Password>pass</Password>
          <LicenseType>2</LicenseType>
          <APIKey>API</APIKey>
          <SiteKey></SiteKey>
          <CryptKey></CryptKey>
          <WebOnly>false</WebOnly>
        </Login>
                  </soapenv:Body>
              </soapenv:Envelope>
        </cfsavecontent>
            <!--- Invoke web service to send message--->
            <cfhttp url="#wsdl_url#" method="post" >
                <cfhttpparam type="header" name="content-type" value="text/xml">
                <cfhttpparam type="header" name="SOAPAction" value="http://www.siretechnologies.com/Login">
                <cfhttpparam type="header" name="content-length" value="#len(soap)#">
                <cfhttpparam type="header" name="charset" value="utf-8">
                <cfhttpparam type="xml" name="message" value="#trim(soap)#">
            </cfhttp>
            <p><cfoutput>#xmlFormat(cfhttp.fileContent)#</cfoutput> </p>
            <cfset MyXml = XmlParse(cfhttp.fileContent)>
            <cfdump var="#MyXml#">
        <cfset responseNodes = xmlSearch(MyXml,"//*[ local-name() = 'LoginResponse' ]")>
         <cfdump var="#responseNodes#">
        <cfoutput>
    <cfloop from="1" to="#arraylen(responseNodes)#" index="i">
        <cfset TheXML = xmlparse(responseNodes[i])>
        <cfset SesKey = "#TheXML.LoginResponse.LoginResult.XmlText#">
        <b>SessionKey:</b> #TheXML.LoginResponse.LoginResult.XmlText#<br>
        <b>Session Key:#SesKey#
    </cfloop>
    </cfoutput>

  • Parsing SOAP response

    Hi all,
    I'm trying to parse a response to a SOAP request and am not quite sure how to do this. I see in all the examples on the web and in the books where the information being returned is a simple type or a complex type and you can use Response.getReturnValue() to access the data.
    Either something like,
    <SOAP-ENV:Body>
    <stockquoteresponse>
    <stockprice>123.45</stockprice>
    </stockquoteresponse>
    </SOAP-ENV:Body> or
    <SOAP-ENV:Body>
    <stockquoteresponse>
    <stock>
    <tickersymbol>XYZ</tickersymbol>
    <stockprice>123.45</stockprice>
    </stock>
    </stockquoteresponse>
    </SOAP-ENV:Body> In my case however i have multiple pieces of information coming back and I am not sure how to encapsulate it in an object and if that is not possible, how to read it. I am getting something like,
    <SOAP-ENV:Body>
    <stockquoteresponse>
    <tickersymbol>XYZ</tickersymbol>
    <stockprice>123.45</stockprice>
    </stockquoteresponse>
    </SOAP-ENV:Body> Is it possible to get access to the stockquoteresponse element and deserialize that into an object ? In the examples I have seen, it doesn't seem to be possible.
    Please help.

    There are standard APIs for reading SOAP message. e.g.
    http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXM.html
    If you try google you might find one approriate for you.

  • How to handle soap responses

    I am following this tutorial to handle SOAP responses but it does not work http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_6.html
    using code blew I am trying to parse the following soap response.
        <?xml version="1.0" encoding="utf-8"?>
        <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                         xmlns:s="library://ns.adobe.com/flex/spark"
                                         xmlns:mx="library://ns.adobe.com/flex/mx"
                                         xmlns:components="components.*"
                                         xmlns:hellos="services.hellos.*"
                                         height="957"  creationComplete="initApp()" >
                  <fx:Style source="Styles.css"/>
                  <fx:Script>
                            <![CDATA[
                                      import mx.controls.Alert;
                                      private namespace invesbot = "http://Services.com";
                                      use namespace invesbot;
                                      private namespace a = "http://schemas.xmlsoap.org/soap/envelope/";
                                      private namespace b = "http://www.w3.org/2001/XMLSchema";
                                      private namespace c = "http://www.w3.org/2001/XMLSchema-instance";
                                      use namespace a;
                                      use namespace b;
                                      use namespace c;
                                      [Bindable]
                                      var _result:*
                                      private function initApp():void
                                                myService.mycustomers();
                            ]]>
                  </fx:Script>
                  <fx:Declarations>
                            <mx:WebService id="myService" wsdl="http://localhost:8081/WebServiceTest/services/Hellos?wsdl"
                                                             showBusyCursor="true"
                                                             fault="Alert.show(event.fault.faultString), 'Error'">
                                      <mx:operation name="mycustomers" resultFormat="e4x">
                                                <mx:request>
                                                </mx:request>
                                      </mx:operation>
                            </mx:WebService>
                  </fx:Declarations>
        <mx:HBox>
                            <mx:Text
                                      text="{myService.mycustomers.lastResult.mycustomersReturn.name}"
                                      />
                  </mx:HBox>
        </s:Application>
    The SOAP response is as following
        <?xml version="1.0" encoding="UTF-8"?>
        <soapenv:Envelope
          xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <soapenv:Body>
            <mycustomersResponse xmlns="http://Services.com">
              <mycustomersReturn>
                <age>28</age>
                <name>John</name>
              </mycustomersReturn>
              <mycustomersReturn>
                <age>29</age>
                <name>Alex</name>
              </mycustomersReturn>
              <mycustomersReturn>
                <age>30</age>
                <name>Jack</name>
              </mycustomersReturn>
            </mycustomersResponse>
          </soapenv:Body>
        </soapenv:Envelope>
    Using the above code the output will be
        <name xmlns="http://Services.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">John</name>
        <name xmlns="http://Services.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Alex</name>
        <name xmlns="http://Services.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Jack</name>
    but when I use the following code to put the result in dropdown box it gives the following error
        <s:FormItem label="Employee:">
                            <s:DropDownList id="dropDownList3"
                                                                    labelField="name"
                                                                    dataProvider ="{myService.mycustomers.lastResult.mycustomersReturn}"/>
                  </s:FormItem>
    TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@106e9af1 to mx.collections.IList.

    Hi Ashish,
    You can use Catch All error handler within scope of InvokeService action. By specifying SOAP Fault variable name there, response soap fault will be populated in variable.
    In 11g(As per observation), split joins are strict towards definition of input and output message based on WSDL of target service which causes exception for invalidMessage in InvokeService action.
    Hope this helps.

  • How to parse SOAP XML output and load to oracle9i table

    Below is the SOAP output response and I need to load the data into oracle 9i database tables.
    I am able to parse regular XML without namespaces but unable to parse the data with namespaces.
    I would need help in parsing this XML.
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <s:Header>
    <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <u:Timestamp u:Id="_0">
    <u:Created>2011-11-04T23:16:08.437Z</u:Created>
    <u:Expires>2011-11-04T23:21:08.437Z</u:Expires>
    </u:Timestamp>
    </o:Security>
    </s:Header>
    <s:Body>
    <AssetGetListResponse xmlns="http://dev.services.xerox.com">
    <AssetGetListResult xmlns:a="http://schemas.datacontract.org/2004/07/Xerox.MPS" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <a:AssetFeed>
    <a:AccountID>de5862bf-f223-e011-bd3b-0024e861b15c</a:AccountID>
    <a:AccountName>MPS-API Sandbox</a:AccountName>
    <a:AssetID>ecf1545a-f1e9-e011-8a8a-0024e861b15c</a:AssetID>
    <a:AssetNumber>57119B28</a:AssetNumber>
    <a:AssetTag3rdParty i:nil="true"/>
    <a:ChargebackCodeID>1a5962bf-f223-e011-bd3b-0024e861b15c</a:ChargebackCodeID>
    <a:ContractNumber i:nil="true"/>
    <a:ContractTypeDescription i:nil="true"/>
    <a:ControlID i:nil="true"/>
    <a:Group i:nil="true"/>
    <a:GroupID i:nil="true"/>
    <a:InScope>false</a:InScope>
    <a:MACAddress>0000AA713E97</a:MACAddress>
    <a:Manufacturer>Xerox</a:Manufacturer>
    <a:Model>WorkCentre Pro 265</a:Model>
    <a:ModifiedDate>2011-11-02T16:52:12.947Z</a:ModifiedDate>
    <a:PricePlanID>c25a62bf-f223-e011-bd3b-0024e861b15c</a:PricePlanID>
    <a:SerialNumber>UTU101993N</a:SerialNumber>
    <a:VersionNumber>634558495329470000</a:VersionNumber>
    </a:AssetFeed>
    <a:AssetFeed>
    <a:AccountID>de5862bf-f223-e011-bd3b-0024e861b15c</a:AccountID>
    <a:AccountName>MPS-API Sandbox</a:AccountName>
    <a:AssetID>b33b5160-f1e9-e011-8a8a-0024e861b15c</a:AssetID>
    <a:AssetNumber>7EE42ADC</a:AssetNumber>
    <a:AssetTag3rdParty i:nil="true"/>
    <a:ChargebackCodeID>1a5962bf-f223-e011-bd3b-0024e861b15c</a:ChargebackCodeID>
    <a:ContractNumber i:nil="true"/>
    <a:ContractTypeDescription i:nil="true"/>
    <a:ControlID i:nil="true"/>
    <a:Group i:nil="true"/>
    <a:GroupID i:nil="true"/>
    <a:InScope>false</a:InScope>
    <a:MACAddress>0800379B4C2A</a:MACAddress>
    <a:Manufacturer>Xerox</a:Manufacturer>
    <a:Model>WorkCentre 7428</a:Model>
    <a:ModifiedDate>2011-11-02T16:52:14.383Z</a:ModifiedDate>
    <a:PricePlanID>c25a62bf-f223-e011-bd3b-0024e861b15c</a:PricePlanID>
    <a:SerialNumber>PBB015012</a:SerialNumber>
    <a:VersionNumber>634558495343830000</a:VersionNumber>
    </a:AssetFeed>
    </AssetGetListResult>
    </AssetGetListResponse>
    </s:Body>
    </s:Envelope>
    This is what I tried.
    declare
    lp_parser xmlParser.Parser;
    lx_xmldoc xmlDom.DOMDocument;
    ln_doc_node xmlDom.DOMNode;
    lnl_product xmlDom.DOMNodeList;
    lnl_meter xmlDom.DOMNodeList;
    ln_product xmlDom.DOMNode;
    ln_meter xmlDom.DOMNode;
    li_product_cnt NUMBER;
    li_product_max NUMBER;
    li_meter_cnt NUMBER;
    li_meter_max NUMBER;
    lnl_asset_meter_nodes xmldom.DOMNodeList;
    ln_asset_meter_node xmldom.DOMNode;
    ls_batch_number VARCHAR2(30);
    ldt_proc_dt DATE;
    ls_batch_item VARCHAR2(30);
    ls_place_id place.place_id%TYPE;
    ls_product_id product.product_id%TYPE := ' ';
    ls_contract_id contract.contract_id%TYPE;
    li_contract_version contract.contract_version%TYPE;
    li_contract_sequence contr_product.sequence%TYPE;
    ls_meter_id meter_log.meter_id%TYPE;
    ls_read_type meter_log.read_type%TYPE;
    ldt_reading_dt meter_log.reading_dt%TYPE;
    li_meter_value meter_log.meter_value%TYPE;
    li_adjust_copies meter_log.meter_value%TYPE;
    ls_meter_type VARCHAR2(20);
    ls_serial_id product.serial_id%TYPE;
    ls_meter_read_type VARCHAR2(50);
    invalid_parsing EXCEPTION;
    PRAGMA EXCEPTION_INIT(invalid_parsing, -20100);
    BEGIN
    FOR meter_xml_rec IN (SELECT SOAP_RESPONSE
    FROM temp_table
    WHERE call_id=2) LOOP
    lp_parser := xmlparser.newParser;
    xmlparser.parseClob(lp_parser, meter_xml_rec.SOAP_RESPONSE);
    lx_xmldoc := xmlparser.getDocument(lp_parser);
    xmlparser.freeParser(lp_parser);
    ln_doc_node := xmlDom.makeNode(lx_xmldoc);
    ls_batch_number := xslProcessor.valueOf(ln_doc_node, 'AssetGetListResponse/AssetGetListResult/AssetFeed/AccountID');
    lnl_product := xslprocessor.selectNodes(ln_doc_node, 'AssetGetListResponse/AssetGetListResult/a:AssetFeed');
    li_product_max := xmlDom.getLength(lnl_product)-1;
    FOR li_product_cnt IN 0..li_product_max LOOP
    ln_product := xmlDom.item(lnl_product, li_product_cnt);
    ls_batch_item := xslProcessor.valueOf(ln_product, 'AccountName');
    END LOOP;
    END LOOP;
    END;
    OUTPUT:
    =========================================
    3:32:41 PM *
    **3:32:41 PM ORA-20100: Error occurred while processing: Namespace prefix 'a' used but not declared.**
    3:32:41 PM ORA-06512: at "SYS.XSLPROCESSOR", line 22
    3:32:41 PM ORA-06512: at "SYS.XSLPROCESSOR", line 502
    3:32:41 PM ORA-06512: at line 50
    3:32:41 PM *** Script stopped due to error ***
    3:32:41 PM End SQL Editor Execution

    Hi,
    Something like this :
    lnl_product := xslprocessor.selectNodes(
                     ln_doc_node
                   , '/s:Envelope/s:Body/AssetGetListResponse/AssetGetListResult/a:AssetFeed'
                   , 'xmlns:s="http://schemas.xmlsoap.org/soap/envelope/", xmlns="http://dev.services.xerox.com", xmlns:a="http://schemas.datacontract.org/2004/07/Xerox.MPS"'
    li_product_max := xmlDom.getLength(lnl_product)-1;
    FOR li_product_cnt IN 0..li_product_max LOOP
      ln_product := xmlDom.item(lnl_product, li_product_cnt);
      ls_batch_item := xslProcessor.valueOf(ln_product, 'a:AccountName', 'xmlns:a="http://schemas.datacontract.org/2004/07/Xerox.MPS"');
    END LOOP;
    ...Or, using a single query :
    SQL> SELECT extractValue(value(x), '/AssetFeed/AccountID', 'xmlns="http://schemas.datacontract.org/2004/07/Xerox.MPS"') as AccountID
      2       , extractValue(value(x), '/AssetFeed/AccountName', 'xmlns="http://schemas.datacontract.org/2004/07/Xerox.MPS"') as AccountName
      3       , extractValue(value(x), '/AssetFeed/AssetID', 'xmlns="http://schemas.datacontract.org/2004/07/Xerox.MPS"') as AssetID
      4       , extractValue(value(x), '/AssetFeed/AssetNumber', 'xmlns="http://schemas.datacontract.org/2004/07/Xerox.MPS"') as AssetNumber
      5       , extractValue(value(x), '/AssetFeed/SerialNumber', 'xmlns="http://schemas.datacontract.org/2004/07/Xerox.MPS"') as SerialNumber
      6  FROM temp_table t
      7     , TABLE(
      8         XMLSequence(
      9           EXTRACT(
    10             XMLType(t.soap_response)
    11           , '/s:Envelope/s:Body/AssetGetListResponse/AssetGetListResult/a:AssetFeed'
    12           , 'xmlns:s="http://schemas.xmlsoap.org/soap/envelope/", xmlns="http://dev.services.xerox.com", xmlns:a="http://schemas.datacontract.org/2004/07/Xerox.MPS"'
    13           )
    14         )
    15       ) x
    16  WHERE t.call_id = 2
    17  ;
    ACCOUNTID                                      ACCOUNTNAME           ASSETID                                   ASSETNUMBER    SERIALNUMBER
    de5862bf-f223-e011-bd3b-0024e861b15c           MPS-API Sandbox       ecf1545a-f1e9-e011-8a8a-0024e861b15c      57119B28       UTU101993N
    de5862bf-f223-e011-bd3b-0024e861b15c           MPS-API Sandbox       b33b5160-f1e9-e011-8a8a-0024e861b15c      7EE42ADC       PBB015012

  • How do i return a CDATA section in a SOAP response?

    hi,
    i am relatively new to SOAP/web services. but i know what i want ;-). i naively thought that i could simply send a CDATA wrapped string in a SOAP response by simply doing SOAPElement.addTextNode("<![CDATA[..."). of course, WLS 8.1's javax.xml.soap implementation escapes the <pre>"<" & ">"</pre> as <pre>"<" and ">"</pre> in the response.
    IF i could use the saaj 1.2 implementation, i would do something along the lines of the following to return a CDATA section in a SOAP response :
    <pre>  
       org.w3c.dom.CDATASection myCDATASection ...;
       SOAPBodyElement myBodyElement ...;
       myBodyElement.appendChild(myCDATASection);
    </pre>
    or maybe even something like:
    <pre>
       String myCDATAString = "<![CDATA[...]]>";
    javax.xml.soap.SOAPBody soapBody = ...;
    javax.xml.parsers.DocumentBuilder builder = ...;
    org.xml.sax.InputSource.InputSource inputSource = ...;
    org.w3c.dom.Document document = builder.parse(inputSource);
    soapBody.addDocument(document);
    </pre>          
    but that is a BIG IF! of course, as i have learned after a lengthy trawl through this ng, WLS 8.1 uses its own implementation of the javax.xml.soap.* classes. in particular, weblogic's SOAPBody implementation is devoid of an addDocument(org.w3c.dom.Document) method. and SOAPBodyElement does not have an appendChild(org.w3c.dom.Node)
    please, can anybody fill me in on how to go about doing what i am trying to do using WLS 8.1's javax.xml.soap classes?
    many thanks

    if anybody else out there is also trying to do what i have described (return xml text in a soap response), the solution (told to me by my company's BEA rep) is to just add the raw xml text to the SOAPElement.addTextNode() and weblogic will do the right thing (namely, escape whatever needs to be escaped).
    i had been lead to believe that you couldn't send entity refs (<pre>< and ></pre>) in a soap response. i was told i needed to wrap my raw xml in a CDATA section. but actually i don't need a CDATA section after all for the response i need to return (xml text). contrary to what i was lead to believe by another developer, entity refs are not a problem in a soap response (according to BEA, anyway).

  • Error:SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server was unable to read request. --- There is an error in XML document (1, 447). --- Input string was not in a correct format.

    Hi All,
        We have a scenario of FTP-->PI---> Webservice.  While triggering the data in the FTP, it is failing in the PI with the below error
    SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server was unable to read request. ---> There is an error in XML document (1, 447). ---> Input string was not in a correct format.
    Can you please help?

    Hi Raja- It seems to be a data quality issue.
    Check for the value @ 1447 position in the xml message that you are trying to send to web service..
    may be a date filed/decimal value which is not in expected format.

  • How to attach files in soap response?

    IS there any way to attach a file in soap response? how to do that??:|

    Probably MTOM is what you need:
    http://edocs.bea.com/wls/docs100/webserv/jws.html#mtom
    But this is apparently not doable with ALSB (it would be supported just with regular web services):
    http://forums.bea.com/thread.jspa?threadID=300002302
    Note the file naming would need to be done by the SOAP client:
    http://www.jroller.com/gmazza/date/20071102 (Look at Steps #6 and #11 and Note # 7)
    HTH,
    Glen

  • How to Parse different HTTP response efficiently ... ?

    how to Parse different HTTP response efficiently ... ?

    1. Last time I helped you I didn't get any response back.
    2. How is this question related to Swing?
    3. Your question has too many details...
    4. No help for you.

  • How to parse a entire SOAP Message

    It seems that there is no API in JAXM for parse a entire SOAP Message.
    And how to set encoding of a SOAP Message?

    I can use Apache SOAP for parsing before. There is a class named
    Envelope that has a method unmarshall(Element). So I can parse
    SOAP message as a common DOM, then change to SOAP Message
    using unmarshall. But in JAXP/JAXM, there is no such a class to work.

  • How to retrieve SOAP Original Header from request and response

    Hi,
    Does anyone know how to retrieve SOAP original header from SOAP request and response? I surfed but I'm able to see only the retrieval of SOAP custom headers via BPM mediator. Can anyone please help me regarding this? Also Please tell me how to check the headers in the Enterprise Manager.

    HI Chandra,
    Thanks for your suggestions.
    But i think in my case we do not want to get the complete list. We still want to get only 100 items initially and then if the user would scroll down he/she would see more items. But we already need to know the total number of items for the purpose of showing a message to the user. For e.g. Total issues (515),  but the table would initially show only 100 and then another 100 after scroll. So setting the size litmit to max would not help.
    And to be able to use the $count you mentioned, we have to still make another oData service call which we do not want.
    But as i mentioned there is already a property named "__count" in the response of the bindItems() method call and i see that it has correct count but not sure how to retrieve it inside the controller. Thanks.
    Regards,
    Ashish

  • How can i custom the xml soap response in my ws?

    Hello there,
    Im developing a ws in weblogic 10.2 and i need to return a complex type soap response with a custom xml created by me... can any one give me an advice on how can i do that? Im not used to soap ws
    And i need to return a lot of info some times and some of them are ArrayList of an object. Like the info of a Client and all the contracts of this client (and the info of that contract)... a lot of xml element with childs.
    Thanx in advance for any help
    PS. I tried to post an xml as example but i couldnt do it using '{' code '}' tag 
    Edited by: mgaldames on 08-dic-2010 8:50

    Hi Riyaz,
    Thanks for your immediate response.
    Here is my requirement.
    I have created a ZTABLE with Field AUART and this table is maintain table using SM30.
    When I Press F4, it will giving the list of all the order types available in T003O table and can select one and I can proceed succussfully.
    But when using SM30 I need to give '*' in the column for AUART which is not available in T003O table.
    I need to save my entires for AUART with * also( The value "*" is not available in Check table T003O ).
    Please let me know how can I do this.
    Thanks in advance.

  • How to deal with complex SOAP responses when calling web services ???

    Hi all,
    I have an issue when calling a web service that returns a complex
    SOAP response message. With simple responses (e. g. array of strings) it
    worked.
    I created the PDF as an Interactive form with Livecycle Designer 8.2.
    The Javascript looks like this:
    var cURL = "http://blabla";
    var cTestString = "too";
    SOAP.wireDump=true;
    var response = SOAP.request(
         cURL: cURL,
         oRequest: {
              "http://blabla.com/:complete" : {
              arg0: cTestString
              cAction: "http://bla.com:50000/"
    var resp = response["http://blabla.com:serviceResponse"];
    console.println("lenght:"+resp.length);
    var myns = "http://blabla.com/namespace";
    for (var nItem in resp.return)
      console.println("" + nItem + " " + resp.return[nItem] );
         for (var ConceptView in resp.return[nItem])
           console.println("  "+resp.return[nItem].length);
           console.println("  "+ConceptView+" "+resp.return[nItem][ConceptView] );
           if (ConceptView == myns + ":Response")
              for (var item2 in resp.return[nItem][ConceptView]){
                  console.println("    "+item2+" "+resp.return[nItem][ConceptView][item2] );
    I call the service and when I realized that I do not find out the type of the object returned, I used the nested for-in-loops to iterate through it. But it seems that there is just one item in the Javascript object returned, although the SOAP message clearly shows that there are more than one item.
    Can you help me?
    One key problem when analyzing this issue is that I do not know at all
    the Javascript type of response. We suspected it might be an array, but it is not
    because the method .length returns "undefined". It would already be
    helpful to know at least the type of this object and to know callable
    methods and so on ...
    Best regards
    Christoph
    P.S. As mentioned I used Livecycle Designer 8.2 and displayed and
    debugged the document using Acrobat 9.

    Christoph,
    Firstly LiveCycle Designer 8.2 is still not supported to develop forms as per my knowledge. The latest version compatible for SAP Interactive Forms is ALD 8.0.
    There is a difference between Acrobat based forms and LiveCycle forms and based on your coding it looks to me  that you are trying to create a LiveCycle based form with coding of Acrobat which is not supported in LiveCycle Desginer, which is why you may be getting the error.
    I hope that does not confuse you, so may check this [link|http://www.acrobatusers.com/articles/2006/08/designer_or_forms/index.php] for some clear information on what point I was trying to make.
    Chintan

  • How to set XML character encoding for a SOAP response?

    Hi,
    We're using Oracle J2EE web services,
    and are quite happy with them.
    However, it's a problem that we need to have
    characters outside the standard English alphabet
    in our service responses. So far, we have not been
    able to find a way to specify what encoding to use.
    Our version (9.0.3 release) produces SOAP-responses
    without any encoding specification in the XML header.
    Any ideas?

    Hello,
    If you are using the "Paper Layout", check the Reports's "Before Report Value" property:
    Before Report Value :
    <meta http-equiv="Content-Type" content="text/html; charset=&Encoding">
    If you are using the "Web Layout", take a look to the document :
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_nls.htm#i1006142
    18.3 Specifying a Character Set in a JSP or XML File
    Regards

Maybe you are looking for

  • Error while creating template

    hello,  We have SCVMM 2012 R2 environment and  Hyper-v host  are added. I created a VM  on host machine and then its clone but jobs gets failed with following below error and this error am getting very frequently on scvmm server/ Error (2912) An inte

  • Error in installation of 64 bit 11g client on solaris sparc64 bit

    hi, i am getting below error while installing the 11g 64 bit client on solaris sparc 64 bit machine. following error is occurred while installing 64 bit oracle 11.2 client on Solaris 64-bit sparcv9 OS: Error in invoking target 'mkldflags ntcontab.o n

  • Where is the 'Watch Folders' option in PSE 9 Organizer for Mac?

    I'm sure it's right in front of my face, but I can't find it. Thanks!

  • Urgent: How to map existing java classes

    I created an IDL file where I want to use java.sql.ResultSet. The line is: module CMS { interface Comm { ResultSet search(in string searchString); The ResultSet has to be the ResultSet as in java.sql.ResultSet. I tried to add the following code: modu

  • PE 9 will not load after installing Elements 10

    Installed Elements 10 on Vista 64-bit.  Did not uninstall Elements 9.  Now PE 9 will not load; get window Adobe Premiere Elements.exe - No Disk.  There is no disk in the drive. Please insert a disk into drive\Harddisk2\DR2.  Tried disk 2 of 3 from pa