ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tammo van Lessen <tvanles...@gmail.com>
Subject Re: REST webservice on BPEL with WSDL1.1 extensions
Date Wed, 13 Jul 2011 15:20:57 GMT
Hi,

the wrapper is just a wrapper, it used internally but not visible to
your process itself. A selectionFailure means that you tried to select a
certain node in a variable or a part but this node did not exist. You
can set the log level for org.apache.ode.bpel.runtime to DEBUG to get
more details about the selection failure.

However, when looking at your sample, I think you are just missing one
nesting level.

The response looks like

<message><CUSTOMER><CUSTOMER><ID>18</ID><FIRSTNAME>Example</FIRSTNAME><LASTNAME>Hamburg</LASTNAME><STREET>Rheinstrasse
2</STREET><CITY>Worms</CITY></CUSTOMER></CUSTOMER></message>

So the first (and only) part is called "CUSTOMER" and contains then
again a CUSTOMER element.

Your XPath expression however is only looking for FIRSTNAME. Could you
try the XPath "CUSTOMER/FIRSTNAME" instead?

Tammo

On 13.07.2011 17:11, George wrote:
> Hi,
> 
> In [1] you can find the log for new issue. It seems that the REST WS is
> called, and it answers but then when I try to get the values from it,
> something is wrong.
> 
> Initially the returned value is of type <CUSTOMER>, but then it is
> wrapped inside a <message>. Why is it? Can it be the cause of the failure?
> 
> TA
> 
> [1] http://pastebin.com/Gb45dUJW
> 
> 
> On 13/07/2011 12:20, George wrote:
>> Sorry ... I have updated [1], and now this part seems to work. It was my
>> fault that I put the wrong element.
>>
>> However now I get an error from the BPEL process, but I will go on
>> working on it and come to you all if I cannot manage.
>>
>> Sorry for bothering.
>>
>> [1] RestAsWSDL --> http://pastebin.com/ujc9Nyd3
>>
>> On 13/07/2011 11:58, George wrote:
>>> Hi Tammo,
>>>
>>> As you can see in [1] I have set the extension in the WSDL.
>>>
>>> The response from the server is an application/xml which is the mime
>>> type I set in the WSDL [1].
>>>
>>> Besides you can find the complete BPEL and WSDL descriptions in [2]
>>> and [3] if this can help you figuring something out.
>>>
>>> GET http://128.0.0.6/test/a.xml
>>> Status-Line: HTTP/1.1 200 OK
>>> Response Headers:
>>> Date: Wed, 13 Jul 2011 08:46:15 GMT
>>> Server: Apache/2.2.14 (Ubuntu)
>>> Last-Modified: Tue, 12 Jul 2011 17:58:15 GMT
>>> Accept-Ranges: bytes
>>> Content-Length: 179
>>> Content-Type: application/xml
>>> Response Entity:
>>> <?xml version='1.0' encoding='UTF-8'?>
>>> <CUSTOMER><ID>18</ID><FIRSTNAME>Example</FIRSTNAME><LASTNAME>Hamburg</LASTNAME><STREET>Rheinstrasse
>>>
>>> 2</STREET><CITY>Worms</CITY></CUSTOMER>
>>>
>>> [1] RestAsWS.wsdl --> http://pastebin.com/8QdnUK7U
>>> [2] BPEL_rest.bpel --> http://pastebin.com/QL03MHz9
>>> [3] BPEL_RestArtifacts.wsdl --> http://pastebin.com/HpArvmnG
>>>
>>>
>>> On 13/07/2011 10:54, Tammo van Lessen wrote:
>>>> Hi George,
>>>>
>>>> According to [1], all HTTP 1.1 servers MUST understand the absoluteURI
>>>> form (and it is the most generic version as well), so I don't think a
>>>> change on ODE is needed in this case, but rather on the HTTP server
>>>> side. However, feel free to file a JIRA for that.
>>>>
>>>> Regarding the NPE (which should not happen of course), I guess that the
>>>> request either did not contain a body, or the body/mime/etc.
>>>> definitions
>>>> in the WSDL did not match. Did you enrich your WSDL with the extension
>>>> described at [2]?
>>>>
>>>> Thanks,
>>>> Tammo
>>>>
>>>> [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2
>>>> [2] http://ode.apache.org/wsdl-11-extensions-for-rest.html
>>>>
>>>> On 13.07.2011 10:00, George wrote:
>>>>> Hi again,
>>>>>
>>>>> I think I've found what the matter could be, and it is the remote
>>>>> server. It seems (after checking with telnet on the server) that
>>>>> remote webserver does not accept calls with request line in the form:
>>>>>
>>>>> GET http://server/resources HTTP/1.1
>>>>> Host: server
>>>>>
>>>>> In stead it has to be the "more standard" way:
>>>>> GET /resources HTTP/1.1
>>>>> Host: server
>>>>>
>>>>> Is is possible to change that for future releases of ODE?
>>>>>
>>>>> Besides that, I have comeout with another problem. Now I have set
>>>>> the service to point to localhost
>>>>> (http://localhost:8080/test/{customerId}.xml. This xml file returns
>>>>> the same as the other webservice, so the BPEL process should be
>>>>> working. On the contrary I get the following exception:
>>>>>
>>>>> 19:41:01,941 ERROR [ExternalService] [Service:
>>>>> {http://ode/bpel/test/blog}BlogService, Port: BlogPort, Operation:
>>>>> doGET] Exception occured while processing the HTTP response of a
>>>>> two-way request. mexId= hqejbhcnphr6fh5xg8uj0b
>>>>> java.lang.NullPointerException
>>>>> at
>>>>> org.apache.ode.axis2.httpbinding.HttpMethodConverter.createPartElement(HttpMethodConverter.java:390)
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.ode.axis2.httpbinding.HttpMethodConverter.parseHttpResponse(HttpMethodConverter.java:510)
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.ode.axis2.httpbinding.HttpExternalService$TwoWayCallable._2xx_success(HttpExternalService.java:362)
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.ode.axis2.httpbinding.HttpExternalService$TwoWayCallable.access$100(HttpExternalService.java:298)
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.ode.axis2.httpbinding.HttpExternalService$TwoWayCallable$1.call(HttpExternalService.java:310)
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.ode.axis2.httpbinding.HttpExternalService$TwoWayCallable$1.call(HttpExternalService.java:306)
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:284)
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:239)
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.ode.axis2.httpbinding.HttpExternalService$TwoWayCallable.processResponse(HttpExternalService.java:306)
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.ode.axis2.httpbinding.HttpExternalService$OneWayCallable.call(HttpExternalService.java:258)
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.ode.axis2.httpbinding.HttpExternalService$OneWayCallable.call(HttpExternalService.java:227)
>>>>>
>>>>>
>>>>> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>>>> at java.util.concurrent.FutureTask.run(Unknown Source)
>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
>>>>> Source)
>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>>>>> at java.lang.Thread.run(Unknown Source)
>>>>> 19:41:01,974 ERROR [INVOKE] Failure during invoke: Exception occured
>>>>> while processing the HTTP response of a two-way request. mexId=
>>>>> hqejbhcnphr6fh5xg8uj0b
>>>>> 19:41:01,978 INFO [BpelRuntimeContextImpl] ActivityRecovery:
>>>>> Registering activity 11, failure reason: Exception occured while
>>>>> processing the HTTP response of a two-way request. mexId=
>>>>> hqejbhcnphr6fh5xg8uj0b on channel 21
>>>>>
>>>>>
>>>>> Any idea this time? What is this stuff of a two-way request?
>>>>>
>>>>> TA.
>>>>>
>>>>> On 13/07/2011 9:58, George wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> This is the first sequence of a couple of mails describing my
>>>>>> problems.
>>>>>> The next one will be a reply to this. Please do not consider it as
>>>>>> spam ;)
>>>>>>
>>>>>> I'm trying to access a REST webservice within a BPEL process. I'm
>>>>>> using the HTTP bindings and I'm following the examples in apache-ode-
>>>>>> sources-1.3.5\axis2-war\src\test\resources\TestHttpBindingExt_GET.
>>>>>>
>>>>>> I have change the example somehow to fit the webservice I want to
>>>>>> access. Actually as it is a newbie program I'm accessing a REST
>>>>>> webservice available on the freely avalilabe on the web (http://
>>>>>> www.thomas-bayer.com/sqlrest/CUSTOMER/20/).
>>>>>>
>>>>>> I'm using Eclipse BPEL Designer and it seems that there is no error
>>>>>> reported from it. The issue is that I'm getting the following error
>>>>>> each time I try to call the BPEL process.
>>>>>>
>>>>>> Exception reported ---> http://pastebin.com/JeWPsszx
>>>>>>
>>>>>> Any idea? The remote server is online and responding, but I don't
>>>>>> know
>>>>>> why the iternal of ODE claims there is a connection error.
>>>>>>
>>>>>> I also attach the different files:
>>>>>> BPEL_rest.bpel --> http://pastebin.com/QL03MHz9
>>>>>> BPEL_RestArtifacts.wsdl --> http://pastebin.com/HpArvmnG
>>>>>> RestAsWS.wsdl --> http://pastebin.com/8QdnUK7U
>>>>>>
>>>>>> Any help will be more than appreciated.
>>>>>>
>>>>>> TA
>>>>>> jlanza
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>
>>
> 

-- 
Tammo van Lessen - http://www.taval.de

Mime
View raw message