ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexis Midon <mi...@intalio.com>
Subject Re: Timed out invoking REST web service from Yahoo
Date Fri, 10 Jul 2009 17:34:39 GMT
ODE puts all HTTP response headers in the message, so they can eventually be
used by the process. So, yes, this message is correct.

Assuming your assignment is right and that the service output is fine, if
the part your assign is looking for is not in the message then I guess the
issue is in the wsdl you use to describe the service. It looks like your
wsdl is valid (no fault in the invoke), but the response body is not bound
to a part.
What is the content of the operation output element? could you share with us
your wsdl?

Here is an example of an operation binding that stores the response body in
the part "post_content".


<definitions ...

                  xmlns:odex="http://www.apache.org/ode/type/extension/http"/>

    <binding name="blogBinding" type="blogPortType">
        <operation name="PUT">

             <odex:binding verb="PUT" />
             <http:operation location=""/>
             <input>

                 <http:urlReplacement/>
                 <mime:content type="text/xml" part="post_content"/>

                 <!-- set a standard request header from a part -->
                 <odex:header name="Authorization" part="credentials_part"/>


                 <!-- set a custom request header with a static value -->
                 <odex:header name="MyCustomHeader" value="ode@apache.org" />


             </input>
             <output>
                 <mime:content type="text/xml" part="post_content"/>


                 <!-- set 1 response header to a part -->
                 <odex:header name="Age" part="age_part"/>


             </output>
        </operation>
    </binding>
</definitions>



You can check the doc for more details:
http://ode.apache.org/user-guide.html#UserGuide-HTTPBindingExtensionsforRESTfulservices

Alexis


On Fri, Jul 10, 2009 at 7:20 AM, Bill McCusker <wmccusker@parasoft.com>wrote:

> Hi,
>
>   I tried invoking the service and what happened is my test client did time
> out. It looks like the process is having problems with the return from the
> REST service. The assign is generating a fault because it can not find a
> message part. When debugging I found that ODE was assigning this to the
> output variable:
>
> <message>
> <Connection headerPart="true">close</Connection>
> <Date
>  headerPart="true">Fri, 10 Jul 2009 14:05:08 GMT</Date>
> <Content-Type
>  headerPart="true">text/xml; charset=utf-8</Content-Type>
> <P3P
>  headerPart="true">policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO
> DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi
> UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC
> GOV"</P3P>
> <Transfer-Encoding
>  headerPart="true">chunked</Transfer-Encoding>
> <Cache-Control
>  headerPart="true">private</Cache-Control>
> <Status-Line headerPart="true">
>  <Status-Line>
>  <HTTP-Version>HTTP/1.1</HTTP-Version>
>  <Status-Code>200</Status-Code>
>  <Reason-Phrase>OK</Reason-Phrase>
>  <original>HTTP/1.1 200 OK</original>
>  </Status-Line>
> </Status-Line>
> </message>
>
> as the result of the REST service invocation. However when testing the same
> input using firefox I instead see the expected output. It looks like ODE is
> saving the http response header instead of the response traffic? Does this
> make sense?
>
> Bill McCusker
>
>
> Ricardo Pereira wrote:
>
>> Hello,
>>
>> I have a very simple process that just invokes an REST external web
>> service from Yahoo (http://developer.yahoo.com/maps/rest/V1/geocode.html
>> ).
>>
>> When i run it on Netbeans it is very quick and returns the expected result
>> (the latitude and longitude that are returned in decimal and i convert to
>> string).
>>
>> When i deploy it on Apache ODE, it returns Timed Out. What am i doing
>> wrong?
>> I've seen other posts but i din't find good answers to this (the only
>> answer i found was to increase the time out variable but that isn't a
>> solution).
>>
>> I send on attach the necessary files. It is just extract and deploy.
>>
>> I really appreciate your help as quick as you can.
>>
>> Thanks
>> Ricardo
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message