Splitting XML with Transform

I am working on an application to create Work Orders using output. The host application sends a batch of Work Orders in XML format (generated using JFTRANS from the Central Migration). The XML contains the customer number. I use Transform to sort the incoming XML by customer number.The structure of the XML is like this:
<File>
     <Record>
         <Header>
               <custno>1234</custno>
               <wonumber>001234<.wonumber>
               <page>1</page
          </Header>
          <Detail>
               <lineno>1</lineno>
               <itemno>004444</itemno>
          </Detail>
          <Detail>
               <lineno>2</lineno>
               <itemno>005555</itemno>
          </Detail>
          <Header>
          </Header>
          <Detail>
          </Detail>
     </Record>
     <Record>
     </Record>
</File>
I tried to use the "Generate Multiple Streams" option of Output/generatePDFOutput to split the output by customer. Unfortunately, the "Generate Multiple Streams" only offers splitting on a "Record" level, not based on content. I need to generate a separate output file for each customer, which could have multiple Work Orders, each with 1 - n pages.
The Foundation/Transform activity doesn't seem to have the functionality to define an XML split via XSLT.
Has anyone done this before?
Thank you!

You're welcome Alex.
Since this is a recurring request on the forum I put together the attached PDF. The PDF describes a technique for splitting an XML document using the XSLT service and includes the following attachments: an ES2 .lca, a sample XML document and the XSL included in the process.
If you have any questions or comments please email [email protected]
Thanks,
Steve

