1

I can access this API/WS through
http://localhost:8080/ode/processes/ProcessManagement?wsdl.

  1. I would like to get the Process Info of a Process through this service and active it.
    The serivce has the matching operations getProcessInfo and activate.
    With listAllProcesses I get all Processes of a delpoyed package.
    For getProcessInfo/activate I need the Process pid.
    I get a <ns:pid>, using this gets me a load of Exceptions.
    Using the name of the process and other stuff I receive earlier doesn't work either.
    The pid is of type QName, perhaps thats the root of the problem.
    However I don't now how to typecast here.
    (Tried all with the eclipse Web Services Explorer and soapUI)

    question: How does a proper request for both Operations look like?

  2. When I try to consume the webservice with axi2 via eclipse, there is a undeclared variable local in the AnySimpleType class. I'm not keen on using the service this way. But since I'm already writing a Client for the DeploymentService I thought about this approach.

    question: How do I properly access the ProcessManagement?

EDIT: I have a simular problem with the DeploymentService and the undeploy Operation.
EDIT2: I figured the Problem with the DeploymentService undeploy out.
I had to get the Packagename as String. Then a made a javax.xml.namespace.QName out of it. Then I used the setPackageName of said undeploy operation.

Answer to question number 1: soapUI with listAllProcesses returns
<ns:pid>{ode/bpel/unit-test}HelloWorld2-1</ns:pid>
getProcessInfo wants

<pmap:getProcessInfo>
    <pid>?</pid>
</pmap:getProcessInfo>

Now I replaced <pid>?</pid> with
<pid xmlns:odetest="http://ode/bpel/unit-test">odetest:HelloWorld2-1</pid> and it worked like a charm.

Community
  • 1
  • 1
snippl
  • 235
  • 1
  • 2
  • 13

1 Answers1

1

I remember that there was an issue with parameter ordering when using the Axis2 generated WSDL. Could you try if building a request against the original WSDL located at http://localhost:8080/ode/deployment/services/ProcessManagement works?

EDIT: Now that I got the question correctly, the problem is that ODE expects the QName to be serialized differently, i.e. in the XML way instead of the Java way. Thus, instead of <ns:pid>{ode/bpel/unit-test}HelloWorld2-1</ns:pid> the correct notation is <ns:pid xmlns:odetest="ode/bpel/unit-test">odetest:HelloWorld2-1</ns:pid>.

vanto
  • 3,134
  • 18
  • 28
  • I still can't forge a valid request for getProcessInfo and if I try to let eclipse and axis2 do its magic, it's even worse. No code at all will be generated and I get the following error:Exception occurred during code generation for WSDL : org.apache.axis2.AxisFault: org.apache.ws.commons.schema.XmlSchemaException: An imported schema was announced to have the namespace http://www.apache.org/ode/pmapi/types/2006/08/02/, but has the namespace null – snippl Dec 20 '12 at 07:58
  • In soapUI I do the following steps: listAllProcesses, which gives me a list of my processes. I have i.e. {http://ode/bpel/unit-test}HelloWorld2-1 now I try to get the process info with getProcessInfo with this pid. I only receive a load of errors. What is wrong with my ``? – snippl Dec 20 '12 at 08:06
  • Ah, please try to use a "real" QName and not its java serialization. So instead of ```{ode/bpel/unit-test}HelloWorld2-1``` I think it should read ```odetest:HelloWorld2-1``` – vanto Dec 20 '12 at 09:27
  • Since I can't import the service with axis2, I'm using soapUI. The `` looks like this `?`. The pid is not ns:pid like I get from the listAllProcesses. So I still receive loads of errors. – snippl Dec 20 '12 at 10:24
  • What you suggested was nearly right, there was a http:// missing. I replaced the `` with `odetest:HelloWorld2-1` that worked. Unfortunately that's only soapUI. – snippl Dec 20 '12 at 11:50
  • I just realised that activating a process doesn't start it, I don't need the ProcessManagement anymore. So nevermind the axis2 import problem. But I still have the problem with DeploymentService `undeploy` – snippl Dec 20 '12 at 12:35
  • I also figured the `undeploy` Problem out (see edit). Thank you. Do you wanna edit your answer or should I accept it anyway? Do you have any suggestions to this http://stackoverflow.com/questions/13858380/parse-bpel-file-to-extract-activities-xpath#comment19217870_13858380 ? – snippl Dec 20 '12 at 12:49
  • Regarding the missing http://, I took that from your example, which didnt have the http:// in the namespace. I edited my answer accordingly, thanks! – vanto Dec 20 '12 at 17:59
  • You're right. That is weird that got lost somewhere. Thank you. – snippl Dec 20 '12 at 18:34