XML Element to string conversion returning null

Hi,
When i try to convert XML Element to string using toString() API, it returns something like [device: null] where device is element tag.
Code is as follows -
Document xmlDoc;
DOMParser parser = (DOMParser)Class.forName("org.apache.xerces.parsers.DOMParser").newInstance();
parser.setFeature( "http://apache.org/xml/features/dom/defer-node-expansion", true );
parser.parse(new InputSource(new StringReader(tableStr)));
xmlDoc = parser.getDocument();
Element root = xmlDoc.getDocumentElement();
NodeList nodeList = root.getElementsByTagName("device");
Element deviceNode = (Element)nodeList.item(nodeList.getLength()-1);
System.out.println(deviceNode.toString()); //prints [device: null] ????
System.out.println(deviceNode.getAttribute("ipAddress")); //prints correct ip address
Any idea why i am getting [device: null] when trying to convert Element to String though attribute value is retrieved.
Thanks,
Deepak

Hello ,
I want to get the root node (<ZTOP60_XML_TAG_STRUCTURE>
) of the following xml file .
<?xml version="1.0" encoding="utf-8"?>
<ZTOP60_XML_TAG_STRUCTURE>
     <MSGTYPE>NAPOBACK</MSGTYPE>
     <SNDPRN>657393485</SNDPRN>
     <RECEIVER/>
     <RCVPRN>GSOHUBDM1</RCVPRN>
     <PONUM/>
     <VENDCODE>0020040266</VENDCODE>
     <VENDUNS>002601768</VENDUNS>
     <PARTNERFUNC_WE>WE</PARTNERFUNC_WE>
     <PARTNERNUM_WE>C240</PARTNERNUM_WE>
     <LINE_ITEMS>
          <item>
               <ITEMNUM>00687</ITEMNUM>
               <POQTY>999999999.000</POQTY>
               <BOQTY>1.000</BOQTY>
               <GRQTY>7.000</GRQTY>
               <NETVAL>339.65</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>FE-26865-01</MATNUM>
               <MATDESC>PTR, T632, LEXMARK 5-BIN MAILBOX</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
          <item>
               <ITEMNUM>00178</ITEMNUM>
               <POQTY>999999999.000</POQTY>
               <BOQTY>1.000</BOQTY>
               <GRQTY>303.000</GRQTY>
               <NETVAL>18.62</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>FE-ZZYRG-01</MATNUM>
               <MATDESC>FDD,FDI-PC,1.44MB,3.5 ,HH</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
          <item>
               <ITEMNUM>00157</ITEMNUM>
               <POQTY>999999998.000</POQTY>
               <BOQTY>24.000</BOQTY>
               <GRQTY>303.000</GRQTY>
               <NETVAL>26.25</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>FE-25094-01</MATNUM>
               <MATDESC>MOUSE,PC,3BUT,,INTELLIMOUSE,PS2</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
          <item>
               <ITEMNUM>00881</ITEMNUM>
               <POQTY>999999999.000</POQTY>
               <BOQTY>1.000</BOQTY>
               <GRQTY>62.000</GRQTY>
               <NETVAL>368.80</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>FD-66515-01</MATNUM>
               <MATDESC>ITU MODULE ASM</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
          <item>
               <ITEMNUM>00223</ITEMNUM>
               <POQTY>999999999.000</POQTY>
               <BOQTY>1.000</BOQTY>
               <GRQTY>377.000</GRQTY>
               <NETVAL>459.28</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>FD-65336-01</MATNUM>
               <MATDESC>MAIN SYSTEM BOARD T23 (2647)</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
          <item>
               <ITEMNUM>00081</ITEMNUM>
               <POQTY>999999999.000</POQTY>
               <BOQTY>19.000</BOQTY>
               <GRQTY>810.000</GRQTY>
               <NETVAL>217.21</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>FD-64199-01</MATNUM>
               <MATDESC>QST- CADET 100</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
          <item>
               <ITEMNUM>00271</ITEMNUM>
               <POQTY>999999999.000</POQTY>
               <BOQTY>1.000</BOQTY>
               <GRQTY>136.000</GRQTY>
               <NETVAL>813.76</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>FD-60065-01</MATNUM>
               <MATDESC>SMART UPS 3000VA RM</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
          <item>
               <ITEMNUM>00791</ITEMNUM>
               <POQTY>999999999.000</POQTY>
               <BOQTY>1.000</BOQTY>
               <GRQTY>3.000</GRQTY>
               <NETVAL>201.73</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>3X-PBXGG-AA</MATNUM>
               <MATDESC>ATI 7500 PCI GRAPHICS</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
          <item>
               <ITEMNUM>00173</ITEMNUM>
               <POQTY>999999999.000</POQTY>
               <BOQTY>1.000</BOQTY>
               <GRQTY>32.000</GRQTY>
               <NETVAL>7.50</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>12-56178-01</MATNUM>
               <MATDESC>CARD GUIDE,SNAP-IN,LOW PROFILE,2.5 INCHE</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
          <item>
               <ITEMNUM>00309</ITEMNUM>
               <POQTY>999999998.000</POQTY>
               <BOQTY>15.000</BOQTY>
               <GRQTY>71.000</GRQTY>
               <NETVAL>51.23</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>30-51476-01</MATNUM>
               <MATDESC>VHDI-CABLE WIDE 12 FT. DT-AB001-TQ</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
          <item>
               <ITEMNUM>00194</ITEMNUM>
               <POQTY>999999999.000</POQTY>
               <BOQTY>1.000</BOQTY>
               <GRQTY>147.000</GRQTY>
               <NETVAL>345.48</NETVAL>
               <PLANT>C240</PLANT>
               <MATNUM>29-33689-01</MATNUM>
               <MATDESC>PTR,IMP9,B/W,PAR/SER,110/240,R</MATDESC>
               <PONUMBER>6500022388</PONUMBER>
               <EKGRP>U17</EKGRP>
               <DISPO>N07</DISPO>
          </item>
     </LINE_ITEMS>
