Visualizzazione dei risultati da 1 a 6 su 6
  1. #1
    Utente di HTML.it L'avatar di Angelo1974
    Registrato dal
    Feb 2003
    Messaggi
    1,107

    [ Java ] SaxException in file xml

    Ciao a tutti; ho questo file xml:

    Codice PHP:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Package xmlns="http://www.wfmc.org/2002/XPDL1.0" 
      xmlns:xpdl="http://www.wfmc.org/2002/XPDL1.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:vx="http://www.an.danet.de/2002/XPDL-Extensions1.0"
      xsi:schemaLocation="http://www.wfmc.org/2002/XPDL1.0 [url]http://wfmc.org/standards/docs/TC-1025_schema_10_xpdl.xsd[/url]"  
      Id="Bootstrap" Name="Initial workflow processes">
      <PackageHeader>
        <XPDLVersion>0.09</XPDLVersion>
        <Vendor>Danet GmbH, GS AN</Vendor>
        <Created>Sat Aug 24 15:12:01 CEST 2002</Created>
      </PackageHeader>

      <Applications>
        <Application Id="WebForm">
          <Description>Processing of an activity using a web form.</Description>
          <ExtendedAttributes>
        <ExtendedAttribute Name="Implementation">
          <vx:ToolAgent Class="de.danet.an.webform.Submitter"
            Execution="SYNCHR">
            <vx:Property Name="Form">
              <wf:form-data xmlns:wf="http://www.an.danet.de/2002/WebForm">
            <wf:layout>
              <i xmlns="">Input fields[/i]
            </wf:layout>
              </wf:form-data>
            </vx:Property>
          </vx:ToolAgent>
        </ExtendedAttribute>
          </ExtendedAttributes>
        </Application>

        <Application Id="SendResponse">
          <Description>Send a response message to a servlet</Description>
          <FormalParameters>
        <FormalParameter Id="channel" Mode="IN">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
        </FormalParameter>
            <FormalParameter Id="message" Mode="IN">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
        </FormalParameter>
          </FormalParameters>
          <ExtendedAttributes>
        <ExtendedAttribute Name="Implementation">
          <vx:ToolAgent Class="de.danet.an.workflow.tools.chabacc.Sender"/>
        </ExtendedAttribute>
          </ExtendedAttributes>
        </Application>

        <Application Id="SendXMLResponse">
          <Description>Send a response message to a servlet</Description>
          <FormalParameters>
        <FormalParameter Id="channel" Mode="IN">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
        </FormalParameter>
            <FormalParameter Id="message" Mode="IN">
          <DataType>
            <SchemaType/>
          </DataType>
        </FormalParameter>
          </FormalParameters>
          <ExtendedAttributes>
        <ExtendedAttribute Name="Implementation">
          <vx:ToolAgent Class="de.danet.an.workflow.tools.chabacc.Sender"
            XMLParameterMode="USE_SAX"/>
        </ExtendedAttribute>
          </ExtendedAttributes>
        </Application>

      </Applications>

      <WorkflowProcesses>

        
        <WorkflowProcess Id="account_new" Name="Create Account">
          <ProcessHeader>
        <Created>01.09.2001</Created>
        <Description>
          This is a very simple example of a process that consists of
          several steps.
        </Description>
        <Priority>1</Priority>
          </ProcessHeader>
          <DataFields>
        <DataField Id="accountType" IsArray="FALSE">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
          <InitialValue>ec</InitialValue>
          <Description>Data for process initialization</Description>
        </DataField>
        <DataField Id="accountAccess" IsArray="FALSE">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
          <InitialValue>mother sister fatherly brother wife</InitialValue>
          <Description>Data for process initialization</Description>
        </DataField>
        <DataField Id="testData" IsArray="FALSE">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
          <InitialValue>relevant process test data</InitialValue>
          <Description>Data for process initialization</Description>
        </DataField>
        <DataField Id="emailAddress" IsArray="FALSE">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
          <InitialValue>account@bank.com</InitialValue>
          <Description>Address where to report account requests.</Description>
        </DataField>
        <DataField Id="status" IsArray="FALSE">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
        </DataField>
        
        <DataField Id="recipient" IsArray="FALSE">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
          <InitialValue>customer@bank.com</InitialValue>
          <Description/>
        </DataField>
        <DataField Id="message" IsArray="FALSE">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
          <InitialValue>Account created</InitialValue>
          <Description/>
        </DataField>
        <DataField Id="sender" IsArray="FALSE">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
          <InitialValue>account@bank.com</InitialValue>
          <Description/>
        </DataField>
        <DataField Id="packageTestData" IsArray="FALSE">
          <DataType>
            <BasicType Type="STRING"/>
          </DataType>
          <InitialValue>package relevant data</InitialValue>
        </DataField>
          </DataFields>
          <Participants>
        <Participant Id="grpAB" Name="Order Processing">
          <ParticipantType Type="RESOURCE_SET" />
        </Participant>
        <Participant Id="currentUser" Name="Current User">
          <ParticipantType Type="HUMAN" />
          <ExtendedAttributes>
            <ExtendedAttribute Name="resource-selection"
              Value="!:currentUser"/>
          </ExtendedAttributes>
        </Participant>
          </Participants>
          <Applications>
        <Application Id="WebFormPlus">
          <Description>Processing of an activity using a web form.
          </Description>
          <FormalParameters>
            <FormalParameter Id="accountType" Mode="INOUT">
              <DataType>
            <BasicType Type="STRING"/>
              </DataType>
            </FormalParameter>
            <FormalParameter Id="accessGrant" Mode="INOUT">
              <DataType>
            <BasicType Type="STRING"/>
              </DataType>
            </FormalParameter>
            <FormalParameter Id="emailAddress" Mode="INOUT">
              <DataType>
            <BasicType Type="STRING"/>
              </DataType>
            </FormalParameter>
            <FormalParameter Id="statusOut" Mode="OUT">
              <DataType>
            <BasicType Type="STRING"/>
              </DataType>
            </FormalParameter>
          </FormalParameters>
          <ExtendedAttributes>
            <ExtendedAttribute Name="Implementation">
              <vx:ToolAgent Class="de.danet.an.webform.Submitter"
            Execution="SYNCHR">
            <vx:Property Name="Form">
              <wf:form-data xmlns:wf="http://www.an.danet.de/2002/WebForm">
                <wf:layout xmlns="http://www.w3.org/2002/08/xforms/cr">
                  <input ref="wf:argument[@name='firstname']">
                <label>First name </label>
                  </input>
                  <input ref="wf:argument[@name='lastname']">
                <label>Last name </label>
                  </input>
                  <input ref="wf:argument[@name='emailAddress']">
                <label>Email </label>
                  </input>
                  <select1 ref="wf:argument[@name='country']">
                <label>Country </label>
                <choices>
                  <item>
                    <label>Germany</label>
                    <value>germany</value>
                  </item>
                  <item>
                    <label>USA</label>
                    <value>usa</value>
                  </item>
                </choices>
                  </select1>
                  <select1 ref="wf:argument[@name='accountType']">
                <label>Type </label>
                <choices>
                  <item>
                    <label>Visa</label>
                    <value>visa</value>
                  </item>
                  <item>
                    <label>Mastercard</label>
                    <value>mastercard</value>
                  </item>
                  <item>
                    <label>EC</label>
                    <value>ec</value>
                  </item>
                  <item>
                    <label>Money card</label>
                    <value>moneycard</value>
                  </item>
                </choices>
                  </select1>
                  <select ref="wf:argument[@name='accessGrant']">
                <label>Access granted: </label>
                <choices>
                  <item>
                    <label>Wife</label>
                    <value>wife</value>
                  </item>
                  <item>
                    <label>Husband</label>
                    <value>husband</value>
                  </item>
                  <item>
                    <label>Mother</label>
                    <value>mother</value>
                  </item>
                  <item>
                    <label>Father</label>
                    <value>father</value>
                  </item>
                  <item>
                    <label>brother</label>
                    <value>brother</value>
                  </item>
                  <item>
                    <label>Sister</label>
                    <value>sister</value>
                  </item>
                </choices>
                  </select>
                  <secret ref="wf:argument[@name='password']">
                <label>Password </label>
                  </secret>
                  <secret ref="wf:argument[@name='retypepassword']">
                <label>Retype password </label>
                  </secret>
                  <textarea ref="wf:argument[@name='notice']">
                <label>Notice </label>
                  </textarea>
                </wf:layout>
              </wf:form-data>
            </vx:Property>
              </vx:ToolAgent>
            </ExtendedAttribute>
          </ExtendedAttributes>
        </Application>
        <Application Id="processingForm">
          <Description>Processing of an activity using a web form.
          </Description>
          <ExtendedAttributes>
            <ExtendedAttribute Name="Implementation">
              <vx:ToolAgent Class="de.danet.an.webform.Submitter"
            Execution="SYNCHR">
            <vx:Property Name="Form">
              <wf:form-data xmlns:wf="http://www.an.danet.de/2002/WebForm">
                <wf:layout>
                  <i xmlns="">Input fields[/i]
                </wf:layout>
              </wf:form-data>
            </vx:Property>
              </vx:ToolAgent>
            </ExtendedAttribute>
          </ExtendedAttributes>
        </Application>
        <Application Id="SendMail">
          <Description>Send a mail
          </Description>
          <FormalParameters>
            <FormalParameter Id="emailAddress" Mode="IN">
              <DataType>
            <BasicType Type="STRING"/>
              </DataType>
            </FormalParameter>
            <FormalParameter Id="statusOut" Mode="OUT">
              <DataType>
            <BasicType Type="STRING"/>
              </DataType>
            </FormalParameter>
          </FormalParameters>
    Quando la parso ottengo l'eccezione:

    Codice PHP:
    2004-07-08 09:56:59,969 INFO  [STDOUT] [DefaultProcessDefinition,ERRORCannot read XPDLThe prefix "xsi" for attribute "xsi:schemaLocation" is not bound.
    org.xml.sax.SAXParseExceptionThe prefix "xsi" for attribute "xsi:schemaLocation" is not bound.
        
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1162
    Ma a me il file sembra ben fatto;qualcuno sa darmi una dritta? Grazie e ciao
    Se vuoi trovare l'arcobaleno, devi sopportare la pioggia

  2. #2
    Utente di HTML.it L'avatar di Angelo1974
    Registrato dal
    Feb 2003
    Messaggi
    1,107
    Ah... ovviamente il file non finisce come vi ho mostrato; esso è ben fatto solo che era troppo lungo; penso sia dovuto, l'errore, a livello di namespaces che si riferiscono ad url obsoleti... solo che non riesco a capire dove potrei re-indirizzarli.
    Ciao
    Se vuoi trovare l'arcobaleno, devi sopportare la pioggia

  3. #3
    Scusa.. x le mie conoscenze di XML non si può aperire un tag se non hai chiuso col ">" quello prima o sbaglo?

    Codice PHP:
    <Package xmlns="http://www.wfmc.org/2002/XPDL1.0" 
      
    xmlns:xpdl="http://www.wfmc.org/2002/XPDL1.0"
      
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      
    xmlns:vx="http://www.an.danet.de/2002/XPDL-Extensions1.0"
      
    xsi:schemaLocation="http://www.wfmc.org/2002/XPDL1.0 [url="http://wfmc.org/standards/docs/TC-1025_schema_10_xpdl.xsd"][url]http://wfmc.org/standards/docs/TC-1...ema_10_xpdl.xsd[/url][/url]"  
      
    Id="Bootstrap" Name="Initial workflow processes"
    okkio alle distrazioni...

    PS: e poi, perchè hai chiuso 2 volte <a>
    Blink@go

    "Non tutto quel che è oro brilla, Ne gli erranti sono perduti; Il vecchio ch'è forte non s'aggrinza, Le radici profonde non gelano.Dalle ceneri rinascerà un fuoco, L'ombra sprigionerà una scintilla, Nuova sarà la lama ormai rotta, E re quei ch'è senza corona."

    ------------
    Lang: java 1.4.1 Eclipse

  4. #4
    Utente di HTML.it
    Registrato dal
    Feb 2003
    Messaggi
    1,965
    xml DEVE essere WELL-FORMED

  5. #5
    Originariamente inviato da keratox
    xml DEVE essere WELL-FORMED
    era ovvio... E credo che Angelo lo sappia..
    Blink@go

    "Non tutto quel che è oro brilla, Ne gli erranti sono perduti; Il vecchio ch'è forte non s'aggrinza, Le radici profonde non gelano.Dalle ceneri rinascerà un fuoco, L'ombra sprigionerà una scintilla, Nuova sarà la lama ormai rotta, E re quei ch'è senza corona."

    ------------
    Lang: java 1.4.1 Eclipse

  6. #6
    Utente di HTML.it L'avatar di Angelo1974
    Registrato dal
    Feb 2003
    Messaggi
    1,107
    Grazie a tutti; so che il documento deve essere ben formato; il problema è che sono partito da un esempio che mi hanno assicurato essere funzionante e non ho controllato il file; poi non ho notato l'errore... come si dice 4 occhi guardano meglio di 2; in questo caso erano 6

    Originariamente inviato da keratox
    xml DEVE essere WELL-FORMED
    Lo so che xml deve essere ben formato.... cmq grazie delle risposte; vi terrò aggiornati.
    Ciao
    Se vuoi trovare l'arcobaleno, devi sopportare la pioggia

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.