Hi,

I suppose your are using the wrong document object to parse. XML Beans
would have generated a class by name ProcessInfoListDocument. Try using
that.

regards,
sathwik

On 09/12/2012 10:48 AM, 毛可 wrote:
> Hi everybody,
>
> I'm trying to query processes on ODE using Process Management Web Service, 
> and then using XMLBeans to serialize and deserialize the returned values 
> from/to XML.
> Following lines of code are used
>
>>  ScopeInfoDocument scopeIndoDoc = 
>> ScopeInfoDocument.Factory.parse(result.getXMLStreamReader());
> But we have encountered a problem as following
>
>>  Exception in thread "main" org.apache.xmlbeans.XmlException: 
>>      error: The document is not a 
>> scope-info@http://www.apache.org/ode/pmapi/types/2006/08/02/: 
>>          document element mismatch got 
>> listAllProcessesResponse@http://www.apache.org/ode/pmapiat
>>  org.apache.xmlbeans.impl.store.Locale.verifyDocumentType(Locale.java:452)at
>>  org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:357)at
>>  org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:850)at
>>  org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826)at
>>  
>> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231)at
>>  
>> org.apache.ode.bpel.pmapi.ScopeInfoDocument$Factory.parse(ScopeInfoDocument.java:83)at
>>  ode.main(ode.java:15)
> And the content of result is
>
>>  <axis2ns18:listAllProcessesResponse 
>> xmlns:axis2ns18="http://www.apache.org/ode/pmapi";>
>>    <process-info-list>
>>      <ns:process-info 
>> xmlns:ns="http://www.apache.org/ode/pmapi/types/2006/08/02/";>
>>        
>> <ns:pid>{http://server-pc:8082/ode/processes/CalculatorProj}CalculatorProj-1</ns:pid>
>>        <ns:status>ACTIVE</ns:status>
>>        <ns:version>1</ns:version>
>>        <ns:definition-info>
>>          <ns:process-name 
>> xmlns:cal="http://server-pc:8082/ode/processes/CalculatorProj";>cal:CalculatorProj</ns:process-name>
>>        </ns:definition-info>
>>        <ns:deployment-info>
>>          <ns:package>dd-1</ns:package>
>>          <ns:document>CalculatorProj.bpel</ns:document>
>>          <ns:deploy-date>2012-07-20T14:29:00.765+08:00</ns:deploy-date>
>>          <ns:deployer></ns:deployer>
>>        </ns:deployment-info>
>>        <ns:instance-summary>
>>          <ns:instances state="ACTIVE" count="0"></ns:instances>
>>          <ns:instances state="COMPLETED" count="0"></ns:instances>
>>          <ns:instances state="ERROR" count="0"></ns:instances>
>>          <ns:instances state="FAILED" count="0"></ns:instances>
>>          <ns:instances state="SUSPENDED" count="0"></ns:instances>
>>          <ns:instances state="TERMINATED" count="0"></ns:instances>
>>        </ns:instance-summary>
>>        <ns:properties></ns:properties>
>>        <ns:endpoints></ns:endpoints>
>>        <ns:documents>
>>          <ns:document>
>>            <ns:name>AddService.wsdl</ns:name>
>>            <ns:type>http://schemas.xmlsoap.org/wsdl/</ns:type>
>>            <ns:source>file:/E:/Program Files/Tomcat 
>> 7.0/webapps/ode/WEB-INF/processes/dd-1/AddService.wsdl</ns:source>
>>          </ns:document>
>>          <ns:document>
>>            <ns:name>CalculatorProj.bpel</ns:name>
>>            
>> <ns:type>http://schemas.xmlsoap.org/ws/2004/03/business-process/</ns:type>
>>            <ns:source>file:/E:/Program Files/Tomcat 
>> 7.0/webapps/ode/WEB-INF/processes/dd-1/CalculatorProj.bpel</ns:source>
>>          </ns:document>
>>          <ns:document>
>>            <ns:name>CalculatorProj.cbp</ns:name>
>>            
>> <ns:type>http://ode.apache.org/schemas/2005/12/19/CompiledBPEL</ns:type>
>>            <ns:source>file:/E:/Program Files/Tomcat 
>> 7.0/webapps/ode/WEB-INF/processes/dd-1/CalculatorProj.cbp</ns:source>
>>          </ns:document>
>>          <ns:document>
>>            <ns:name>CalculatorProjArtifacts.wsdl</ns:name>
>>            <ns:type>http://schemas.xmlsoap.org/wsdl/</ns:type>
>>            <ns:source>file:/E:/Program Files/Tomcat 
>> 7.0/webapps/ode/WEB-INF/processes/dd-1/CalculatorProjArtifacts.wsdl</ns:source>
>>          </ns:document>
>>          <ns:document>
>>            <ns:name>SubService.wsdl</ns:name>
>>            <ns:type>http://schemas.xmlsoap.org/wsdl/</ns:type>
>>            <ns:source>file:/E:/Program Files/Tomcat 
>> 7.0/webapps/ode/WEB-INF/processes/dd-1/SubService.wsdl</ns:source>
>>          </ns:document>
>>        </ns:documents>
>>      </ns:process-info>
>>    </process-info-list>
>>  </axis2ns18:listAllProcessesResponse>
> Hope somebody can help me figure out what I'm doing wrong.
>
> Thanks!
>
>
>
>
> Maoke,
> School of Management and Engineering,
> Nanjing University, Nanjing, Jiangsu, P.R.China,
> Post Code: 210093,
> E-mail: [email protected]

Reply via email to