You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by "Jacob, Matthias" <Ma...@student.hpi.uni-potsdam.de> on 2009/04/14 17:17:11 UTC

Problems using the DeploymentService - Invalid service response?

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). 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 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

Re: Problems using the DeploymentService - Invalid service response?

Posted by Alex Boisvert <bo...@intalio.com>.
2009/4/17 Jacob, Matthias <Ma...@student.hpi.uni-potsdam.de>

>
> The DeploymentService is specified by the WSDL as the following:
>
> ...
> <wsdl:service name="DeploymentService">
>  <wsdl:port name="DeploymentPort" binding="tns:DeploymentBinding">
>    <soap:address location="http://localhost:8080/ode/services/deploy"/>
>  </wsdl:port>
> </wsdl:service>
> ...
>
> However, the SOAP port for the DeploymentService is currently located under
> http://localhost:8080/ode/processes/DeploymentService instead of
> http://localhost:8080/ode/services/deploy.
>

Fixed.

https://issues.apache.org/jira/browse/ODE-584

alex

RE: Problems using the DeploymentService - Invalid service response?

Posted by "Jacob, Matthias" <Ma...@student.hpi.uni-potsdam.de>.
Matthias Jacob wrote:
>Alex Boisvert wrote:
>> On Tue, Apr 14, 2009 at 8:26 AM, Matthieu Riou <ma...@gmail.com>wrote:
>>
>>> On Tue, Apr 14, 2009 at 8:17 AM, Jacob, Matthias <
>>> Matthias.Jacob@student.hpi.uni-potsdam.de> 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.
>>
>>
>>
>> Correct.  See https://issues.apache.org/jira/browse/ODE-517
>>
>> alex
>>
>
>Thanks for the hint. As I read from the ticket, the patch will be included in the 1.3 and the 2.0 releases. But there is currently no stable (beta) release that includes this patch, right? In that case, should I try the latest stable nightly build instead?
>
>Matthias

I have tried one of the latest stable nightly builds now, one that I downloaded the day before yesterday (CEST). The DeploymentService responses are okay, although there still seems to be a bug in the DeploymentService WSDL.

The DeploymentService is specified by the WSDL as the following:

...
<wsdl:service name="DeploymentService">
  <wsdl:port name="DeploymentPort" binding="tns:DeploymentBinding">
    <soap:address location="http://localhost:8080/ode/services/deploy"/>
  </wsdl:port>
</wsdl:service>
...

However, the SOAP port for the DeploymentService is currently located under http://localhost:8080/ode/processes/DeploymentService instead of http://localhost:8080/ode/services/deploy.

Matthias

RE: Problems using the DeploymentService - Invalid service response?

Posted by "Jacob, Matthias" <Ma...@student.hpi.uni-potsdam.de>.
Alex Boisvert wrote:
> On Tue, Apr 14, 2009 at 8:26 AM, Matthieu Riou <ma...@gmail.com>wrote:
>
>> On Tue, Apr 14, 2009 at 8:17 AM, Jacob, Matthias <
>> Matthias.Jacob@student.hpi.uni-potsdam.de> 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.
>
>
>
> Correct.  See https://issues.apache.org/jira/browse/ODE-517
>
> alex
>

Thanks for the hint. As I read from the ticket, the patch will be included in the 1.3 and the 2.0 releases. But there is currently no stable (beta) release that includes this patch, right? In that case, should I try the latest stable nightly build instead?

Matthias


Re: Problems using the DeploymentService - Invalid service response?

Posted by Alex Boisvert <bo...@intalio.com>.
On Tue, Apr 14, 2009 at 8:26 AM, Matthieu Riou <ma...@gmail.com>wrote:

> On Tue, Apr 14, 2009 at 8:17 AM, Jacob, Matthias <
> Matthias.Jacob@student.hpi.uni-potsdam.de> 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.



Correct.  See https://issues.apache.org/jira/browse/ODE-517

alex

Re: Problems using the DeploymentService - Invalid service response?

Posted by Matthieu Riou <ma...@gmail.com>.
On Tue, Apr 14, 2009 at 8:17 AM, Jacob, Matthias <
Matthias.Jacob@student.hpi.uni-potsdam.de> 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
>