[
https://issues.apache.org/jira/browse/ODE-673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tammo van Lessen updated ODE-673:
---------------------------------
Fix Version/s: 1.3.5
> InstanceManagement API methods with InstanceInfoListDocument as the return
> type, returns an instance-info-list element which doesn't have a namespace
> set, when called using ServiceClientUtil
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ODE-673
> URL: https://issues.apache.org/jira/browse/ODE-673
> Project: ODE
> Issue Type: Bug
> Components: Management API
> Environment: Windows XP, Apache Tomcat 6.0
> Reporter: Chockalingam Chidambaram
> Fix For: 1.3.5
>
>
> InstanceManagement API methods with InstanceInfoListDocument as the return
> type, returns an instance-info-list element which doesn't have a namespace
> set, when called using ServiceClientUtil
> This is the code I execute from a simple java program. (This code executes
> "listAllInstances" method, but I tried the same for "listInstances" method
> too with the same result).
> ServiceClientUtil client = new ServiceClientUtil();
> OMElement root = client.buildMessage("listAllInstances", new String[]{}, new
> String[]{});
> OMElement result;
> InstanceInfoListDocument instanceInfoList;
> try
> {
> result = client.send(root,
> "http://localhost:8080/ode/processes/InstanceManagement");
> OMElement instInfoListElement =
> (OMElement)result.getChildElements().next();
>
> // 1
> instanceInfoList =
> InstanceInfoListDocument.Factory.parse(instInfoListElement.getXMLStreamReader());
> instanceInfoList.dump();
> }
> catch (Exception e)
> {
> e.printStackTrace();
> }
> I get the following error:
> org.apache.xmlbeans.XmlException: error: The document is not a
> instance-info-l...@http://www.apache.org/ode/pmapi/types/2006/08/02/:
> document element namespace mismatch expected
> "http://www.apache.org/ode/pmapi/types/2006/08/02/" got ""
> The value of [OMElement result] is as follows
> <axis2ns15:listAllInstancesResponse
> xmlns:axis2ns15="http://www.apache.org/ode/pmapi">
> <instance-info-list>
> <ns:instance-info
> xmlns:ns="http://www.apache.org/ode/pmapi/types/2006/08/02/">
> <ns:iid>251</ns:iid>
> <ns:pid>{http://sample.bpel.org/bpel/sample}Helloworld-1</ns:pid>
> <ns:process-name
> xmlns:sam="http://sample.bpel.org/bpel/sample">sam:Helloworld</ns:process-name>
> <ns:status>COMPLETED</ns:status>
> <ns:dt-started>2009-09-30T14:16:42.087-05:00</ns:dt-started>
> <ns:dt-last-active>2009-09-30T14:16:42.477-05:00</ns:dt-last-active>
> </ns:instance-info>
> </instance-info-list>
> </axis2ns15:listAllInstancesResponse>
> The InstanceManagement API should have returned <ns:instance-info-list
> xmlns:ns="http://www.apache.org/ode/pmapi/types/2006/08/02/"> instead of
> <instance-info-list>. The namespace has been set right in the instance-info
> element, but it is missing in the instance-info-list element.
> Hence I added the following line at //1
> instInfoListElement.setNamespace(new
> OMNamespaceImpl("http://www.apache.org/ode/pmapi/types/2006/08/02/","ns"));
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira