on 07-10-2009 8:15 PM
Hello Folks!
I need your help for this topic:
I used the code posted by Michal on:
Everything works fine, but I have some problems to get the value that I want, I mean, parsing the resulting XML to get the tag that matters for me.
Searching on the Internet, I found some pieces of code and I could make it work in Sap Developer Studio, making a Class that has a method with 2 parameters: the Response XML (in String format), and the tag that has to be found.
When I exported the .jar to upload it to XI and use it like as an UDF, it shows me an error:
" The message is: Exception:[java.lang.NoClassDefFoundError: org/apache/xerces/parsers/AbstractDOMParser "
In my class on the IDE I imported:
import java.io.StringReader;
import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
And in the UDF I imported:
org.w3c.dom.*;
com.ibm.xi.mapping.udf.*;
java.io.StringReader;
org.xml.sax.InputSource;
I can see that there are some classes missing on the PI server... I tried to upload the .jar that contains them, but the xml.jar is huge (6 MB).
Is there any way to just upload those classes? Or another way to do the parse?
Thanks in advance!!
Juan
You cannot use org.apache.xerxes
Use sapxmltoolkit for 7.0 or the standard XML parser of the JDK in 7.1
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanx Stefan and Satish,
I solved the XML parsing with the Bhavesh's explanation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.