Webservices - formatting xml

hi-
below is my code sample. i can return a response from webservice to my text field but i cant filter out the parts i dont need.
this is what it returns. as you will see with my code below i cant filter what i need.
thanks for any assistance on how i can filter that data.
3rdshiftcoder
<GetWeatherByZipCodeResponse xmlns="http://www.webservicex.net" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <GetWeatherByZipCodeResult>
    <Latitude>33.3291245</Latitude>
    <Longitude>111.9943</Longitude>
    <AllocationFactor>0.008745</AllocationFactor>
    <FipsCode>04</FipsCode>
    <PlaceName>PHOENIX</PlaceName>
    <StateCode>AZ</StateCode>
    <Details>
      <WeatherData>
        <Day>Saturday, May 09, 2009</Day>
        <WeatherImage>http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
        <MaxTemperatureF>103</MaxTemperatureF>
        <MinTemperatureF>70</MinTemperatureF>
        <MaxTemperatureC>39</MaxTemperatureC>
        <MinTemperatureC>21</MinTemperatureC>
      </WeatherData>
      <WeatherData>
        <Day>Sunday, May 10, 2009</Day>
        <WeatherImage>http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
        <MaxTemperatureF>101</MaxTemperatureF>
        <MinTemperatureF>67</MinTemperatureF>
        <MaxTemperatureC>38</MaxTemperatureC>
        <MinTemperatureC>19</MinTemperatureC>
      </WeatherData>
etc...
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute"
creationComplete="userRequest.GetWeatherByZipCode()">
<mx:WebService id="userRequest"
        wsdl="http://www.webservicex.net/WeatherForecast.asmx?wsdl"
        useProxy="false">
        <mx:operation name="GetWeatherByZipCode" resultFormat="e4x"
        fault="mx.controls.Alert.show(event.fault.faultString)"
        result="remotingCFCHandler(event)">
            <mx:request>
                <ZipCode>85044</ZipCode>
            </mx:request>
        </mx:operation>
    </mx:WebService>
<mx:Form x="22" y="10" width="493">
<mx:HBox>
<mx:Label text="zipcode"/>
<mx:TextInput id="zipcode" width="300" height="500" />
</mx:HBox>
<mx:Button label="Submit" click="clickHandler()"/>
</mx:Form>
<!--<mx:DataGrid id="dgUserRequest" x="22" y="128">
<mx:columns>
<mx:DataGridColumn headerText="zipcode" dataField="zipcode1"/>
<mx:DataGridColumn headerText="User Name" dataField="USERNAME"/>
</mx:columns>
</mx:DataGrid>-->
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
[Bindable] public var xmlResults:XML;
[Bindable] public var a:XMLList;
private function remotingCFCHandler(e:ResultEvent):void
//dgUserRequest.dataProvider = e.result;
zipcode.text = e.result.toString();  // returns document response found above
xmlResults= new XML(zipcode.text);
xmlResults.ignoreWhite = true;
var listResults:XMLList;
// listResults = xmlResults.GetWeatherByZipCodeResponse.GetWeatherByZipCodeResult.Details.WeatherData.Day;
// zipcode.text = "{ 'a': + listResults}";
//    ???? the above 2 commented lines dont filter my results. i thought those 2 lines would work.
private function clickHandler():void
   userRequest.GetWeatherByZipCode();
]]>
</mx:Script>
</mx:Application>