</ZTOP60_XML_TAG_STRUCTURE>
I wrote the following lines of code ..
FTI .. >> String strMsg =((javax.jms.TextMessage)msg).getText();
StrMsg is a string that represents an xml file .
DocumentBuilderFactory docfactory = DocumentBuilderFactory.newInstance();
               DocumentBuilder builder = docfactory.newDocumentBuilder();
               Document doc = builder.parse(new InputSource(new StringReader(strMsg)));
               Element root = doc.getDocumentElement();
               System.out.println("The root is " + root);
               String strFileName = root+".xml" ;
               System.out.println("The file name is " + strFileName);
               File f = new File (strFileName);
               FileOutputStream fos = new FileOutputStream( f );
               for ( int j =0 ; j < strMsg.length(); j++)
                    char c = strMsg.charAt(j);
                    fos.write((int)c);
I am getting the following error ...
The root is [ZTOP60_XML_TAG_STRUCTURE: null]
The file name is [ZTOP60_XML_TAG_STRUCTURE: null].xml
Whey the file name or root is with special character [ ] and null ..
I want just ZTOP60_XML_TAG_STRUCTURE.xml .
Can anyone help me .
thanks
mahesh

Similar Messages

  • UCCX XPath on Get XML Document Data Step always returns null

    Hello,
    Can someone tell whats wrong with my XPath, because it always returns null. I have tried different variations and nothing. I'm using UCCX 7.0
    XML
    <?xml version="1.0" encoding="utf-8" ?>
    <GetManagersResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.labdomain.com/">
      <ClaimManagersList>
        <X_CLAIM_MANAGER>
          <ClaimManagerUserName>test</ClaimManagerUserName>
        </X_CLAIM_MANAGER>
      </ClaimManagersList>
    </GetManagersResult>
    XPATH
    "/descendant::GetManagersResult/child::ClaimManagersList/child::X_CLAIM_MANAGER/child::ClaimManagerUserName"
    During debug, this is the value of the xml document when it reaches the Get XML Document Data step:
    TEXT[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<GetManagersResult xmlns=\"http://www.labdomain.com/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n  <ClaimManagersList>\r\n    <X_CLAIM_MANAGER>\r\n      <ClaimManagerUserName>test</ClaimManagerUserName>\r\n    </X_CLAIM_MANAGER>\r\n  </ClaimManagersList>\r\n</GetManagersResult>]

    It's your XML namespace in the root element.
    First off, I have never seen the CRS Editor play nice when XML namespaces are involved.
    Secondly, with your namespace in place, not even a generic xpath expression tester can find your data.  See attachements.
    I think that if you find a way to either: not send, or remove the namespace from your document, your xpath expression will work.
    With Namespaces
    Without Namespaces

  • Get XML Document Data step always returns NULL

    Hi All,
    I was hoping someone might be able to help with this.
    I'm writing a holiday script, it uses XML to check whether the date is a holiday or halfday. XML below
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Holidays>
      <Holiday Date="1/1/2012">Holiday</Holiday>
      <Holiday Date="3/1/2012">Halfday</Holiday>
      <Holiday Date="6/1/2012">Holiday</Holiday>
      <Holiday Date="5/4/2012">Halfday</Holiday>
      <Holiday Date="6/4/2012">Holiday</Holiday>
      <Holiday Date="8/4/2012">Holiday</Holiday>
      <Holiday Date="9/4/2012">Holiday</Holiday>
      <Holiday Date="30/4/2012">Halfday</Holiday>
      <Holiday Date="1/5/2012">Holiday</Holiday>
      <Holiday Date="17/5/2012">Holiday</Holiday>
      <Holiday Date="27/5/2012">Holiday</Holiday>
      <Holiday Date="6/6/2012">Holiday</Holiday>
      <Holiday Date="23/6/2012">Holiday</Holiday>
      <Holiday Date="6/4/2012">Holiday</Holiday>
      <Holiday Date="3/11/2012">Halfday</Holiday>
      <Holiday Date="25/12/2012">Holiday</Holiday>
      <Holiday Date="26/12/2012">Holiday</Holiday>
      <Holiday Date="19/10/2012">Halfday</Holiday>
    </Holidays>
    However when I debug the script the result of the Get XML Document step always returns null.
    Xpath work great in notepad++
    My code is attached, anyone with any pointers?
    Regards,
    Andy

    Your XPATH of:
    "/Holidays/Holiday[@Date='+DateString+']"
    Needs to be:
    "/Holidays/Holiday[@Date='"+DateString+"']"
    Good luck and happy scripting!
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • Array(n elements) to string conversion

    i got some questions about data conversion:
    i have an array with n elements, witch i need to extract and convert to string in order to send data over udp vi. the problem is
    that the vi is getting pretty big and i'm starting to wonder about memory&cpu usage. So can anyone check
    this vi out and see if there is place for improvements.
    Attachments:
    array-string(6ch).vi ‏85 KB

    I've done some more changes and hidden most of the code in a sub-vi. I've also shown how to make the code scalable, in case you suddenly need to accomodate 7 or 10 inputs.
    In the new VI's, I've shown 2 different approaches to your code, but both are functionally equivalent.
    As far as performance, you can always gain a little boost by going to File --> VI Properties --> "Execution" and deselect "Allow Debuging".
    There might be other ways to optimize your code, but the thing you need to ask yourself is if this is really necessary.
    If you go to File --> VI Properties --> Memory
    you will see some "stats" for your current VI.
    The one you posted originally, has a memory footprint of ~117.5k... as for cpu-usage, unless you are working with a significantly bigger project, you do not need to worry about performance at all, unless you are on a very very old computer.
    That said, optimizing code is always important, and it is a very good way to learn, but sometimes one must be able to see when "enough is enough" and something is "good enough".
    For comparision, the new VI I made for you, which includes 2 examples/different ways of doing it, takes only ~56.7k... though I'm not sure if you need to add the sub_vi to this or if it is already added.. the sub-vi is ~23.7k total..
    Hope this helps you, and if someone else can take a look to see if there is any other obvious ways to optimize the code, then both me and the thread-owner will learn something more here.
    Project Engineer
    LabVIEW 2009
    Run LabVIEW on WinXP and Vista system.
    Used LabVIEW since May 2005
    Certifications: CLD and CPI certified
    Currently employed.
    Attachments:
    array-string(6ch) modified 2.vi ‏45 KB
    dbl_to_string_sub_vi.vi ‏19 KB

  • GetResourceAsStream(String name) return null

    Hi!
    jdk1.3
    I want to get InputStream from file. My code is:
    import java.util.*;
    import java.io.*;
    String path = new String("D:" + File.separator
                   + "my_project" + File.separator
                   + "test" + File.separator
                   + "classes" + File.separator + "test.properties");// I set absolute path to file It's necessary for me
    InputStream inputStream = getClass().getResourceAsStream(path);
    Properties prop = new Properties();
    prop.load(inputStream);
    The result is NullPointerException in last row.It's can not find resource. Why?
    Thank you

    Try FileInputStream

  • White spaces in XML element

    Hi...
      I need to put in an XML element the string value "      ", that is six white spaces, but when the XML parser interpets the document this value is transform like a null value.
      Is there some way to preserve this value in the element?

    Thanks for you replay Reddi,
      Let me explain the scenario: The scenario is RFC --> XI  --> JDBC, one of the element of the FM sometimes could be have the value "      ", when this occurrs in the SXMB_MONI TC I see the value null in the element, that is the tag is <Element />, in this case I need to preserve this white space in the element. The message could be something like this:
    <root>
      <element1>value 1</element1>
      <element2>value 2</element2>
      <element3>      </element3>
    </root> 
    but I see the message in this form:
    <root>
      <element1>value 1</element1>
      <element2>value 2</element2>
      <element3 />
    </root>
    In the message mapping tool I assign the string value "      " and the problem still the same.
      Any Idea?

  • EJBs cannot return null when used in Model?

    Hi,
    hopefully this question is in the right place.
    I´ve spent now a few days on tracking a single problem. I am trying to create an web dynpro application with the functionality contained in EJBs. One of my methods in a stateless SessionBean returns an object or null. This SessionBean is bound via model binding to the context of a component controller. Everything works fine as along as the method call returns an object, but if it does not (which is the usual case) the application throws an empty exception without any description. Thanks to this forum i checked the defaultTrace log and found this information:
    [EXCEPTION]
    {0}#1#java.lang.NullPointerException
         at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.setPropertiesForModelClass(EJBGenericModelClassExecutable.java:429)
         at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.fillReturnParameterToMc(EJBGenericModelClassExecutable.java:634)
         at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.execute(EJBGenericModelClassExecutable.java:135)
         at com.test.testprog.testprogwebdynpro.main.Main.doLogin(Main.java:243)
         at com.test.testprog.testprogwebdynpro.main.wdp.InternalMain.doLogin(InternalMain.java:213)
         at com.test.testprog.testprogwebdynpro.main.LoginView.onActionButtonEinloggen(LoginView.java:189)
         at com.test.testprog.testprogwebdynpro.main.wdp.InternalLoginView.wdInvokeEventHandler(InternalLoginView.java:139)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:131)
         at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:72)
         at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.doHandleActionEvent(ProcessingEventPhase.java:156)
         at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.execute(ProcessingEventPhase.java:91)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequestPartly(WindowPhaseModel.java:161)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doProcessRequest(WindowPhaseModel.java:109)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:96)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:469)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:52)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doExecute(ClientApplication.java:1431)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doProcessing(ClientApplication.java:1251)
         at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToApplicationDoProcessing(AbstractExecutionContextDispatcher.java:158)
         at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForAppProcessing.doService(DispatchHandlerForAppProcessing.java:35)
         at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.AbstractDispatchHandler.service(AbstractDispatchHandler.java:116)
         at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:93)
         at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToApplicationDoProcessing(ExecutionContextDispatcher.java:114)
         at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:81)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:507)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:527)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessingStandalone(ApplicationSession.java:458)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:249)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:699)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:231)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:231)
         at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToRequestManager(AbstractExecutionContextDispatcher.java:205)
         at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForRequestManager.doService(DispatchHandlerForRequestManager.java:38)
         at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.AbstractDispatchHandler.service(AbstractDispatchHandler.java:116)
         at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:93)
         at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToRequestManager(ExecutionContextDispatcher.java:140)
         at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:93)
         at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:105)
         at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)
         at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doPost(AbstractDispatcherServlet.java:61)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:66)
         at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:32)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:431)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:289)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:376)
         at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:85)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:160)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67)
         at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
         at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
         at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
         at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:309)
         at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.run(Processor.java:222)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
    The request has the cardinality 1..1, the response 0..1 and the return value 1..1. The last one cannot be changed.
    Is that correct that an EJB method call must return an valid object or do i have to change something in order to allow the return of null? Or is this a bug?
    Thanks for any answer in advance

    Hi,
    what are you returning? Objects or basic types? When the methods says it returns a string, a null object is no problem. Btw.  i cannot set the cardinality of the of the return node. It´s fixed as 1..1.
    My session bean looks so
    @Stateless(name="TestBean")
    @WebService
    public class TestBean implements TestLocal {
         public int add(int zahl1, int zahl2)
              return zahl1 + zahl2;
         public String concat(String text1, String text2)
              return text1.concat(text2);
         public String zeroString(String text1)
              return null;
         public User zeroUser(String text1)
              return null;
    The WDP Controller Method looks like this
      public void doejbtest( )  {
        //@@begin doejbtest()
           try
                IZeroStringRequestElement req = wdContext.currentZeroStringRequestElement();
                Request_TestLocal_zeroString obj = req.modelObject();
                req.setText1("test");
                obj.execute();
                wdComponentAPI.getMessageManager().reportWarning("String request was successful");
           catch(Exception e)
                wdComponentAPI.getMessageManager().reportException("String request failed");
                wdComponentAPI.getMessageManager().raisePendingException();
           try
                IZeroUserRequestElement req = wdContext.currentZeroUserRequestElement();
                Request_TestLocal_zeroUser obj = req.modelObject();
                req.setText1("test");
                obj.execute();
                wdComponentAPI.getMessageManager().reportWarning("User request was successful");
           catch(Exception e)
                wdComponentAPI.getMessageManager().reportException("User request failed");
                wdComponentAPI.getMessageManager().raisePendingException();
        //@@end
    The result of the call is
    Warning: String request was successful
    Error: User request failed
    The Cardinalities are:
    Request Cardinality : 1..1
    Response Cardinality : 0..1
    Return Cardinaliy : 1..1 (no value for the string, fixed for the user)

  • Can a Xquery return a concatenated string and an XML element

    Hi,
    My Xquery fucntion is shown below:
    It accepts 4 string parameters and an XML element i.e., $Message which is an XML element(request coming to the service) and i need to log all this information to a log file.
    I am using the below concat fucntion to get a concatenated string of all the parameters but, for $Message i m not able to get the XML payload. How to achieve the same in the Xquery?
    *$Message is the below XML file:*
    <payload>
    <aa>one</aa>
    <bb>two</bb>
    <cc>three</cc>
    </payload>
    My Xquery function is:
    declare function xf:XformLog($Name as xs:string,
    $id as xs:string,
    $Context as xs:string,
    $Annotation as xs:string,
    $Message as element(*))
    as xs:string {
    concat("Name = ",$Name," , ","Id = ",$id," , ","Message Context = ",$Context," , ","Annotation = ",$Annotation," , ","Event Message = ", data($Message/@* , $Message/node()))
    I am trying to achieve the following log:
    Name = xyz, Id = 111, Message Contact = abc, Annotation = ggg, Event Message = <payload>
    <aa>one</aa>
    <bb>two</bb>
    <cc>three</cc>
    </payload>
    How can i achieve the same. Please suggest.
    Thanks in advance.
    Edited by: user9223904 on Mar 18, 2013 3:16 AM

    Hi,
    You have to use a serialization function to convert the element instance to a string.
    Such functionality is not included in the XQuery standard but many implementors provide an extension to do so.
    For example, in OSB, you can use <tt>fn-bea:serialize()</tt>.
    What's your environment and XQuery engine?

  • Carriage Returns and Tabs in XML element

    I have a number of carriage returns and tabs within an xml element. When I take that element I would like it to transform to html in which I am then displaying within a JEditorPane. However, when I do this it is one long string. I have tried the xml:space="preserve" within that element and this still is not working.
    Here is part of the xml with the carriage return line feeds. The element that I am talking about is called pseudocode. You can see it is displayed correctly below.
    Design Document XML : <?xml version="1.0" encoding="ISO-8859-1"?><design-doc><title-page><title>Testing Document</title><class-prepared-for>Lloyd</class-prepared-for><authors>Ben Garbers</authors><date-created>September 23, 2004</date-created></title-page><introduction text="This is the introduction. This is the introduction."/><class-definitions><class-definition class-name="ClassOne" visibility="public" class-complexity="not complex"><global-variables><variable visibility="public" name="VariableOne" object="String" comments="This is a String."/><variable visibility="public" name="VariableTwo" object="Integer" comments="This is an Integer."/></global-variables><methods><method name="MethodOne" synopsis="This will do some things." purpose="public" visibility="public"><input-parms><variable visibility="null" name="firstName" object="String" comments="null"/></input-parms><output-parms><variable visibility="null" name="lastName" object="String" comments="null"/></output-parms><local-variables><variable visibility="null" name="age" object="int" comments="null"/></local-variables><pseudocode xml:space="preserve">/* Ensure that player name exist in the system*/
    if (player =null)
         NullPlayerException;
              if (NOT (isPlayerNameExist(player)))
                   throw PlayerNameNotExistException;
              /* Ensure player name exist in the team already*/
              i ? 1;
              while (i <= length(mPlayers)) {
                   if (mPlayers.mPlayerName != playerName)
                        throw PlayerNameNotExistInTeamException;
    this.mPlayers ? this.mPlayers - player;</pseudocode>
    However, when I do the transformation I get the following with the pseudocode:
    /* Ensure that player name exist in the system*/if (player =null)     NullPlayerException;          if (NOT (isPlayerNameExist(player)))               throw PlayerNameNotExistException;          /* Ensure player name exist in the team already*/          i ? 1;          while (i <= length(mPlayers)) {               if (mPlayers[i].mPlayerName != playerName)                    throw PlayerNameNotExistInTeamException;}this.mPlayers ? this.mPlayers - player;
    It looks like it adds some spaces but no carriage returns or line feeds.
    My transformation code is the following:
         public ParseFile(String xmlString) {
              try {
              //Here we will load the correct style sheet for the message
              //that will be formatted.
              String urlString = "DesignDocument.xsl";
              URL url = this.getClass().getResource(urlString);
              System.out.println("URL to style sheet = " + url.toString());
              String styleSheetName = url.getFile();
              System.out.println("Style sheet name : " + styleSheetName);
              InputStream styleSheetInputStream = this.getClass().getResourceAsStream(urlString);
              //We will than load our SAXParerFactory and parse the message.
              SAXParserFactory SPFactory = SAXParserFactory.newInstance();
              SPFactory.setValidating(true);
              SAXParser sp = SPFactory.newSAXParser();
              XMLReader sax2parser = sp.getXMLReader();
              //NO Validation done on for this because we do NOT have a DTD.
              sax2parser.setFeature(
                   "http://xml.org/sax/features/validation",
                   false);
              sax2parser.setContentHandler(new FileContentHandler());
              //we create a character array of the length of the xml message String
              char[] messageCharacterArray =
                   new char[xmlString.length()];
              // we then put the xml string into the character array.
              messageCharacterArray = xmlString.toCharArray();
              // after this ew end up creating a CharArrayReader that will be used by the Sax
              // parser to parse the xml.
              CharArrayReader xmlCharArrayReader =
                   new CharArrayReader(messageCharacterArray);
              // we put the xml character array within the Input Source which will then be parsed
              // by the Sax2 parser.
              InputSource in = new InputSource(xmlCharArrayReader);
              // Use a Transformer for outputting the message into our formatted xml using
              // the stylesheet defined up in a messages own sxl stylesheet file.
              TransformerFactory tFactory = TransformerFactory.newInstance();
              tFactory.setURIResolver(new BasicURIResolver());
              StreamSource stylesource = new StreamSource(styleSheetInputStream);
              Transformer transformer = tFactory.newTransformer(stylesource);
    //          transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    //          transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    //          Properties properties = new Properties();
    //          properties.setProperty("indent", "yes");
    //          properties.setProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    //          transformer.setOutputProperties(properties);
              // We will use a ByteArrayOutputStream to put our transformed xml.
              ByteArrayOutputStream bos = new ByteArrayOutputStream();
              StreamResult result = new StreamResult(bos);
              SAXSource source = new SAXSource(in);
              transformer.transform(source, result);
              String s = bos.toString();
              StringBuffer sb = new StringBuffer();
              //This will make sure the Version Line is not shown.
              BufferedReader br = new BufferedReader(new StringReader(s));
              String line = "";
              while ((line = br.readLine()) != null) {
                        sb.append(line);
              bos.close();
              br.close();
              formattedXmlString = sb.toString();
              System.out.println("--------------------------------");
              System.out.println(formattedXmlString);
              System.out.println("--------------------------------");
              } catch (Exception e) {
                   e.printStackTrace();
    I have been searching and trying to figure this out forever. Any help would be greatly appreciated. Bottom line is that I want carriage returns and tabs to work when transferring from the xml to xsl.

    I get the following line when adding the <pre> tags.
    /* Ensure that player name exist in the system*/if (player =null)     NullPlayerException;          if (NOT (isPlayerNameExist(player)))               throw PlayerNameNotExistException;          /* Ensure player name exist in the team already*/          i ? 1;          while (i <= length(mPlayers)) {               if (mPlayers[i].mPlayerName != playerName)                    throw PlayerNameNotExistInTeamException;}this.mPlayers ? this.mPlayers - player;
    On the screen this is shown on 1 line. It looks like the tabs are working correctly. However, the carriage return, line feeds do not seem to be working. The xml that is pushed into the transformation has the carriage returns and line feeds and is formatted correctly. There has to be something happening when the xsl takes the xml String. When I add <BR></BR> within the xml that doesn't seem to work either.
    I am really sumpted. If you could help DrClap I would really be appreciated.

  • FindNode returning Null And XML Not Accepting Special Characters

    Hi All,
    i am trying the get the attribute value in the element "ns4:InfoCFDi" using FindNode method, but the method is returning NULL. I used the same code for other sample as well and was successfull. but for this specific XML file(which is below) I am getting a Null.
    i can get till S:Body, but when i try to use FindNode for ":Body/s4:ResponseGeneraCFDi" I get Null value.
    And I used "S:Body/*[local-name()=" | "ns4:ResponseGeneraCFDi" | "]";
    as mentioned in other post but still no success.
    ==>I Have one more question relating to special characters. I need to use characters such as - ó in my XML to read as well as write. When I try to read i am getting XML parse error and when writing, i cannot open the file properly.
    Your help is much appreciated.
    My code is here:
    Local XmlDoc &inXMLDoc, &reqxmldoc;
    Local XmlNode &RecordNode;
    &inXMLDoc = CreateXmlDoc();
    &ret = &inXMLDoc.ParseXmlFromURL("D:\Agnel\Mexico Debit Memo\REALRESPONSE.xml");
    If &ret Then
    &RecordNode = &inXMLDoc.DocumentElement.FindNode("" );
    If &RecordNode.IsNull Then
    Warning MsgGet(0, 0, "Agnel FindNode not found.");
    rem MessageBox(0, "", 0, 0, "FindNode not found");
    Else
    &qrValue = &RecordNode.GetAttributeValue("asignaFolio ");
    Warning MsgGet(0, 0, "asignaFolio." | &qrValue);
    End-If;
    Else
    Warning MsgGet(0, 0, "Error. ParseXmlString");
    End-If;
    XML File:
    - <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    - <S:Body>
    - <ns4:ResponseGeneraCFDi xmlns="http://www.xxl.com/ns/xsd/bf/rxx/52" xmlns:ns2="http://www.sat.gob.mx/cfd/3" xmlns:ns3="http://www.xx/ns/bf/conector/1&quo t; xmlns:ns4="http://www.xx/ns/xsd/bfxx/xx/32&qu ot; xmlns:ns5="http://www.xxcom/ns/xsd/bf/xxxxx&q uot; xmlns:ns6="http://wwwxx.com/ns/referenceID/v1">
    - <ns3:Result version="1">
    <ns3:Message message="Proceso realizado con exito." code="0" />
    </ns3:Result>
    - <ns4:InfoCFDi noCertificadoSAT="20001000000100003992" refId="STORFAC20121022085611" fechaTimbrado="2012-10-22T08:56:45" qr=" "
    uuid="a37a7d92-a17e-49f4-8e4d-51c983587acb" version="3.2" tipo="XML" archivo="xxx" sello="B8WjuhYLouSZJ6LU2EjxZ0a4IKyIENZNBx4Lb4 jkcAk6wA+EM477yz91/iDdsON0jm8xibBfom5hvHsH7ZK1ps3NnAXWr1LW 7ctmGsvYKAMvkCx/yOVzJTKFM2hN+OqCTE0WVfgv690vVy2CDQWKlMxbK+3idwG4t OKCMelrN9c=" fecha="2012-10-22T08:56:44" folio="281" serie="IICC">
    <InfoEspecial valor="Este documento es una representacin impresa de un CFDI." atributo="leyendaImpresion" />
    <InfoEspecial valor="||1.0|a37a7d92-a17e-49f4-8e4d-51c983587acb|2012-10-22T08:56:45|B8WjuhYLouSZJ6LU2EjxZ0a4IKyIENZNBx4Lb4 jkcAk6wA+EM477yz91/iDdsON0jm8xibBfom5hvHsH7ZK1ps3NnAXWr1LW 7ctmGsvYKAMvkCx/yOVzJTKFM2hN+OqCTE0WVfgv690vVy2CDQWKlMxbK+3idwG4t OKCMelrN9c=|20001000000100003992||" atributo="cadenaOriginal" />
    <InfoEspecial valor="Doscientos dieciocho mil cuatrocientos setenta y cinco pesos 00/100 M.N." atributo="totalConLetra" />
    </ns4:InfoCFDi>
    </ns4:ResponseGeneraCFDi>
    </S:Body>
    </S:Envelope>
    TIA

    First of all you have to supply a value you want to search for and this has to be the complete path to the value. You're saying you already tried that, but can you paste the code which you used for that? I don't see the path mentioned in the code you posted.
    *FindNode*
    Syntax
    FindNode(Path)
    Description
    Use the FindNode method to return a reference to an XmlNode.
    The path is specified as the list of tag names, to the node that you want to find, each separated by a slash (/).
    Parameters
    Path
    Specify the tag names up to and including the name of the node that you want returned, starting with a slash and each separated by a slash (/). This is known as the XPath query language.>
    Another option would be this snippet of code:
    &InfoCFDiArray = GetElementsByTagName("ns4:InfoCFDi");
    &InfoCFDiNode = &InfoCFDiArray [1];
    &attValue = &InfoCFDiNode.GetAttributeValue("noCertificadoSAT")
    Warning(&attValue);
    It creates an array of XML Nodes which match the name "ns4:InfoCFDi". Since there's only one in the XML it's safe to assume it will be the one and only node in the array. I've assigned that node to the variable &InfoCFDiNode and use that to retrieve the attribute "noCertificadoSAT" value. The warning message should display the value supplied there.
    Concering the special characters; you will have to change the encoding of the XML. Peoplecode sets this to UTF-8 by default, but doesn't include this in the header. There's a little hack for that somewhere on the web, I'll see if I can find it.

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

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

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

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

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

    Similiar to the answer How to pass a xml CDATA in string element when OSB calling a webservice?
    Use the xquery function fn-bea:inlinedXML rather than fn-ben:serialize
    Steps to solve this problem:
    1. Create a XML Schema. E.g.:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="unqualified">
    <xs:complexType name="searchCustomerByDocumentNumberResponse">
    <xs:sequence>
    <xs:element name="name" minOccurs="0">
    <xs:annotation>
    <xs:documentation>
    </xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:string" />
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="searchCustomerByDocumentNumberResponse" type="searchCustomerByDocumentNumberResponse"></xs:element>
    </xs:schema>
    2. Create a XQuery to create a searchCustomerByDocumentNumber ComplexType. E.g.:
    3. Create a XQuery Transformation (XQ) to get the CDATA response to the webservice legacy. E.g.:
    declare namespace ns0 = "novosiaws";
    declare function xf:getReponse($searchCustomerByDocumentNumberResponse as element(ns0:searchCustomerByDocumentNumberResponse))
    as element(searchCustomerByDocumentNumberResponse) {
    fn-bea:inlinedXML($searchCustomerByDocumentNumberResponse/ns0:arg)
    For more information about xquery function:
    fn-bea:inlinedXML
    The fn-bea:inlinedXML() function parses textual XML and returns an instance of the XQuery 1.0 Data Model.
    The function has the following signature:
    fn-bea:inlinedXML($text as xs:string) as node()*
    where $text is the textual XML to parse.
    Examples:
    fn-bea:inlinedXML(“<e>text</e>”) returns element “e”.
    fn-bea:inlinedXML(“<?xml version=”1.0”><e>text</e>”) returns a document with root element “e”.
    Source: http://docs.oracle.com/cd/E13162_01/odsi/docs10gr3/xquery/extensions.html

  • Conversion agent; CMException: Request IF_EXEC2 returned null

    Hi all,
    "CMException: Request IF_EXEC2 returned null"
    I'm trying to use a conversion agent serializer to ouput a file from PI 7.1 and am getting the above message in the receiver comm. channel monitor.  No idea what it means.
    This is my first use of conversion agent, so I'm not sure that everything is correctly in place, but the Conversion agent console set-up test works, and I've followed all the blogs I can find so I'm reasonably happy with it.
    Executing the script from the CM console gives me the transformation I want, so my serializer seems OK.
    The PI configuration scenario works fine if I use a receiver channel without the CMTransform bean module (i.e I get an xml file output), so that's OK.
    I get nothing in the NWA logs.
    I'm running out-of-process (64 bit PI system) and the console config looks OK per the admin guide.
    Any ideas folks ?
    Regards,
    Guy

    That's an odd thing.
    When I run it in studio, it completes without any obvious error, but there's no "results" file.
    We had initially installed the 32 bit version (when I was on XI 3.0), and I ran the studio on the XI machine and the results file showed in studio.  But now, my studio is on my PC (not the PI machine).
    However, all that aside, when I execute the CM_Console with my project I get exactly the output I expect...so I'm sure that the serializer is OK.

  • How to parse whole xml elements into a java String

    hello everybody,
    I am trying to parse whole xml into a string for example
    my xml file is as below:
    <root>
        <element>
           <data id="1">1</data>
        </element>
        <element>
           <data id="2">2</data>
        </element>
    </root>
    in java whole data should be transfered as
    String xmlString ="<root><element><data id=\"1\">1</data></element><element><data id=\"2\">2</data></element></root>";or in a simple way can xml be copied into a string? any assistance ...
    thanQ in Advance.
    Han.

    This code is to convert xml document to a string.
                             try {
                                  javax.xml.transform.TransformerFactory tfactory = TransformerFactory.newInstance();
                                  javax.xml.transform.Transformer xform = tfactory.newTransformer();
                                  javax.xml.transform.Source src = new DOMSource(xmlString);
                                  java.io.StringWriter writer = new StringWriter();
                                  StreamResult result = new javax.xml.transform.stream.StreamResult(writer);
                                  xform.transform(src, result);
                                  //System.out.println(writer.toString());          
                             } catch (TransformerConfigurationException e) {
                                  e.printStackTrace();
                             }catch(Exception ex )
                                  ex.printStackTrace();
                             }

  • XML into one string element

    Hello,
            In Graphical mapping, Could anyone pls tell me in detail about how to achieve One whole xml into one string element. This XML file i want to send to DATABASE.

    Thi blog might be of some help
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

Maybe you are looking for

  • Heat temperature of LaserJet Enterprise 500 M551n.

    Hi, there is a critical moment:  before buying I want to now the temperature of heating element in HP LaserJet Enterprise 500 M551n. Does anyone know exactly? And the same question for HP LaserJet Pro 200 color. Which one's quality of colour printing

  • The RAW setting in Bridge is not working. Reply to Curt y

    Normally, when I open the image file it shows all the thumbnail images, with the file names and CR2.; then I click a thumbnail to highlight it. Then, the small round icon in the toolbar is dark, and when the cursor is over it , it says "Open in Camer

  • [JS] Creating a Global Swatch

    I am able to create a new (CMYK) swatch and name it. But how do I set it as "global" (not spot). Javascript CS3

  • How to display all tables residing in my database

    i'm using 10g express edition. i'm developing a .net application using oracle i want display table infomation in a datagrid for that i need to select tables fromthe database using the interface given by them in that i found server name field.....what

  • FLEET Table, Possible Values For Field IS SI UNIT

    Dear experts, While doing analysis on fleet data I realized that for field IS_SI_UNIT (PM: Vehicle Data in SI Unit (e.g. Dimensions)) in table FLEET in two separate systems we have vehicle records set with different entries for this field. In one sys