Similar Messages

  • Unable to transform XML with XSL in java code

    Hi,
    Could somebody please tell me what's wrong with my code, why it isn't transform the XML with XSL to the output that I want. If I use the command line to transform the XML, it output perfectly:
    java org.apache.xalan.xslt.Process -in marc.xml -xsl MARC21slim2MODS.xsl -out out.xml
    Here is the code of my program to transform the XML with XSL, I am using xalan-j_2_2-bin:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import org.w3c.dom.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import javax.xml.transform.dom.*;
    import java.math.BigInteger;
    String xslDoc = "MODS.xsl";
    String xmlResult = "out.xml";
    DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
    dfactory.setNamespaceAware(true);
    DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
    Document xmlDoc = docBuilder.newDocument();
    Element root = xmlDoc.createElement("collection");
    root.setAttribute("xmlns", "http://www.loc.gov/MARC21/slim");
    xmlDoc.appendChild(root);
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer(new StreamSource(xslDoc));
    FileWriter fw = new FileWriter(new File(xmlResult));
    StreamResult output = new StreamResult(fw);
    transformer.transform(new DOMSource(xmlDoc), output);
    fw.flush();
    fw.close();
    ========================
    marc.xml -- source XML file
    ========================
    <?xml version="1.0" encoding="UTF-8"?>
    <collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01488cam 2200337 a 4500</leader><controlfield tag="001">2502929</controlfield><controlfield tag="005">19930521155141.9</controlfield><controlfield tag="008">920219s1993 caua j 000 0 eng </controlfield><datafield ind1=" " ind2=" " tag="035"><subfield code="9">(DLC) 92005291</subfield></datafield><datafield ind1=" " ind2=" " tag="906"><subfield code="a">7</subfield><subfield code="b">cbc</subfield><subfield code="c">orignew</subfield><subfield code="d">1</subfield><subfield code="e">ocip</subfield><subfield code="f">19</subfield><subfield code="g">y-gencatlg</subfield></datafield>
    </record></collection>
    ========================
    out.xml -- result using command line
    ========================
    <?xml version="1.0" encoding="UTF-8"?>
    <collection xmlns="http://www.loc.gov/mods/" xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/ http://www.loc.gov/standards/marcxml/schema/mods.xsd">
    <mods>
    <titleInfo>
    <title>Arithmetic</title>
    </titleInfo>
    <name type="personal">
    <namePart>Sandburg, Carl</namePart>
    <namePart type="date">1878-1967</namePart>
    <role>creator</role>
    </name>
    </mods>
    </collection>
    ========================
    out.xml -- result using my java program
    ========================
    <?xml version="1.0" encoding="UTF-8"?>
    <collection xmlns="http://www.loc.gov/mods/" xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/ http://www.loc.gov/standards/marcxml/schema/mods.xsd">01488cam 2200337 a 4500250292919930521155141.9920219s1993 caua j 000 0 eng (DLC) 920052917cbcorignew1ocip19y-gencatlgpc16 to br00 02-19-92; br02 to SCD 02-21-92; fd11 02-24-92 (PS3537.A618 A...); fa00 02-26-92; fa05 03-02-92; fm31 03-06-92; CIP ver. pv08 04-16-93; pv01 to CLT 04-20-93; lb10 05-21-93
    </collection>

    I am using the same XSL file. My Java program use the same XSL file I used in the command line.
    It is possible that my Java code is using a different parser, but I developed a seperate program to parse the XML using the same parser that my Java code is using. It output the result I expected. Here is the code for the program:
    import java.io.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    public class Convertor {
    public static void main(String[] args) throws Exception {
    String xslDoc = "MARC21slim2MODS.xsl";
    String xmlResult = "out.xml";
    String xmlDoc = marc.xml";
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer(new StreamSource(xslDoc));
    StreamSource xmlSource = new StreamSource(xmlDoc);
    FileWriter fw = new FileWriter(new File(xmlResult));
    StreamResult output = new StreamResult(fw);
    transformer.transform(xmlSource, output);
    }

  • Unable to transform xml with xmlns:xsi and xmlns

    Hi
    My xml is like below. If i dont have and xmlns and xmlns:xsi it works fine. but if this is added. it outputs wrong xml
    <Request xmlns="http://www.rx.com/xone/1_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rx.com/xone/1_0 C:\rx.xsd" PharComments="String" CustomizableInfo="String">
         <Phar ZipCode="1234"/>
              <VoicePhone>123-658-9032</VoicePhone>
              <FaxPhone>123-658-5678</FaxPhone>
         </Phar>
    </Request>
    How to resolve this.
    thanks

    sorry, if this was not worded correctly
    when i mean if this was not added- this refers to the xmlns and xmlns:xsi i the xml file.
    wrong xml is not the desired xml output.
    Anyways i resolved it by adding the xmlns in the xsl file and preceeding it with the element names to get the correct value This work.
    Can anyone tell how to add the CDATA to the textnodes of the output xml during transformation.
    Thanks

  • Xsl transformation of xml with wrong namespace

    I have xml with wrong namespace:
    <PAMStartedNotification xmlns="some site">
    <tUser>PLVUSER</tUser>
    </PAMStartedNotification>I need to leave this namespace and transform it.
    As a result of transformation now I get
    <tUser></tUser>
    ...I.e. XPath is not calculated properly.
    If I leave out that namespace then everything is ok.
    But I want to leave that namespace as it is.
    I use the following code to transform xml:
    Templates stylesheet = transformerFactory.newTemplates(new StreamSource(new File(fileName)));
    Transformer processor = stylesheet.newTransformer();
    java.io.StringWriter resultWriter = new java.io.StringWriter();
    StreamResult streamResult = new StreamResult(resultWriter);
    processor.transform(new StreamSource(new StringReader(xmlData)), streamResult);
    transformedXML = resultWriter.getBuffer().toString();Any ideas how to do that(transform xml with wrong namespace)?
    Edited by: prng on Dec 15, 2008 6:43 AM
    Edited by: prng on Dec 15, 2008 6:45 AM

    prng wrote:
    Sorry.
    Here is XPath I use to select tUser:
    /PAMStartedNotification/tUser
    Right. To start out, that selects a PAMStartedNotification element which is in no namespace. But yours isn't. It's in the default namespace, which doesn't have a prefix. You could try this XPath expression:
    /*[local-name() = 'PAMStartedNotification']/*[local-name() = 'tUser'](Untested, might have mis-typings and so on.)

  • Output XML with a default namespace using XQuery

    I'm having a problem with namespaces in an XQuery within ALSB.
    We receive XML from a file which doesn't have any namespace and have to transform it into a different structure, giving it a default namespace such as below:
    Input XML
    <inputRoot>
         <inputAccountName>Joe Bloggs</inputAccountName>
         <inputAccountNumber>10938393</inputAccountNumber>
    </inputRoot>
    Desired output XML
    <outputRoot xmlns="http://www.example.org/outputSchema">
         <outputAccounts>
              <outputAccountName>Joe Bloggs</outputAccountName>
              <outputAccountNumber>10938393</outputAccountNumber>
         </outputAccounts>
    </outputRoot>
    When I attempt to do this using XQuery mapper tool, I end up with a namespace prefix on the outputRoot. The XQuery and result follows:
    XQuery
    declare namespace xf = "http://tempuri.org/XQueryProject/scratchTransformations/test/";
    declare namespace ns0 = "http://www.example.org/outputSchema";
    declare function xf:test($inputRoot1 as element(inputRoot))
    as element(ns0:outputRoot) {
    <ns0:outputRoot>
    <outputAccounts>
    <outputAccountName>{ data($inputRoot1/inputAccountName) }</outputAccountName>
    <outputAccountNumber>{ data($inputRoot1/inputAccountNumber) }</outputAccountNumber>
    </outputAccounts>
    </ns0:outputRoot>
    declare variable $inputRoot1 as element(inputRoot) external;
    xf:test($inputRoot1)
    Result
    <ns0:outputRoot xmlns:ns0="http://www.example.org/outputSchema">
         <outputAccounts>
              <outputAccountName>inputAccountName_1</outputAccountName>
              <outputAccountNumber>inputAccountNumber_1</outputAccountNumber>
         </outputAccounts>
    </ns0:outputRoot>
    How can I write the XQuery in such a way thay the namespace prefix isn't output? I've tried many different methods with no success. I can't declare a default element namespace because my input element doesn't have a namespace
    Thanks in advance

    I spoke too soon, it didn't work quite as perfectly as I'd thought :-) It turns out our client can't handle the xml with the namespace prefix but we've worked out the solution to return XML in the format we originally needed.
    Example below:
    XQuery
    declare namespace xf = "http://tempuri.org/XQueryProject/scratchTransformations/test/";
    declare default element namespace "http://www.example.org/outputSchema";
    declare namespace ns1 = ""
    declare function xf:test($inputRoot1 as element(ns1:inputRoot))
    as element(outputRoot) {
    <outputRoot>
    <outputAccounts>
    <outputAccountName>{ data($inputRoot1/inputAccountName) }</outputAccountName>
    <outputAccountNumber>{ data($inputRoot1/inputAccountNumber) }</outputAccountNumber>
    </outputAccounts>
    </outputRoot>
    declare variable $inputRoot1 as element(inputRoot) external;
    xf:test($inputRoot1)

  • How to convert an xml to another Xml with a different structure...

    hi
    i have an xml which should be converted to a standard xml with an entirely different structure(Different elements)....can this be done with xml,xsl alone or do we need to write an java class along with them...if there are any examples..it would be of great help...plz help me out....as this is a work stopper...
    given below is the kind i have
    <hotelinfo>
    <hotelname>RADISSON HOTEL CHENNAI </hotelname>
    <address>355 C Gst Road St Thomas Mount Chennai1 600016IN</address>     <price>90.00 - 150.00</price>
    <distance>2 (W)</distance>
    </hotelinfo>
    i need to convert it into
    <propertyName>RADISSON HOTEL CHENNAI </propertyName>
    <address>
    <addressLine>355 C Gst Road St Thomas Mount</addressLine>
    <CityName>Chennai</CityName>
    <PostalCode>600 001</PostalCode>
    <StateName>TamilNadu</StateName>
    <CountryName>India</CountryName>
    </address>
    thanks in advance

    Ok here is the code...
    package mypack;
    import java.io.File;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    * @author SM23772
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class Roopa {
         public static void main(String[] args) {
              File docFile = new File("Roopa.xml");
              Document doc = null;
              Document newDoc = null;
              String hname = null, task = null;
              try {
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   doc = db.parse(docFile); //parsing Roopa.xml
                   newDoc = db.newDocument(); //Created New document Object for new xml
                   hname = doc.getElementsByTagName("hotelname").item(0)
                             .getFirstChild().getNodeValue();
                   task = doc.getElementsByTagName("task").item(0).getFirstChild()
                             .getNodeValue();
                   Node rootNode = newDoc.createElement("property-info"); //creating root node;
                   Node pp = newDoc.createElement("name"); //creating a node called name
                   Node taskNode = newDoc.createElement("task"); //creating a node called task
                   pp.appendChild(newDoc.createTextNode(hname)); //appending a text node inisde name
                   taskNode.appendChild(newDoc.createTextNode(task)); //appending the text node inside task
                   rootNode.appendChild(pp); //asppending the nodes inside the root node                       
                   rootNode.appendChild(taskNode);
                   newDoc.appendChild(rootNode); //appending the root node to the document
                   writeXmlFile(newDoc, "Dest.xml"); //function called to write the document to Dest.xml
              } catch (Exception e) {
                   System.out.println(e);
         public static void writeXmlFile(Document doc, String filename) {
              try {
                   // Prepare the DOM document for writing
                   Source source = new DOMSource(doc);
                   // Prepare the output file
                   File file = new File(filename);
                   Result result = new StreamResult(file);
                   // Write the DOM document to the file
                   Transformer xformer = TransformerFactory.newInstance()
                             .newTransformer();
                   xformer.transform(source, result);
              } catch (TransformerConfigurationException e) {
              } catch (TransformerException e) {
    The xml files:
    roopa.xml:
    <hotel>
    <hotelname>RADISSON HOTEL CHENNAI</hotelname>
    <more-info><task>give treate to shanu</task></more-info>
    </hotel>
    Dest.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <property-info><name>RADISSON HOTEL CHENNAI</name><task>give treate to shanu</task></property-info>Please go through the code.. if u have any more concerns do let me know................
    cheers
    Shanu

  • Error validating xml with xsd schema on JSDK 1.4

    Hi All,
    Asked to me do it a Web Service client in Java and validate its xml answer with an xsd file using 1.4 plataform.
    I googled and I saw many samples to 1.5 plataform, and few samples to 1.4, but anyway I tried to do what they asked to me.
    I got connect with service, got the response and so I went to validate that xml with an xsd file.
    But I got an error on that task. The error occurs in the following line
    "Schema schema = factory.getSchema();"
    Bellow my code
    final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
              final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
              final String schemaSource = "C:\\GetAuthorizationServiceOutput.xsd";
              final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();          
              factory.setNamespaceAware(true);
              factory.setValidating(true);
              try {
              factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
              factory.setAttribute(JAXP_SCHEMA_SOURCE,new File(source));
              catch (IllegalArgumentException x) {
                   System.out.println(x.getMessage());
    DocumentBuilder builder = null;
              Document document = null;
              try {
                   builder = factory.newDocumentBuilder();
                   document = builder.parse(new InputSource(new StringReader(ret.toString())));
              } catch (ParserConfigurationException e) {
                   e.printStackTrace();
              } catch (SAXException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              **Schema schema = factory.getSchema();**
              Validator validator = schema.newValidator();
              try {
                   validator.validate(new DOMSource(document));
              } catch (SAXException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
    and here is the exception :
    Caused by: java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema;
    Method onLinkClicked of interface wicket.markup.html.link.ILinkListener targeted at component [MarkupContainer [Component id = btBack, page = br.com.weev.finan.mkb_er.extranet.view.relations.RelationsDetails, path = 30:form:btBack.RelationsDetails$4, isVisible = true, isVersioned = true]] threw an exception
    wicket.WicketRuntimeException: Method onLinkClicked of interface wicket.markup.html.link.ILinkListener targeted at component [MarkupContainer [Component id = btBack, page = br.com.weev.finan.mkb_er.extranet.view.relations.RelationsDetails, path = 30:form:btBack.RelationsDetails$4, isVisible = true, isVersioned = true]] threw an exception
         at wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:198)
         at wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:74)
         at wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65)
         at wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:57)
         at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:896)
         at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:929)
         at wicket.RequestCycle.step(RequestCycle.java:1010)
         at wicket.RequestCycle.steps(RequestCycle.java:1084)
         at wicket.RequestCycle.request(RequestCycle.java:454)
         at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.GeneratedMethodAccessor342.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:187)
         ... 39 more
    Caused by: java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema;
         at br.com.weev.finan.mkb_er.business.manager.impl.RelationManagerImpl.getAuthorizationService(RelationManagerImpl.java:152)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy22.getAuthorizationService(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:377)
         at wicket.proxy.$Proxy39.getAuthorizationService(Unknown Source)
         at br.com.weev.finan.mkb_er.extranet.view.relations.RelationsDetails$4.onClick(RelationsDetails.java:125)
         at wicket.markup.html.link.Link.onLinkClicked(Link.java:254)
         ... 43 more
    It's my first time doing that, so I'm confuse to do it.
    Thank you
    Juliano.

    This is how.
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Validator;
    DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
    dbfac.setNamespaceAware(true);
    SchemaFactory factory1 = SchemaFactory
                        .newInstance("http://www.w3.org/2001/XMLSchema");
    Schema schema = factory1.newSchema(new File("person.xsd"));
    dbfac.setSchema(schema);
    DocumentBuilder dbparser1 = dbfac.newDocumentBuilder();
    Document doc1 = dbparser1.parse(new File("person.xml"));
    Validator validator1 = schema.newValidator();
    DOMSource dm1 = new DOMSource(doc1);
    DOMResult domresult1 = new DOMResult();
    validator1.validate(dm1, domresult1);

  • Content based routing and XML with multiple objects

    I have some structure:
    <contracts>
      <contract>
         <department>1</department>
      </contract>
      <contract>
         <department>1</department>
       </contract>
      <contract>
         <department>2</department>
       </contract>
    </contracts>
    I need to route contract to 2 system based on <department> value:
    contracts/department = 1 --> System1
    contracts/department = 2 --> System2
    Will XI split my XML (based on Content Routing rules in ID) into 2 structures (with departmet=1 and department=2 accordingly) ?
    Or I have to perform 1ToN mapping? I don't like it bacause it will be diffucult to monitor hundred of messages.

    Alternatively if you donot like 1:n mapping and BPM.
    Create two message mappings in the IR
    1.Source :<contracts>
    <contract>
    <department>1</department>
    </contract>
    <contract>
    <department>1</department>
    </contract>
    <contract>
    <department>2</department>
    </contract>
    </contracts>
    Target:
    <contracts>
    <contract>
    <department>1</department>
    </contract>
    <contract>
    <department>1</department>
    </contract>
    Basically mapping generates a target structure which has only department 1.
    2.Same like step1 but the mapping should generate the XML with department = 2.
    Once requires steps are done in the ID , do the content based routing in the reciever determination and give the appropraite message mapping in the interface determination.
    That should your problem and also you will like doing it as it does not involve any split level mapping..:)

  • Create XMl with indentation by DOM

    Hi all,
    I wanna create a xml file with indentation.
    e.g
    <MyXML>
         <MyNode attr1="value1"/>
         <MyNode2 attr1 = "value1"/>
    </myXML>
    I save my xml with the following code
         TransformerFactory transFactory = TransformerFactory.newInstance();
         Transformer transformer = transFactory.newTransformer();
         DOMSource source = new DOMSource(getDocument());
         FileOutputStream os = new FileOutputStream(file);
         StreamResult result = new StreamResult(os);
         transformer.transform(source, result);it create a result like:
    <MyXML><MyNode attr1="value1"/><MyNode2 attr1 = "value1"/></myXML>
    how to achieve my purpose ?

    sorry again, this is what i really want to achieve
    <MyXML>
         <MyNode attr1="value1"/>
         <MyNode2 attr1 = "value1">
              <MyChildNode attr="value"/>
         </MyNode2>
    </MyXML>

  • Error with transform activity - failed to save XSL Map

    I am trying to create a bpel process that gets files via ftp which consists and a set of data records. The plan is for the data to be inserted into a db staging table. Along the way I need to execute a transformation on the data to get it into a form that the staging table can use. Thus I was trying to execute a transform activity which would take the ftp source data which is a xml document with multiple records and then port it into the collection for insertion into the db table. However I find that when I try to save the transform after connecting the recs element to the for-each for the db elements I get a message from jdeveloper 10.1.3.4 "Failed to save XSL Map".
    How to I transport the data and overcome this problem?
    Thanks,
    Steve

    Hi,
         I had faced similar kind of problem earlier. It was not a problem with transformation; it was problem with JDeveloper sessions. Before creating the XSL please check if you can able to connect the remote system from JDeveloper.

  • I am having a issue installing Adobe Acrobat XI.  I am running Windows 8.1. When  go to install it gets an error.  The error is with transform in registry and will not install product. I am looking at how I can fix this registry problem.

    I am having a issue installing Adobe Acrobat XI.  I am running Windows 8.1. When  go to install it gets an error.  The error is with transform in registry and will not install product. I am looking at how I can fix this registry problem.
    I have tried to uninstall all Abode Acrobat installations but one file remains and refuses to be uninstalled. It gives me this error : Error applying Transforms . Verify that specified paths are valid. It was installed on Sept 18 2014.  I have downloaded a Transform update but it tells I do not have a Adobe Acrobat product installed. 

    Hi all,
    Sylonious, did you manage to sort this problem out? I have been experiencing similar problems. I think my problem was because I had many different versions of JDKs. I have done a complete re-install. I would be really grateful to you (and anyone else) for help with this problem.
    I have re-installed JSDK1.4.2_03, set the "path" variable to "C:\JSDK1.4.2_03".
    When I compile using "javac" I get an error saying "javac" is not recognised.
    When I compile using "C:\j2sdk1.4.2_03\bin\javac Freq.java" no error is thrown.
    Every time I try to run a java file, I always get the NoClassDefFound error. When run with the -verbose option, files are loaded from C:\Program Files\Java\j2re1.4.2_03\bin - is this correct?
    I have removed all previous references to java in the registry editor.
    Please help !
    Regards,
    Vipul

  • Order split functionality with PP-PI

    Hello Forum,
    I am not sure whether we can use the order split functionality with process orders .  I had implemented it earlier for a client with discrete MFG production type but not aware whether we can do so in process industry (couldn't find the provision to do so in process order operation overview screen function menu path).
    Cheers
    Kaushik

    Hi Kaushik,
    Yes your right.
    Order split functionality is only applicable for Discrete manfg not for PI industry this is major difference between PI & DM.But you can achieve this at the time of process order confirmation.
    Example :-In the Goods Movement Overview of Process Order confirmation FG material is done Auto GR. This FG material Quantity needs to be splitted. Push button "Split" is provided in the bottom of the Goods Movement Overview screen of Process Order Confirmaton.
    Say FG quantity = 25 KG  which is to be confirmed. Client wants to split the FG quantity into 1 KG wise, for this he needs to split into 25 times.
    You can implement this by using below work order
    Please use the WORKORDER_GOODSMVT for splitting the GR in Confirmation
    This u can implement in PI.Also check Mr.Paulo reply that could be one possibility.
    check & revert.
    TnX

  • Split valuation with batch management and project stock

    Dear Gurus,
    I need to combine two following requirements:
    1. split valuation with batch management (valuation type = batch number)
    2. project stock
    These two functionalities work fine separately but not together.
    I receipt PO for material with spiit valuation on a batch level into a project stock. Posting is OK and material document (MSEG table) seems to be OK (batch number, valuation type and project stock are in this table). The problem appears when I want to display material in this valuation type (MM03) or batch (MSC3n). They don't exist!!!  Short investigation showed that during goods receipt table MBEW (valuated stock) was not updated with this valuation type.
    But If PO is receipt into normal stock first and then posted into project stock everything is OK.
    Have you had or heart about such issue? I would appreciate any sugestion. 
    Thsnks in advance.
    Marcin Bernat

    Hi,
    As you already know ,u are using project stock and doing goods receipt against project, stock table QBEW will be updated and not MBEW. MBEW only updates in case of plant stock valuation. If u receive any goods against project stock it does not contribute to plant stock. Irrespective whether your material is managed in split valuation or not, If it is received against project stock it only updates QBEW. There is no need to update MBEW, if u r using split valuation in project. QBEW also have valuation type as another level like MBEW. If u want to see material price for project stock, it can be  seen in QBEW -valuation type and not in mm03.
    As u r receiving goods against project stock this is d only reason QBEW is updated and not MBEW.
    QBEW will store all information like MBEW for batch number, valuation type and project stock assignment.
    Hope it answers your question.
    Deepak.

  • HT6114 My Mac Book Pro had a split drive with Windows Microsoft Access on it and it was removed when Mavericks installed.  I need this so how can I go back to the old system?

    My Mac Book Pro had a split drive with Windows Microsoft Access on it and it was removed when Mavericks installed.  I need this so how can I go back to the old system?

    Restore from the backup you had prior to installing Mavericks.
    However, the upgrade should not have altered your partition scheme. Did your erase and format the drive prior to upgrading?

  • How to save as XML with some predefined extensions

    hi All,
    In my application a template has to be created which should contain field headers and their respective field types - example field header LEVEL and field type COMBO BOX. Purpose is - a table will be created based on the fields in the template. Now I want to save this template as XML file with some predefined extension (like .templ). Later in my application i will retreive the saved template and use it to create table.
    How can i save the file as XML with some predefined extension. We are using Swing to create template. Please help me with sample programs to solve this problem.
    awaiting for your mail
    Thank you
    Regards
    MKumar

    In an other post I found my solution thanks to "Peggy" :
    Save As… has returned with Mountain Lion. Hold down the Option/alt key while clicking on the File menu & there it is! It also has a default keyboard shortcut.
    Thank you Peggy

Maybe you are looking for

  • Key Figure Summation in Result Row with Cumulation Ticked

    Hi, I have a Bex question regarding the summation rows.  I need a Year To Date amount and a Period To Date amount in the report.  However, there is no Year To Date key figure available in the cube.  So in order to calculate YTD, I'm using the PTD key

  • Java Exception Error while trying to run Webutil demo

    I am trying to run a webutil demo but failing due to the following error... the error is as Oracle JInitiator: Version 1.3.1.9 Using JRE version 1.3.1.9 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\Aruns Proxy Configurat

  • Printer compatability for my G4

    I have a powermac G4 using OSX 10.4.11 and also loaded with system 9 which I still use for some of my older applications. I've been using macs for years but am now a late comer to OSX. I'm looking at an HP 8500 jet printer to use with this computer.

  • CCMS Monitoring SAPconnect

    How i can activate the automatic Data collection method for SAPconnect. When I start the Data collection method for SAPconnect manually, these ran with no       errors but in help is described: You can only start the data collection method manually f

  • Elements and Premiere stopped working

    Last week I purchased Elements 8.0 and Premiere (Windows 7), the install went perfect but suddenly both programs only show the tutorials after start-up. There is no option to stop the tutorial, and both programs are greyed out. Probably a re-install