Hi All,

I need to get workflowExternalRef node value when I am executing the
code[1] I am getting an XML Object[2]. Is there any way to get
workflowExternalRef value only ?. I tried to get that using the code [3]
but I got the an exception[4]. Can I get it directly or do I have to read
the XML and get it ?

[1] humanTaskClientAPIAdminClient.getInput(b4pTask.getId(), null);

[2] <?xml version="1.0" encoding="UTF-8"?>
     <ApplicationApprovalData xmlns="
http://workflow.application.apimgt.carbon.wso2.org";     xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/";>
        <applicationName>ApplicationCreation-application</applicationName>
        <applicationTier>Unlimited</applicationTier>
        <applicationCallbackUrl/>
        <applicationDescription>this-is-test</applicationDescription>
        <tenantDomain>carbon.super</tenantDomain>
        <userName>admin</userName>
        <workflowExternalRef>8b72d3b3-fc6d-4ef2-860c-65c28f248be4</
workflowExternalRef>
        <callBackURL>https://localhost:8243/services/WorkflowCallbackService
</callBackURL>
      </ApplicationApprovalData>

[3]  NCName ncName = new NCName();
   ncName.setValue("workflowExternalRef");
   String workflowExternalRefValue = (String)
humanTaskClientAPIAdminClient.getInput(b4pTask.getId(), ncName);

[4] Sep 29, 2015 6:31:31 PM
org.wso2.am.admin.clients.bps.HumanTaskClientAPIAdminClient getInput

SEVERE: Unable to get Input for task 7388

org.apache.axis2.AxisFault: org.apache.xerces.dom.DeferredTextImpl cannot
be cast to org.w3c.dom.Element

at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)

at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)

at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445)

at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)

at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)

at
org.wso2.carbon.humantask.stub.ui.task.client.api.HumanTaskClientAPIAdminStub.getInput(HumanTaskClientAPIAdminStub.java:17246)

at
org.wso2.am.admin.clients.bps.HumanTaskClientAPIAdminClient.getInput(HumanTaskClientAPIAdminClient.java:262)

at
org.wso2.automation.platform.tests.apim.bps.ApplicationCreationWorkflowTestCase.verifyApplicationResponse(ApplicationCreationWorkflowTestCase.java:176)

at
org.wso2.automation.platform.tests.apim.bps.ApplicationCreationWorkflowTestCase.throttlingTestCase(ApplicationCreationWorkflowTestCase.java:118)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)

at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)

at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)

at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)

at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)

at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)

at org.testng.TestRunner.runWorkers(TestRunner.java:1178)

at org.testng.TestRunner.privateRun(TestRunner.java:757)

at org.testng.TestRunner.run(TestRunner.java:608)

at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)

at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)

at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)

at org.testng.SuiteRunner.run(SuiteRunner.java:240)

at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)

at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)

at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)

at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)

at org.testng.TestNG.run(TestNG.java:999)

at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:295)

at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)

at
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:90)

at
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)

at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)

at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Thanks,
Iqbal
-- 
Irham Iqbal
Software Engineer - Test Automation
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware
phone: +94 777888452
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to