i cant figure out when i leave these lines commented out i can get data.
but when i apply the filter, i get
{ 'a': + listResults}
verbatim
now if i was to comment the following 3 lines this is what the data looks like
in the textinput control.
//var listResults:XMLList;
//listResults = xmlResults.GetWeatherByZipCodeResult.Details.WeatherData.MaxTemperatureF;
//zipcode.text = listResults;
data returned to textinput control with 3 lines commented out is below:
<GetWeatherByZipCodeResponse xmlns="http://www.webservicex.net" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <GetWeatherByZipCodeResult>
    <Latitude>33.3291245</Latitude>
    <Longitude>111.9943</Longitude>
    <AllocationFactor>0.008745</AllocationFactor>
    <FipsCode>04</FipsCode>
    <PlaceName>PHOENIX</PlaceName>
    <StateCode>AZ</StateCode>
    <Details>
      <WeatherData>
        <Day>Saturday, May 09, 2009</Day>
        <WeatherImage>http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
        <MaxTemperatureF>103</MaxTemperatureF>
        <MinTemperatureF>70</MinTemperatureF>
        <MaxTemperatureC>39</MaxTemperatureC>
        <MinTemperatureC>21</MinTemperatureC>
      </WeatherData>
      <WeatherData>
        <Day>Sunday, May 10, 2009</Day>
        <WeatherImage>http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
        <MaxTemperatureF>101</MaxTemperatureF>
        <MinTemperatureF>67</MinTemperatureF>
        <MaxTemperatureC>38</MaxTemperatureC>
        <MinTemperatureC>19</MinTemperatureC>
      </WeatherData>
      <WeatherData>
        <Day>Monday, May 11, 2009</Day>
        <WeatherImage>http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
        <MaxTemperatureF>102</MaxTemperatureF>
        <MinTemperatureF>68</MinTemperatureF>
        <MaxTemperatureC>39</MaxTemperatureC>
        <MinTemperatureC>20</MinTemperatureC>
      </WeatherData>
      <WeatherData>
        <Day>Tuesday, May 12, 2009</Day>
        <WeatherImage>http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
        <MaxTemperatureF>102</MaxTemperatureF>
        <MinTemperatureF>69</MinTemperatureF>
        <MaxTemperatureC>39</MaxTemperatureC>
        <MinTemperatureC>21</MinTemperatureC>
      </WeatherData>
      <WeatherData>
        <Day>Wednesday, May 13, 2009</Day>
        <WeatherImage>http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
        <MaxTemperatureF>100</MaxTemperatureF>
        <MinTemperatureF>68</MinTemperatureF>
        <MaxTemperatureC>38</MaxTemperatureC>
        <MinTemperatureC>20</MinTemperatureC>
      </WeatherData>
      <WeatherData>
        <Day>Thursday, May 14, 2009</Day>
        <WeatherImage>http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
        <MaxTemperatureF>100</MaxTemperatureF>
        <MinTemperatureF>68</MinTemperatureF>
        <MaxTemperatureC>38</MaxTemperatureC>
        <MinTemperatureC>20</MinTemperatureC>
      </WeatherData>
      <WeatherData>
        <Day>Friday, May 15, 2009</Day>
        <WeatherImage>http://forecast.weather.gov/images/wtf/few.jpg</WeatherImage>
        <MaxTemperatureF>101</MaxTemperatureF>
        <MinTemperatureF>67</MinTemperatureF>
        <MaxTemperatureC>38</MaxTemperatureC>
        <MinTemperatureC>19</MinTemperatureC>
      </WeatherData>
    </Details>
  </GetWeatherByZipCodeResult>
</GetWeatherByZipCodeResponse>

Similar Messages

  • How to convert well format xml in coldfusion?

    Hi,
    I am consuming asp.net webservice in coldfusion.It returns xml but it is not in wellformat.
    Please suggest me how to convert to well format xml.
    Advance Thanks,

    chandra12345 wrote:
    I am consuming asp.net webservice in coldfusion.It returns xml but it is not in wellformat.
    Please suggest me how to convert to well format xml.
    Technically speaking, a piece of text must be well-formed before it can be called an XML document. So you cannot yet say the returned text is XML.
    The first thing to do is to check whether it is. Use, for example, isXml(someString) to check whether someString is well-formed XML.
    There is no one standard way to convert text to well-formed XML. This is because there are infinitely many ways in which text can fail to be well-formed. The easiest solution for you will be to learn the rules for well-formed XML.
    Any elementary book on XML will teach you that. If you find books old-fashioned, then you could instead google well-formed xml .

  • Formatting XML written to a file

    Hi,
    I am trying to write runtime data (XML) to a file. I am doign the following to write to the file:
    public void saveFile() throws Exception {
    try {
    TransformerFactory transformerFactory =
    TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    DOMSource source = new DOMSource(doc);
    OutputStream output = new FileOutputStream(XMLFile);
    StreamResult result = new StreamResult();
    transformer.transform(source, result);
    output.flush();
    output.close();
    } catch (Exception x) {
    throw x;
    The output from the above code is a clutter of elements. All the elements are on the same line some times.
    1) How can I format the output? (Indent the elements in the file)
    Is there a way to achieve this?
    Sometimes, I see a square character at the end of some lines. I thought the output file is corrupt because of this character. But it does not seem to be a problem.
    2) How do I avoid this character?

    Duplicate of the following thread:
    Format XML data when writing to a file
    -Blaise

  • Using a CWM format XML as datastore; COM SDK to read the file and create Universe

    Hello everyone
    We are in the process of migrating from a metadata store to BusinessObjects Universe and the plan is to use Java/COM SDK to accomplish that. We have run into limitations with both the SDKs. Java SDK doesn't provide that facility and using COM SDK we are trying to read from a XML file (metadata in CWM format) and create the universe but so far haven't been successful. If the (Universe)Designer can read a CWM format xml file (say created from BODS) we are wondering why can't a customer made COM program do the same.
    Has anyone attempted this and been successful. Please acknowledge.
    Thanks

    I have written C#.NET code to build universes on the fly using the Designer SDK with no problems.  However, I wasn't using CWM formatted data to do this.
    I have two suggestions for you:
    1.  Since not all of the functionality in the Designer tool seems to be available through the SDK, can you parse the CWM xml file in your code and build the universe based on the data instead of trying have Designer build it?
    2.  Since you're using Java, you may get better answers by posting this question in the Java SDK Application Development space here:  http://scn.sap.com/community/bi-platform/java-sdk
    -Dell

  • How to fix iframe issue that displays XML values instead of formatted XML in IE11

    The following sub.jsp file shows the formatted XML properly as expected when is opened directly:
    <% response.setContentType("text/xml"); %>
    <book>
    <chapter1>chapter 1</chapter1>
    <chapter2>chapter 2</chapter2>
    </book>
    IE11 shows the result as below which are colored and can be collapsed or un-collapsed:
    <book><chapter1>chapter 1</chapter1><chapter2>chapter 2</chapter2></book>
    But if the sub.jsp is opened in an iframe from the below main.html, it only shows the values of the XML in the iframe:
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="ISO-8859-1">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <iframe src="sub.jsp"></iframe>
    </body>
    </html>
    The iframe shows only the XML values, i.e., chapter 1 chapter 2 in IE11. This issue does not happen in IE8.
    I appreciate to your if you know how to address this issue.
    Regards, Amir

    The following sub.jsp file shows the formatted XML properly as expected when is opened directly:
    <% response.setContentType("text/xml"); %>
    <book>
    <chapter1>chapter 1</chapter1>
    <chapter2>chapter 2</chapter2>
    </book>
    IE11 shows the result as below which are colored and can be collapsed or un-collapsed:
    <book><chapter1>chapter 1</chapter1><chapter2>chapter 2</chapter2></book>
    But if the sub.jsp is opened in an iframe from the below main.html, it only shows the values of the XML in the iframe:
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="ISO-8859-1">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <iframe src="sub.jsp"></iframe>
    </body>
    </html>
    The iframe shows only the XML values, i.e., chapter 1 chapter 2 in IE11. This issue does not happen in IE8.
    I appreciate to your if you know how to address this issue.
    This issue is also posted at below link:
    https://social.msdn.microsoft.com/Forums/en-US/5b0692b4-d312-4797-9089-42c1029ac059/how-to-fix-iframe-issue-that-displays-xml-values-instead-of-formatted-xml-in-ie11?forum=iewebdevelopment
    Regards, Amir

  • How to send a Material Idoc in format XML to SQL Server DB?

    Hi,
    I am creating a Material Idoc in format XML and I need send the same to a SQL Server DB.
    In the transaction BD10 I create the XML Idoc, but the same is stored in the SAP Server and I need send this to an external SQL Server DB.
    Somebody knows how to send automatically the XML Idoc to a SQL Server DB?
    Thanks and regards!
    Edited by: marcosap on Nov 11, 2010 4:00 PM

    Hi,
    All your XML idoc will get store in App layer,you can ask your Unix expert to write the unix code to fetch these XML idoc files and transfer to destination based on time period set by conjob.
    This is simple & easy job for any UNIX expert.
    Regards
    Siva

  • How to change Un formatted XML to Formatted XML in SSRS ?

    Hi Friends,
    I have an issue with SSRS report when exporting it into xml , it's showing un formatted xml like below
    but my requirement is it has to show formatted xml like below
    Please help me with this issue,
    NOTE: here i am building reports on Cube.
    Thanks in advance.
    Naveen

    Hi NaveenMSBI,
    By default, the XML rendering extension does not display formatted textbox values. In this case, we can use the UseFormattedValue device information setting to make the XML rendering extension display textbox values formatted the same way they are formatted
    in report viewer or report designer preview.  When UseFormattedValue is set to true, the formatted value is used instead.
    You can specify UseFormattedValue directly on the URL against the ReportServer endpoint or in a SOAP request. This can also be configured as the default for all XML rendering extension by editing the RSReportServer.config file. 
    For the details, please refer to the links as follows:
    Passing Device Information Settings to Rendering Extensions
    XML Device Information Settings
    Hope this helps.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Weblogic-webservices-policy.xml

    hi,
    iam getting the following error in weblogic-webservices-policy.xml
    Referenced file (weblogic-webservices-policy.xml) contains errors (http://www.bea.com/ns/weblogic/webservice-policy-ref/1.0/webservice-policy-ref.xsd).
    weblogic-webservices-policy.xml containts the following lines of code:
    <?xml version='1.0' encoding='UTF-8'?>
    <webservice-policy-ref xmlns="http://www.bea.com/ns/weblogic/webservice-policy-ref" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/webservice-policy-ref http://www.bea.com/ns/weblogic/webservice-policy-ref/1.0/webservice-policy-ref.xsd"></webservice-policy-ref>
    can anybody suggest how to fix this error?
    thanks
    john

    Hi!
    I was looking for some information regarding the weblogic-webservices-policy.xml file and founf your post. Did you success to solve the problem with it?
    Greatly appreciate any inputs
    Sincerely
    J.

  • Export table to formatted xml

    I have an oracle table i have to export as formatted xml
    I really want the data to look like this : (and need to get rid of the cdata)
    <?xml version='1.0' ? XML_DATE = "2012-06-26 08:12:09 PM">
    <APPLICATION NAME = "XMLTESTING">
         <WEBPAGE>
              <PROJECT>
    <column1>ABC</column1>
    <column2>DEF</column2>
    <column3>GHI</column3>
    <column4>JKL</column4>
    <column5>MNO</column5>
    </PROJECT>
    <PROJECT>
    <column1>ABG</column1>
    <column2>DRF</column2>
    <column3>GLY</column3>
    <column4>JAL</column4>
    <column5>MPO</column5>
    </PROJECT>
    <PROJECT>
    <column1>BBC</column1>
    <column2>GEF</column2>
    <column3>LHI</column3>
    <column4>JCL</column4>
    <column5>MWO</column5>
    </PROJECT>
    </WEBPAGE>
    </APPLICATION>
    create table "XML_TESTING" (
    "column1" varchar2(50byte),
    "column2" varchar2(50byte),
    "column3" varchar2(50byte),
    "column4" varchar2(50byte),
    "column5" varchar2(50byte)
    INSERT into XML_TESTING values ('ABC','DEF','GHI','JKL','MNO');
    INSERT into XML_TESTING values ('ABG','DRF','GLY','JAL','MPO');
    INSERT into XML_TESTING values ('BBC','GEF','LHI','JCL','MWO');
    CREATE TABLE xml_cl(result CLOB);
    DECLARE
    ctxqry DBMS_XMLGEN.ctxHandle;
    result CLOB;
    BEGIN
    ctxqry := dbms_xmlgen.newContext('SELECT * FROM xml_testing');
    DBMS_XMLGEN.setRowTag(ctxqry,'APPLICATIO NAME = "XML TESTING"');
    --DBMS_XMLGEN.setMaxRows(ctxqry,5);
    DBMS_XMLGEN.setrowsettag(ctxqry,'WEBPAGE');
    LOOP
    result := DBMS_XMLGEN.getXML(ctxqry);
    EXIT WHEN
    DBMS_XMLGEN.getNumRowsProcessed(ctxqry)=0;
    INSERT INTO xml_cl VALUES(result);
    END LOOP;
    END;
    SELECT * FROM xml_cl
    THEN I EXPORT TO XML FROM HERE.
    this is how xml currently looks
    <?xml version='1.0' encoding='Cp1252' ?>
    <RESULTS>
         <ROW>
              <COLUMN NAME="RESULT"><![CDATA[<?xml version="1.0"?>
    <WEBPAGE>
    <APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
      <column1>ABC</column1>
      <column2>DEF</column2>
      <column3>GHI</column3>
      <column4>JKL</column4>
      <column5>MNO</column5>
    </APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
    <APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
      <column1>ABG</column1>
      <column2>DRF</column2>
      <column3>GLY</column3>
      <column4>JAL</column4>
      <column5>MPO</column5>
    </APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
    <APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
      <column1>BBC</column1>
      <column2>GEF</column2>
      <column3>LHI</column3>
      <column4>JCL</column4>
      <column5>MWO</column5>
    </APPLICATIO_x0020_NAME_x0020__x003D__x0020__x0022_XML_x0020_TESTING_x0022_>
    </WEBPAGE>
    ]]></COLUMN>
         </ROW>
    </RESULTS>
    hope someone can help.
    did alot of searching and reading and just cant find an answer
    thank you

    Use SQL/XML functions to build and serialize the document as CLOB in a single query :
    SQL> SELECT XMLSerialize(document
      2           XMLElement("APPLICATION",
      3             XMLAttributes('XMLTESTING' as "NAME")
      4           , XMLElement("WEBPAGE",
      5               XMLAgg(
      6                 XMLElement("PROJECT",
      7                   XMLForest("column1", "column2", "column3", "column4", "column5")
      8                 )
      9               )
    10             )
    11           )
    12           as clob
    13           indent --< for formatting purpose only
    14         )
    15  FROM xml_testing
    16  ;
    XMLSERIALIZE(DOCUMENTXMLELEMEN
    <APPLICATION NAME="XMLTESTING">
      <WEBPAGE>
        <PROJECT>
          <column1>ABC</column1>
          <column2>DEF</column2>
          <column3>GHI</column3>
          <column4>JKL</column4>
          <column5>MNO</column5>
        </PROJECT>
        <PROJECT>
          <column1>ABG</column1>
          <column2>DRF</column2>
          <column3>GLY</column3>
          <column4>JAL</column4>
          <column5>MPO</column5>
        </PROJECT>
        <PROJECT>
          <column1>BBC</column1>
          <column2>GEF</column2>
          <column3>LHI</column3>
          <column4>JCL</column4>
          <column5>MWO</column5>
        </PROJECT>
      </WEBPAGE>
    </APPLICATION>
    Then you can call DBMS_XSLPROCESSOR.CLOB2FILE to write the CLOB to a file, no need of an intermediate table.

  • Do you have examples of CSV Format XML that can handle relationshiptypes?

    Hi,
    I have created a Windows Computer extended class that, for the sake of the example, has an additional property
    ServerNameRow , and a relationship (selected via Single Instance Picker control)
    BusinessUnitCustomersListPickerClass_Relationship. (The Single Instance Picker selects the primary name field/property only)
    I want to import data via CSV, and/or PowerShell. Both need a Format XML file.
    I don't know what the syntax is for relationship BusinessUnitCustomersListPickerClass_Relationship.
    What I'd need is some examples, preferably of a non-extended class and of an extended class's format XML.

    http://blogs.technet.com/b/servicemanager/archive/2009/05/26/using-the-csv-import-feature.aspx
    At the bottom of that blog post is an attachment (CSVImport.docx). It contains all the information you'll need for constructing CSV imports, including examples.
    To import relationships, you'll need to define a type projection targeting the windows computer class that contains a component for your custom relationship type.
    Also note you should not use the extension class itself in your definition file or in the type projection definition. Just use the windows computer class. Don't worry..your extension class property will be recognized by the import process. Extensions
    to a class are different than inherited classes.

  • In Correct format XML Error Event

    wich Error Event ican use incorrect format xml. Like
    --------- XML------
    <data>
    <name>some name</name>
    <name>some name2
    </data>
    --------end of XML----
    above case wich error ican use

    there is no event for this I think, but you can use try ...catch :
    var urll:URLLoader=new URLLoader();
    urll.addEventListener(Event.COMPLETE,f1);
    function f1(evt:Event)
    try
      var xmlm:XML = XML(urll.data);
    catch (e:TypeError)
      trace("not well formed XML");
    urll.load(new URLRequest("isim.txt"));

  • XI, WebService Call, XML incoming request Umlauts go into "#"

    Hi
    we have following problem. We have WebService defined in XI.
    Request XML file comes from external system to call WebService, and in one of the fields there is German Umlaut character. But in XI Monitoring this Umlaut is changed into "#" character.
    How to achieve that Umltauts go as umlauts to message mapping?
    Thank you

    Hi Walczak,
        Try using a different encoding format for the XML message, which support the German Characters.
    Regards,
    Ravi Kanth Talagana

  • Format XML data when writing to a file

    Hi,
    I am trying to write runtime data (XML) to a file. I am doign the following to write to the file:
    public void saveFile() throws Exception {
    try {
    TransformerFactory transformerFactory =
    TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    DOMSource source = new DOMSource(doc);
    OutputStream output = new FileOutputStream(XMLFile);
    StreamResult result = new StreamResult();
    transformer.transform(source, result);
    output.flush();
    output.close();
    } catch (Exception x) {
    throw x;
    The output from the above code is a clutter of elements. All the elements are on the same line some times.
    1) How can I format the output? (Indent the elements in the file)
    Is there a way to achieve this?
    Sometimes, I see a square character at the end of some lines. I thought the output file is corrupt because of this character. But it does not seem to be a problem.
    2) How do I avoid this character?

    Also, I am planning on using xpath in conjunction with DOM. However I read on one of the websites not to use too many xpath queries. I am using jdk 1.5.
    Is it tight. My code might have to be run many times. Is the following ok?
    or should I eliminate xpath and do my own traversing. I am concerned about runtime performance if I have to continue to update the xml file frequently.
    public Element getMatchingNode(MyAttributes attr) throws Exception {
    try {
    File myFile = new File(XMLFile);
    if (myFile.exists()) {
    System.out.println(XMLFile + " File exists");
    XPathFactory factory = XPathFactory.newInstance();
    XPath xPath = factory.newXPath();
    InputSource inputSource =
    new InputSource(new FileInputStream(myFile));
    String matchingString = this.getMatchingString(attr);
    Element module =
    (Element)xPath.evaluate("/" + TEST_TAG +
    "/" +
    TEST_TAG2 +
    "/" +
    DETAIL +
    matchingString,
    inputSource,
    XPathConstants.NODE);
    return module;
    } else
    return null;
    } catch (Exception x) {
    throw x;
    private String getMatchingString(MyAttributes attrs){
    StringBuffer buffer = new StringBuffer();
    for (Enumeration e=attrs.keys(); e.hasMoreElements();){
    String attribute = (String)e.nextElement();
    String value = attrs.get(attribute);
    buffer.append("[@" + attribute + "=" + "'" + value + "']");
    return buffer.toString();
    }

  • Wordpad object in rtf format - XML publisher

    We are trying to insert a Wordpad OLE object(Printer Signature Escape code Sequence) in the xml template and trying to generate the xml report in rtf format. When we generate the report or preview in rtf format the inserted Object Contents are not displaying. Any one faced this issue in xml publisher.
    This is what I did.
    1.Open the XML template. In Word under Insert option Selected Object . Select the object type as Word Pad Object(In Create new Tab). Type somethinng.. I typed this as printer escapecode sequence ~(4B~(s1p53v0s
    2.Loaded the XML data and tried to preview in RTF format the Object disappears and nothing displays in the place of Obejct.
    When I preview in PDF format this displays. but PDF format is not supported by our troy printer.
    This is we are doing to get the signature with printer escape code. It would be great if any one have any alternatives?. They are not going to give the Signature as an image.

    This is the General XML forum.
    The homepage description says :
    Discussion of the general XML language, standards (XSLT, XQuery, XMLSchema, etc.) and application management issues, suggestions and tips.
    The BI Publisher forum is here :BI Publisher
    So please mark this post as answered and ask again over there.

  • JDev generated webservices encodes XML output from PL/SQL procedure

    I have a PL/SQL packaged procedure which takes some input parameters and produces one output parameter. The output parameter is of type CLOB and after the procedure has run, it contains a big piece of XML data.
    Using JDeveloper 10.1.3.1, I've published this packaged procedure as a webservice. The generated webservice is fine and works, except for one tiny little issue: the XML that is taken from the output parameter is encoded.
    Here is an example of the SOAP message that the webservice returns:
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="http://gbv0300u/GBV0300U.wsdl/types/"><env:Body><ns0:gbv0300uResponse
    Element><ns0:result><ns0:obvglijstOut> & gt;type>GBV0001& gt ;/type& lt;
    & gt;diensten& lt;
    & gt;dienst>some value& gt;/dienst& lt;
    & gt;/diensten& lt;
    </ns0:obvglijstOut></ns0:result></ns0:gbv0300uResponseElement></env:Body></env:Envelope>
    (I've manually added an extra space between the & and lt; or gt; to make sure a browser will not translate it into a < or >!)
    The contents of the <ns0:obvglijstOut> element are filled with the output parameter from the PL/SQL package.
    How can I change the generated webservice, so the output from the PL/SQL package is used as is instead of being encoded?

    Update: I've tested a bit more by adding some output statements to the java code that JDeveloper generated. I'm now 100% sure the PL/SQL code gives the XML data correctly to the webservice.
    At this moment my guess is that somewhere in the WSDL definition there is something that enables the encoding of the data. But I'm not sure.
    Any help is greatly appreciated.

Maybe you are looking for

  • Please help! -  mail with xml attachment

    hallo, i have posted this problem 2 weeks ago but nobody could give an antwort :( i don't know what is wrong. i try to send a xml file as attachment. but i get this error : javax.activation.UnsupportedDataTypeException: no object DCH for MIME type mu

  • How to add new line item to SO using BAPI_SALESORDER_CREATEFROMDAT2

    Hi, I have sales order A with 1 line item, now i want to add new line item with material x and quantity y to the existing sales order A using BAPI_SALESORDER_CREATEFROMDAT2. Line item no for new line item should be generated by SAP internally.Please

  • HR field unknown in selection screen

    Hi experts, Have a problem with selection screen for an HR report. Here's the code: selection-screen begin of block b2 with frame title text-002. parameters:   payid     like pc261-payid modif id spe. "pay identification select-OPTIONS:   s_payty for

  • Monitoring Active Alerts shows critical heartbeat failure while server is working

    details of the alert shows the reason is the computer can't be reached through an ICMP ping if do a  ping servname it uses the IPV6  and fails Why isn't it using IPv4? thanks N NM

  • Attribute missing in data model

    Hi, I recently created a Model project. The App module of the model project has an instance of a View Object. There is an attribute in the View Object that is of a custom type. In the UI project, when I refresh my data object, I am not seeing that pa