Parsing an xml output of a ws-client using JDOM
how do i use jdom to parse an output from a web service client,
ive been using JDev. 10g, was able to create a web service client to consume and return the output in the form of an xml.
i want to be able to parse the xml doc into variables such that i can insert them into the database.
is it possible to parse without saving it?
cheers,
Shivek Sachdev
how do i use jdom to parse an output from a web service client,
ive been using JDev. 10g, was able to create a web service client to consume and return the output in the form of an xml.
i want to be able to parse the xml doc into variables such that i can insert them into the database.
is it possible to parse without saving it?
cheers,
Shivek Sachdev
Similar Messages
-
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 ExecutionHi,
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 -
Parse an XML of size greater than 64k using DOM
Hi,
I had a question regarding limitation of parsing a file of size greater than 64k in Oracle 10g. Is the error "ORA-31167: XML nodes over 64K in size cannot be inserted" related to this ?
One of the developers was telling that if we load an XML document of size greater than 64k into Oracle DOM, it will fail. Is 64k the size of the file or the size of text node in the XML?
Is there a way we can overcome this limitation?
I believe that Oracle 11g R1 documentation states that existing 64k limitation on the size of a text node has been eliminated. So if we use Oracle 11g, does it mean we can load XML files of size greater than 64K (or XML having text nodes of size greater than 64k)
I am not well versed with XML. Please help me out.
Thanks for your help.Search this forum for the ORA-error.
Among others it will show the following: Node size
In this case I think we can assured that "a future release" in 2006 was 11.1 as mentioned by Mark (= Sr Product Manager Oracle XML DB) -
Sending XML messages from server to client using POST method
Dear everyone,
I have a simple client server system - using Socket
class on the server side and URLConnection class on
the client side. The client sends requests to the
server in the form of an XML message using POST method.
The server processes the request and responds with
another XML message through the same connection.
That's the basic idea.
I have a few questions about headers and formats
especially with respect to POST.
1. In what format should the response messages from the
server be, for the client? Does the server need to
send the HTTP headers - for the POST type requests?
Is this correct?:
out.println("HTTP/1.1 200 My Server\r");
out.println("Content-type: text/xml\r");
out.println("Content-length: 1024\r");
out.println("\r");
out.println("My XML response goes here...");2. How do I read these headers and the actual message
in the client side? I figured my actual message was
immediately after the blank line. So I wrote
something like this:
String inMsg;
// loop until the blank line is through.
while (!"".equals(inMsg = reader.readLine()))
System.out.println(inMsg);
// get the actual message and process it.
inMsg = reader.readLine();
processMessage(inMsg);But the above did not work for me. Because I seem to
be receiving a blank line after each header! (I suppose
that was because of the "\r".) So what should I do?
3. What are the different headers I must pass from
server to the client to safeguard against every
possible problem?
4. What are the different exceptions I must be prepared
for this situation? How could I cope with them? For
example, time outs, IOExceptions, etc.
Thanks a lot! I appreciate all your help!
Georgehello,
1) if you want to develop a distributed application with XML messages, you can look in SOAP.
it's a solution to communicate objects distributed java (or COM or other) and it constructs XML flux to communicate between them.
2) if it can help you, I have developed a chat in TCP/IP and, to my mind, when you send datas it's only text, so the format isn't important, the important is your traitement behind.
examples :
a client method to send a message to the server :
public void send(String message)
fluxOut.println(message);
fluxOut.flush();
whith
connexionCourante = new Socket(lAdresServeur, noPort);
fluxOut= new PrintWriter( new OutputStreamWriter(connexionCourante.getOutputStream()) );
a server method in a thread to receive and print the message :
while(true)
if (laThread == null)
break;
texte = fluxIn.readLine();
System.out.println(texte);
that's all ! :)
If you want to use it for your XML communication, it could be a good idea to use a special message, for example "@end", to finish the server
ex :
while(true)
if (laThread == null)
break;
texte = fluxIn.readLine();
// to stop
if (texte.equals("@end"))
{break;}
processMessage(texte );
hope it will help you
David -
XML Output from Concurrent Request DBMS_XMLGEN
I am trying to create xml output for a concurrent request, using the DBMS_XMLGEN package to generate my XML?
I have gotten so far as to be able to run my procedure and see the output in TOAD using dbms_output.put_line, but I can't seem to quite get the right link to convert this to Oracle Apps output.
I have a concurrent request setup to output XML.
This calls my procedure to return to the output file.
So far, when I run from APPS, all that shows in the Output file is 'XML document must have a top level element.'
Here is the relevant code...
ctx DBMS_XMLGEN.ctxHandle; -- vars to convert SQL output to xml
xml clob;
xmlc varchar2(4000);
off integer := 1;
len integer := 4000;
i number := 0;
rc_data sys_refcursor;
begin
-- this calls simple open cursor for sql statement, returns rows
rc_data := fa10022_data(P_BOOK_TYPE_CODE
, P_STATE
, v_BEG_DATE_EFFECTIVE
, v_END_DATE_EFFECTIVE
, P_BEG_ASSET_ACCT
, P_END_ASSET_ACCT
, v_depr_per_ctr);
ctx := dbms_xmlgen.newContext(rc_data);
dbms_xmlgen.setRowsetTag(ctx, 'XXFA10022');
dbms_xmlgen.setRowTag(ctx, 'G_DATA');
xml := dbms_xmlgen.getXml(Ctx);
i := dbms_xmlgen.getNumRowsProcessed(ctx);
dbms_xmlgen.closeContext(Ctx);
apps.fnd_file.put_line(apps.fnd_file.output, xml);
I was also following this link...
http://www.appsassociates.com/products/Generation_XML_PLSQL.pdf
any suggestions?
Thanks!!
JanelThat was painful, but it helped!
Most of it is workflow code...POXMLGEN contains the pertinent coding.
I think my problem now lies with some of my data. Depending on what is returned, I sometimes receive a warning with no output. I know there are special characters in the data (ex eacute), but I can't tell if that is what is causing the issue. I do have the statement dbms_xmlgen.setConvertSpecialChars(ctx, TRUE); in my code, so not sure what else to do.
This is what is being returned in OPP log...
Caused by: oracle.xdo.parser.v2.XMLParseException: Start of root element expected. -
Inserting/updating XML output to tables
Hi,
I have a nested XML master details record(2 or 3 table). I want to breaking into different columns and insert/update corresponding table.
How I parsed in XML.
Thanks
ReenaYou need to use extractValue() sql function
-
XML Parser Error while creating Web service Client using JAX RPC
hello evryone,
Im facing XML Parser Error while creating web service client using JAX RPC. Im using Net Beans IDE for development purpose. I have wrote configuration file for client. Now i want to create Client stub. However i dont know how to do this in Net Beans. So i tried to do it from Command promt using command :
wscompile -gen:client -d build -classpath build config-wsdl.xml
here im getting Error:
error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:10: XML declaration may only begin entities
Please help me out.
Many thanks in advance,
KaceeCan i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.
-
XML parser error while testing web service client using jdeveloper 10.1.2.1
hi
I have generated a web service stub/skeleton out of the wsdl file using jdeveloper 10.1.2.1.0. The client will return a complex type result, i.e., it will return an array of elements. When I try to run the client using jdeveloper 10.1.2.10 i am getting the following error:
E:\oracle\DevSuiteHome_1\jdk\bin\javaw.exe -ojvm -classpath E:\oracle\DevSuiteHome_1\jdev\mywork\Application2\Project2\classes;E:\oracle\DevSuiteHome_1\jdev\lib\jdev-rt.jar;E:\oracle\DevSuiteHome_1\soap\lib\soap.jar;E:\oracle\DevSuiteHome_1\lib\xmlparserv2.jar;E:\oracle\DevSuiteHome_1\jlib\javax-ssl-1_2.jar;E:\oracle\DevSuiteHome_1\jlib\jssl-1_2.jar;E:\oracle\DevSuiteHome_1\j2ee\home\lib\activation.jar;E:\oracle\DevSuiteHome_1\j2ee\home\lib\mail.jar;E:\oracle\DevSuiteHome_1\j2ee\home\lib\http_client.jar;E:\oracle\DevSuiteHome_1\lib\xmlcomp.jar mypackage2.RESSelectionServiceStub
oracle.xml.parser.v2.XMLElement@11
java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:112)
at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:112)
at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:112)
at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
[Lmypackage2.ProfiledClaimant;@18
java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:113)
at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:113)
at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:113)
at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
java.lang.ArrayIndexOutOfBoundsException: 1
at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:55)
Process exited with exit code 0.I have googled to see if i can get any solution , i got the following information:
Cannot Generate a Stub or Skeleton for a WSDL that Uses Certain Types (3912349)
JDeveloper 10.1.2 only understands a subset of all of the complexTypes that can be defined in a WSDL document. For example, if the following appear in the "types" section of the WSDL, any use of those types will cause JDeveloper to generate a reference to UnknownType in a stub or skeleton:
• Restrictions of simpleTypes
• complexTypes which define attributes Does that mean that the jdeveloper will not support complex types?Could anybody tell me how to resolve the above said issue? Is there any patch that i can run to resolve the issue?Can i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.
-
Parsing a XML file using Jdom-Problem.
Hi all,
I am reposting it as I was told to format the code and send it again.
I am trying to parse a xml file using a jdom java code.This code works fine if I remove xmlns attribute in the root element. (I get the expected result) .If the "xmlns" attribute is put in the xml as it should be then the parsing and retrieving returns null. Please tell me how to fix this issue.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xml
<process name="CreateKBEntryService" targetNamespace="http://serena.com/CreateKBEntryService" suppressJoinFailure="yes" xmlns:tns="http://serena.com/CreateKBEntryService" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:nsxml0="http://localhost:8080/axis/services/CreateKBEntryService" xmlns:nsxml1="http://DefaultNamespace" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
<partnerLinks>
<partnerLink name="client" partnerLinkType="tns:CreateKBEntryService" myRole="CreateKBEntryServiceProvider"/>
<partnerLink name="CreateKBEntryPartnerLink" partnerLinkType="nsxml0:CreateKBEntryLink" partnerRole="CreateKBEntryProvider"/>
</partnerLinks>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
Java:
import java.io.*;
import java.util.*;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
public class sample1 {
public static void main(String[] args) throws Exception {
// create a XML parser and read the XML file
SAXBuilder oBuilder = new SAXBuilder();
Document oDoc = oBuilder.build(new File("**xml file location**"));
Element root = oDoc.getRootElement();
System.out.println(root.getName());
String tgtns= root.getAttributeValue("targetNamespace");
System.out.println("tgt ns "+ tgtns);
List list= root.getChildren("partnerLinks");
Iterator it1= list.iterator();
System.out.println("Iterator 1 - "+list.size());
while(it1.hasNext()){
Element partnerlinks = (Element)it1.next();
List list2= partnerlinks.getChildren("partnerLink");
System.out.println("iterator 2 - "+list2.size());
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Result:
Without Xmlns in xml file(Expected and correct output)
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 1//expected and correct result that comes when I remove xmlns attribute from xml
iterator 2 - 2
Result with xmlns:
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 0 //instead of 0 should return 1LOL
This is what you get for working 12 hours straight....
I changed:
xmlObject["mydoc"]["modelglue"]["event-handlers"]["event-handler"][i].xmlAttrib utes["name"]<br>
to:
#mydoc["modelglue"]["event-handlers"]["event-handler"][i].xmlAttrib utes["name"]#<br>
xmlObject is the name of my xml object in memory, and then you reference from the root of the xml doc down the chain.
Sorry for the inconvenience,
Rich -
Hi all,
I am reposting it as I was told to format the code and send it again.
I am trying to parse a xml file using a jdom java code.This code works fine if I remove xmlns attribute in the root element. (I get the expected result) .If the "xmlns" attribute is put in the xml as it should be then the parsing and retrieving returns null. Please tell me how to fix this issue.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xml
<process name="CreateKBEntryService" targetNamespace="http://serena.com/CreateKBEntryService" suppressJoinFailure="yes" xmlns:tns="http://serena.com/CreateKBEntryService" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:nsxml0="http://localhost:8080/axis/services/CreateKBEntryService" xmlns:nsxml1="http://DefaultNamespace" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
<partnerLinks>
<partnerLink name="client" partnerLinkType="tns:CreateKBEntryService" myRole="CreateKBEntryServiceProvider"/>
<partnerLink name="CreateKBEntryPartnerLink" partnerLinkType="nsxml0:CreateKBEntryLink" partnerRole="CreateKBEntryProvider"/>
</partnerLinks>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
Java:
import java.io.*;
import java.util.*;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
public class sample1 {
public static void main(String[] args) throws Exception {
// create a XML parser and read the XML file
SAXBuilder oBuilder = new SAXBuilder();
Document oDoc = oBuilder.build(new File("**xml file location**"));
Element root = oDoc.getRootElement();
System.out.println(root.getName());
String tgtns= root.getAttributeValue("targetNamespace");
System.out.println("tgt ns "+ tgtns);
List list= root.getChildren("partnerLinks");
Iterator it1= list.iterator();
System.out.println("Iterator 1 - "+list.size());
while(it1.hasNext()){
Element partnerlinks = (Element)it1.next();
List list2= partnerlinks.getChildren("partnerLink");
System.out.println("iterator 2 - "+list2.size());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Result:
Without Xmlns in xml file(Expected and correct output)
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 1//expected and correct result that comes when I remove xmlns attribute from xml
iterator 2 - 2
Result with xmlns:
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 0 //instead of 0 should return 1Hi all,
I am reposting it as I was told to format the code and send it again.
I am trying to parse a xml file using a jdom java code.This code works fine if I remove xmlns attribute in the root element. (I get the expected result) .If the "xmlns" attribute is put in the xml as it should be then the parsing and retrieving returns null. Please tell me how to fix this issue.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xml
<process name="CreateKBEntryService" targetNamespace="http://serena.com/CreateKBEntryService" suppressJoinFailure="yes" xmlns:tns="http://serena.com/CreateKBEntryService" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:nsxml0="http://localhost:8080/axis/services/CreateKBEntryService" xmlns:nsxml1="http://DefaultNamespace" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
<partnerLinks>
<partnerLink name="client" partnerLinkType="tns:CreateKBEntryService" myRole="CreateKBEntryServiceProvider"/>
<partnerLink name="CreateKBEntryPartnerLink" partnerLinkType="nsxml0:CreateKBEntryLink" partnerRole="CreateKBEntryProvider"/>
</partnerLinks>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
Java:
import java.io.*;
import java.util.*;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
public class sample1 {
public static void main(String[] args) throws Exception {
// create a XML parser and read the XML file
SAXBuilder oBuilder = new SAXBuilder();
Document oDoc = oBuilder.build(new File("**xml file location**"));
Element root = oDoc.getRootElement();
System.out.println(root.getName());
String tgtns= root.getAttributeValue("targetNamespace");
System.out.println("tgt ns "+ tgtns);
List list= root.getChildren("partnerLinks");
Iterator it1= list.iterator();
System.out.println("Iterator 1 - "+list.size());
while(it1.hasNext()){
Element partnerlinks = (Element)it1.next();
List list2= partnerlinks.getChildren("partnerLink");
System.out.println("iterator 2 - "+list2.size());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Result:
Without Xmlns in xml file(Expected and correct output)
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 1//expected and correct result that comes when I remove xmlns attribute from xml
iterator 2 - 2
Result with xmlns:
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 0 //instead of 0 should return 1 -
Parsing a XML using Jdom --- Problem pls help
Hi all,
I am reposting it as I was told to format the code and send it again.
I am trying to parse a xml file using a jdom java code.This code works fine if I remove xmlns attribute in the root element. (I get the expected result) .If the "xmlns" attribute is put in the xml as it should be then the parsing and retrieving returns null. Please tell me how to fix this issue.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xml
<process name="CreateKBEntryService" targetNamespace="http://serena.com/CreateKBEntryService" suppressJoinFailure="yes" xmlns:tns="http://serena.com/CreateKBEntryService" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:nsxml0="http://localhost:8080/axis/services/CreateKBEntryService" xmlns:nsxml1="http://DefaultNamespace" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
<partnerLinks>
<partnerLink name="client" partnerLinkType="tns:CreateKBEntryService" myRole="CreateKBEntryServiceProvider"/>
<partnerLink name="CreateKBEntryPartnerLink" partnerLinkType="nsxml0:CreateKBEntryLink" partnerRole="CreateKBEntryProvider"/>
</partnerLinks>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
Java:
import java.io.*;
import java.util.*;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
public class sample1 {
public static void main(String[] args) throws Exception {
// create a XML parser and read the XML file
SAXBuilder oBuilder = new SAXBuilder();
Document oDoc = oBuilder.build(new File("**xml file location**"));
Element root = oDoc.getRootElement();
System.out.println(root.getName());
String tgtns= root.getAttributeValue("targetNamespace");
System.out.println("tgt ns "+ tgtns);
List list= root.getChildren("partnerLinks");
Iterator it1= list.iterator();
System.out.println("Iterator 1 - "+list.size());
while(it1.hasNext()){
Element partnerlinks = (Element)it1.next();
List list2= partnerlinks.getChildren("partnerLink");
System.out.println("iterator 2 - "+list2.size());
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Result:
Without Xmlns in xml file(Expected and correct output)
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 1//expected and correct result that comes when I remove xmlns attribute from xml
iterator 2 - 2
Result with xmlns:
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 0 //instead of 0 should return 1One suggestion to try:
Change your code to the following
Element root = oDoc.getRootElement();
System.out.println(root.getName());
String tgtns= root.getAttributeValue("targetNamespace");
System.out.println("tgt ns "+ tgtns);
Namespace ns = Namespace.getNamespace(
"http://schemas.xmlsoap.org/ws/2003/03/business-process/" );
List list= root.getChildren("partnerLinks", ns );
Iterator it1= list.iterator();
System.out.println("Iterator 1 - "+list.size());The JavaDoc says for the one-arg getChildren()
If this target element has no nested elements with the given name outside a namespace, an empty List is returned.
Your elements have a namespace (the default one) so it should be worth a try.
Dave Patterson -
Problem parsing a xml using Jdom
Hi all,
I am reposting it as I was told to format the code and send it again.
I am trying to parse a xml file using a jdom java code.This code works fine if I remove xmlns attribute in the root element. (I get the expected result) .If the "xmlns" attribute is put in the xml as it should be then the parsing and retrieving returns null. Please tell me how to fix this issue.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xml
<process name="CreateKBEntryService" targetNamespace="http://serena.com/CreateKBEntryService" suppressJoinFailure="yes" xmlns:tns="http://serena.com/CreateKBEntryService" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:nsxml0="http://localhost:8080/axis/services/CreateKBEntryService" xmlns:nsxml1="http://DefaultNamespace" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
<partnerLinks>
<partnerLink name="client" partnerLinkType="tns:CreateKBEntryService" myRole="CreateKBEntryServiceProvider"/>
<partnerLink name="CreateKBEntryPartnerLink" partnerLinkType="nsxml0:CreateKBEntryLink" partnerRole="CreateKBEntryProvider"/>
</partnerLinks>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
Java:
import java.io.*;
import java.util.*;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
public class sample1 {
public static void main(String[] args) throws Exception {
// create a XML parser and read the XML file
SAXBuilder oBuilder = new SAXBuilder();
Document oDoc = oBuilder.build(new File("**xml file location**"));
Element root = oDoc.getRootElement();
System.out.println(root.getName());
String tgtns= root.getAttributeValue("targetNamespace");
System.out.println("tgt ns "+ tgtns);
List list= root.getChildren("partnerLinks");
Iterator it1= list.iterator();
System.out.println("Iterator 1 - "+list.size());
while(it1.hasNext()){
Element partnerlinks = (Element)it1.next();
List list2= partnerlinks.getChildren("partnerLink");
System.out.println("iterator 2 - "+list2.size());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Result:
Without Xmlns in xml file(Expected and correct output)
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 1//expected and correct result that comes when I remove xmlns attribute from xml
iterator 2 - 2
Result with xmlns:
process
tgt ns http://serena.com/CreateKBEntryService
Iterator 1 - 0 //instead of 0 should return 1One suggestion to try:
Change your code to the following
Element root = oDoc.getRootElement();
System.out.println(root.getName());
String tgtns= root.getAttributeValue("targetNamespace");
System.out.println("tgt ns "+ tgtns);
Namespace ns = Namespace.getNamespace(
"http://schemas.xmlsoap.org/ws/2003/03/business-process/" );
List list= root.getChildren("partnerLinks", ns );
Iterator it1= list.iterator();
System.out.println("Iterator 1 - "+list.size());The JavaDoc says for the one-arg getChildren()
If this target element has no nested elements with the given name outside a namespace, an empty List is returned.
Your elements have a namespace (the default one) so it should be worth a try.
Dave Patterson -
UTFDataFormatException when parsing incoming XML
Hi,
I am constantly seeing this message bellow when upgrade OCEP from 11.1.1.2 to 11.1.1.3 when parsing the XML from inbound JMSAdapter . Anyone knows the problem and how to fix it?
patcherException: java.rmi.UnmarshalException: failed to unmarshal response; nested exception is:
java.io.UTFDataFormatException
weblogic.jms.common.JMSException: weblogic.messaging.dispatcher.DispatcherException: java.rmi.UnmarshalException: failed
to unmarshal response; nested exception is:
java.io.UTFDataFormatException
at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:116)
at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:61)
at weblogic.jms.client.JMSSession.receiveMessage(JMSSession.java:894)
at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:647)
at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:526)
at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessag
eListenerContainer.java:405)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingM
essageListenerContainer.java:309)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMes
sageListenerContainer.java:261)
at com.bea.core.asyncbeans.internal.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerCont
ainer.java:59)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(D
efaultMessageListenerContainer.java:983)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLo
op(DefaultMessageListenerContainer.java:974)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessa
geListenerContainer.java:876)
at com.bea.core.asyncbeans.internal.WorkManagerTaskExecutor$1.run(WorkManagerTaskExecutor.java:39)
at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:196)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Thanks,
BrandonI also got the same exception:
I am trying to access the JMS queue from CEP application and the JMS queue are configured and populated by the OBS server.
OSB server Version : 11g R1
Weblogic version : 10.3.3
CEP server Version : 11.1.1.3
Also I disable the DMS option in both CEP and OSB server.
In CEP Server:
I disable DMS option in ‘startwlevs.cmd’ file in CEP domain folder as shown below.
"%JAVA_HOME%\bin\java" %JVM_ARGS% %DGC% %DEBUG% -Doracle.dms.context=OFF
-Dwlevs.home="%USER_INSTALL_DIR%" -Dbea.home="%BEA_HOME%" -jar
"%USER_INSTALL_DIR%\bin\wlevs.jar" %1 %2 %3 %4 %5 %6
:finish
In OSB Server:
OSB11g WLS Path : C:\Oracle11g\user_projects\domains\base_domain\bin
File Name : startWebLogic.cmd
if "%WLS_REDIRECT_LOG%"=="" (
echo Starting WLS with line:
echo %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Doracle.dms.context=OFF -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
) else (
echo Redirecting output from WLS window to %WLS_REDIRECT_LOG%
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Doracle.dms.context=OFF -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS% >"%WLS_REDIRECT_LOG%" 2>&1
Please share your suggestion -
Hello all,
I have generated an XML output through Smartforms. Now I need to load this file into DMS . Please let me know how I can achieve this.
Thanks,
Kalyancheck this code and use it...
REPORT Z_RMTIWARI_XML_TO_ABAP_46C .
Load iXML Lib.
type-pools: ixml.
class cl_ixml definition load.
data: G_IXML type ref to if_ixml.
data: STREAMFACTORY type ref to if_ixml_stream_factory.
data: ISTREAM type ref to if_ixml_istream.
data: DOCUMENT type ref to if_ixml_document.
data: PARSER type ref to if_ixml_parser.
data: LV_FILE_URL type rlgrap-filename.
You should provide the parameter for file name
LV_FILE_URL = 'C:input_xml.xml'.
types: begin of XML_LINE,
DATA(256) type x,
end of XML_LINE.
types: begin of TY_HEADER,
CUST_NAME(20) type c,
CARD_NO(20) type c,
TAX_AMOUNT(10) type c,
TOTAL_AMOUNT(10) type c,
end of TY_HEADER.
types: begin of TY_ITEM,
ITEM_NO(4) type n,
ITEM_ID(20) type c,
ITEM_TITLE(50) type c,
ITEM_QTY(10) type c,
ITEM_UPRICE(10) type c,
end of TY_ITEM.
data: GV_HEADER type TY_HEADER.
data: GT_ITEM type standard table of TY_ITEM with header line.
data: XML_TABLE type table of XML_LINE,
XML_TABLE_SIZE type i.
The next step is creating the main factory for the iXML library:
G_IXML = cl_ixml=>create( ).
Now Create Stream Factory
STREAMFACTORY = G_IXML->create_stream_factory( ).
upload a file from the client's workstation
call function 'WS_UPLOAD'
exporting
filename = LV_FILE_URL
filetype = 'BIN'
importing
filelength = XML_TABLE_SIZE
tables
data_tab = XML_TABLE
exceptions
others = 11.
wrap the table containing the file into a stream
ISTREAM = STREAMFACTORY->create_istream_itable( table = XML_TABLE
size = XML_TABLE_SIZE )
Get the file data as Stream
*istream = streamfactory->create_istream_uri( public_id = lv_file_url
system_id = lv_file_url ).
Create XML Document instance
DOCUMENT = G_IXML->create_document( ).
Create parser Object
PARSER = G_IXML->create_parser( stream_factory = STREAMFACTORY
ISTREAM = istream
DOCUMENT = document ).
Parse an XML document into a DOM tree
*parser->parse( ).
Parsing Error Processing
if PARSER->parse( ) ne 0.
if PARSER->num_errors( ) ne 0.
data: PARSEERROR type ref to if_ixml_parse_error,
STR type STRING,
I type i,
COUNT type I,
INDEX type i.
COUNT = PARSER->num_errors( ).
write: COUNT, ' parse errors have occured:'.
INDEX = 0.
while INDEX < COUNT.
PARSEERROR = PARSER->get_error( INDEX = index ).
I = PARSEERROR->get_line( ).
write: 'line: ', i.
I = PARSEERROR->get_column( ).
write: 'column: ', i.
STR = PARSEERROR->get_reason( ).
write: STR.
INDEX = index + 1.
endwhile.
endif.
endif.
Close the stream since it �s not needed anymore
call method ISTREAM->close( ).
clear ISTREAM.
Now try to make it look good
data : lv_size type sytabix,
lv_ret_code type sysubrc.
data: lo_xml_document type ref to cl_xml_document.
field-symbols: <fs_xml_data> type any table.
lo_xml_document = document.
call method lo_xml_document->get_as_table
importing
table = <fs_xml_data>
size = lv_size
retcode = lv_ret_code
*data: items type ref to if_ixml_node_collection.
*items = document->get_elements_by_tag_name( name = 'Item' ).
*data: iterator type ref to if_ixml_node_iterator,
node type ref to if_ixml_node.
*iterator = document->create_iterator( ).
*node = iterator->get_next( ).
*while not node is initial.
do something with the node
node = iterator->get_next( ).
*endwhile.
DATA : GV_NODE type ref to if_ixml_node.
DATA : GV_NODETEXT type STRING.
data: GV_FIRST_TIME.
GV_FIRST_TIME = 'X'.
GV_NODE = DOCUMENT.
GT_ITEM-item_no = 1.
perform GET_DATA tables GT_ITEM
using GV_NODE
changing GV_HEADER.
Last item is still not added.
append GT_ITEM.
write : GV_HEADER-cust_name,
GV_HEADER-card_no,
GV_HEADER-tax_amount,
GV_HEADER-total_amount.
loop at GT_ITEM.
write /:.
write : GT_ITEM-item_no,
GT_ITEM-item_id,
GT_ITEM-item_title,
GT_ITEM-item_qty,
GT_ITEM-item_uprice.
endloop.
FORM Get_data *
form get_data tables YT_ITEM structure GT_ITEM
using value(x_node) type ref to if_ixml_node
changing Y_HEADER type TY_HEADER.
data: INDENT type i.
data: PTEXT type ref to if_ixml_text.
data: STRING type string.
data: TEMP_STRING(100).
case X_NODE->get_type( ).
when if_ixml_node=>co_node_element.
STRING = X_NODE->get_name( ).
GV_NODETEXT = STRING.
when if_ixml_node=>co_node_text.
PTEXT ?= X_NODE->query_interface( IXML_IID_TEXT ).
if PTEXT->ws_only( ) is initial.
STRING = X_NODE->get_value( ).
case GV_NODETEXT.
when 'Customer'.
clear GV_HEADER.
when 'Name'.
move STRING to GV_HEADER-cust_name.
when 'Cardnum'.
move STRING to GV_HEADER-card_no.
when 'Tax'.
move STRING to GV_HEADER-tax_amount.
when 'Total'.
move STRING to GV_HEADER-total_amount.
Iteam details
when 'ID'.
move STRING to GT_ITEM-item_id.
when 'Title'.
move STRING to TEMP_STRING.
move TEMP_STRING to GT_ITEM-item_title.
when 'Quantity'.
move STRING to GT_ITEM-item_qty.
when 'UnitPrice'.
move STRING to GT_ITEM-item_uprice.
endcase.
endif.
endcase.
if GV_NODETEXT = 'Customer'.
clear GV_HEADER.
elseif GV_NODETEXT = 'Item'.
if GV_FIRST_TIME ne 'X'.
append GT_ITEM.
clear : gt_item.
GT_ITEM-item_no = gt_item-item_no + 1.
endif.
GV_FIRST_TIME = ' '.
endif.
Get the next child
X_NODE = x_node->get_first_child( ).
Recurse
while not X_NODE is initial.
perform GET_DATA tables GT_ITEM
using X_NODE
changing GV_HEADER.
X_NODE = x_node->get_next( ).
endwhile.
endform. -
How to send job postings to multiple third party sites using the XML output
Dear Friends,
We are Implementing Irecruitment for our client, Client requirement is how can we send job postings to multiple third party sites using the XML output from i-Recruitment
With regards
Surya
.Can you be more specific about your Requirement. In General, Please navigate to iRecruitment Recruiter Responisbility.
Then Select, Setup > Recruiting Sites. Here, you can configure your Third Party Websites information and attach stylesheets. The default mode oracle sends the vacancy information is HR-XML Format.
If you would like to select more sites information select "Add Another Row".
Then, you can see this information while "New Vacancy Creation Process".
iRecruiter.
Edited by: iRecruiter on Oct 18, 2009 7:43 AM
Maybe you are looking for
-
Check boxes that turn layers on and off
hay all im fairly new to this part of adobe but i have a good understanding what i need i to be able to have check boxes that turn layers on and off when the tick is shown and when it is not i know this is possible through scripting but i dont have t
-
My itunes was working perfectly and then i upgraded and now it doesn't open and all i get is an error message. Ive tried so many times removing and re-installing and it won't work. Someone please help me! I am a windows 8 user!
-
Connecting a USBSerial GPS to Intel iMac
Has anyone been able to connect their Garmin GPS to their Intel iMac? The drivers I was using for my USB Serial cable no longer work, and I want to find a cable that does and purchase it. If your does work can you give me a link to your drivers so I
-
Error:- Account is block for posting
Dear guru's Please help us to resolve this problem as on urgent basis,Your suggestion and solution is really appreciated by us......... Error:- Account 1333 3333 is blocked for posting While Invoice is release to accounting through the transaction c
-
Click on an image...to pop up a message!
Hello all... I've been trying to see if its possible to make an image 'active', meaning it should be clickable, parts of it when clicked should pop up a message. What i've tried so far... tried superimposing smaller pics on the original, but how do i