On Tue, Apr 14, 2009 at 8:17 AM, Jacob, Matthias <
[email protected]> wrote:

> Hi all,
>
> I have to deploy processes automatically to ODE (I am using v1.2)
> instead of copying the zip file manually into the right folder.
> Therefore, I tried to use ODE`s DeploymentService and its "deploy"
> operation, but both the Axis and JAX-WS client stubs are not able to
> process the service response correctly (using the Apache Axis 1.4 Apr
> 22, 2006 (06:55:48 PDT) WSDL2Java emitter and Metro with JAX-WS RI
> 2.1.4.1).


I believe this has been fixed in the 1.X branch.

Matthieu


> At first, here is the SOAP response returned by the
> DeploymentService:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>  <soapenv:Body>
>    <response>
>      <name>
>          test-1
>      </name>
>     <id xmlns:axis2ns1="http://example.com/inside/pm";>
>       axis2ns1:CalculatorInvokeProcess-1
>     </id>
>   </response>
>  </soapenv:Body>
> </soapenv:Envelope>
>
> So the client stubs should take this response and transform it into a
> DeployUnit with the given name and id. Unfortunately, the thing is not
> that simple.
>
> The Axis client stub processes the request without error, but the
> response is empty (e. g. the stub returns a DeployUnit whose name and id
> property are null).
>
> The JAX-WS client stub throws an exception as the service response does
> not match the expectations of the client:
>
> Exception in thread "main"
> com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag.
> expected: 
> {http://www.apache.org/ode/pmapi}deployResponse<http://www.apache.org/ode/pmapi%7DdeployResponse>but
>  found:
> {null}response
>        at
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUt
> il.java:214)
>        at
> com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUt
> il.java:222)
>        at
> com.sun.xml.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBu
> ilder.java:524)
>        at
> com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.jav
> a:121)
>        at
> com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.jav
> a:89)
>        at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
>        at $Proxy38.deploy(Unknown Source)
>        at
> odetest.executor.ExecutorTestImpl.execute(ExecutorTestImpl.java:60)
>        at
> odetest.executor.ExecutorTestImpl.main(ExecutorTestImpl.java:97)
>
> What caught my eye first: Where is the XML namespace for the response
> tag? Should it not be declared explicitly? This would explain JAX-WS`
> behavior (the found namespace is null).
>
> Additionally, JAX-WS seems to expect a "deployResponse" but finds a
> "response" tag instead. I am not sure, whether JAX-WS or the service
> response is right according to the WSDL of the DeploymentService. This
> problem can be solved by making a small change in the client stub JAX-WS
> annotations. However, the namespace problem remains.
>
> Could someone check if the service response is valid XML and correct
> according to the WSDL? Shouldn`t the namespace for the response tag
> (http://www.apache.org/ode/pmapi) be included? Anything that gets me a
> client stub working against ODE would help.
>
> Thanks in advance,
> Matthias
>

Reply via email to