Hi Mark,
I wanted to try your approach, but I'm not getting the hole picture I think
. My test setup is very easy. I've got a echo service, echos the users
output back, this is of course not a long running task but I sleep it for
lets say 1 minute. Here is my wsdl
<message name="SayHiRequestMsg">
<part name="parameters" element="tns:SayHi">
</part>
</message>
<message name="SayHiResponseMsg">
<part name="parameters" element="tns:SayHiResponse">
</part>
</message>
<portType name="EchoServicePortType">
<operation name="SayHi">
<documentation>Just a simple echo operation that returns the
same
string that is given to it.</documentation>
<input message="tns:SayHiRequestMsg">
</input>
</operation>
</portType>
<portType name="EchoServiceCallbackPortType">
<operation name="onResult">
<input message="tns:SayHiResponseMsg">
</input>
</operation>
</portType>
<binding name="EchoServiceBinding" type="tns:EchoServicePortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="SayHi">
<soap:operation
soapAction="http://www.bccs.uib.no/EchoService.wsdl/SayHi"
/>
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<binding name="EchoServiceCallBackBinding"
type="tns:EchoServiceCallbackPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="onResult">
<soap:operation
soapAction="http://www.bccs.uib.no/EchoService.wsdl/onResult"
/>
<input>
<soap:body use="literal" />
</input>
</operation>
</binding>
<service name="EchoService">
<documentation>This WSDL file describes a simple Echo Service that
echoes a string sendt to it. This service is intended primarily
for
testing purposes.</documentation>
<port name="EchoServiceLocal" binding="tns:EchoServiceBinding">
<soap:address location="
http://129.177.20.77:8080/axis2/services/EchoService" />
</port>
</service>
I've got a schema that defines the messages. As you see I've got two ports,
one starting the ws and the other for the callback. So now I'm not sure what
to do now. Should the service only bind to the binding for the sayhi
operation, not the call back? I now want to model this in BPEL I guess it
would look something like this
<invoke operation="ech:SayHi" portType="ech:EchoServicePortType"
variable="ech:SayHiRequest" />
and receive like this
<receice operation="ech:onResult" portType="ech:EchoServiceCallbackPortType"
variable="ech:SayHiResonse" />
My questions is then, does ode send ws-addressing header so that the ws
knows where to respond(1)? What would the service then respond with(2)?
Since the sayHi operation does not return the actual result, just empty or a
message id. How should the service be implemented, should it implement
onResult?
Hope you can help with this? I also wanted to first model this with "normal"
java client.
cheers, Håkon
Then my question is
2009/10/8 Ford, Mark <[email protected]>
> With respect to your comment:
>
> “the invoke will be called and waits and times out”
>
> It sounds like you’re trying to model a long running operation as a
> request/response operation within WSDL. If you do this, then you’ll most
> likely experience timeouts at the transport layer. A better implementation
> is to split this long running operation into two port types. One to make the
> request to start the work for the service and the other to provide an
> operation for the service to call you back with the response. The start
> operation would be a one-way operation or a request-response with a simple
> ACK as the response (perhaps with some values to use for correlation). This
> would be modeled in BPEL by an invoke followed by a receive activity.
>
> You can create a partnerLinkType to model this by having a partner role for
> the service you’re invoking and a myRole for your callback point. In this
> way, the relationship between the two port types is made explicit.
>
> As for ODE, I have not tested this but I would think that there might be a
> facility whereby you could have the endpoint reference for the partnerlink’s
> myRole automatically populate as the reply-to header when invoking a
> service. It seems reasonable that the service invocation layer would support
> this but you’d have to check the docs or the source code to be sure.
>
>
> On 10/8/09 4:18 AM, "Michael Dondrup" <[email protected]> wrote:
>
> Dear Filip,
> we are currently working on exactly the same problem, because it would
> be simple and neat solution.
> However we didn't get there so far, so maybe it could be interesting
> to have closer look at what it is exactly that doesn't work.
> Do you have a process defined, that fails? Then maybe you could send
> the process files so we could have a look it?
>
> We found that the WS-addressing did not seem to work with axis2 1.4.1
> and you should try axis2 1.5 on the service side.
> To enable wsa support and asynchronous invocation add the following to
> your services.xml within the service tags:
>
> <module ref="addressing" />
> <parameter name="messageReceiver.invokeOnSeparateThread">true</
> parameter>
>
> There will be other problems however:
> - providing the correct port, role and partnerlink type, in the bpel
> process for the service to reply to
> - If I try to use a <invoke> and <receive> secence for invoking the
> service, the invoke waits for the service to reply even though the
> wsa:replyto works and the invoke will be called and waits and times
> out.
> The documentation on this topic is unfortunately totally incomplete.
> Maybe we can try to resolve this together.
> Best
> Michael
>
> Am 07.10.2009 um 20:40 schrieb Filip Majernik:
>
> > Hi,
> > I want to invoke an asynchronous Web Service from ode, but I cannot
> > figure
> > out how to change wsa:ReplyTo header. I've read about the EPR
> > configuration
> > on the ode website and tried something like this:
> >
> > <bpel:assign>
> > <bpel:copy>
> > <bpel:from>
> > <bpel:literal>
> > <wsa:EndpointReference xmlns:wsa="
> > http://www.w3.org/2005/08/addressing"<http://www.w3.org/2005/08/addressing%22>
> >
> > <wsa:Address>
> > http://localhost:8080/axis2/services/MyService</wsa:Address><http://localhost:8080/axis2/services/MyService%3C/wsa:Address%3E>
> > <wsa:ReplyTo><wsa:Address>
> > http://localhost:8080/axis2/services/ReplyToService
> > </wsa:Address></wsa:ReplyTo>
> > </wsa:EndpointReference>
> > </bpel:literal>
> > </bpel:from>
> > <bpel:to partnerLink="testPartnerLink"/>
> > </bpel:copy>
> > </bpel:assign>
> >
> > but it isn't working. Does anyone maybe have a working example of
> > changing
> > the wsa:ReplyTo header (and invoking and asynchronous service) when
> > invoking
> > a service??? Or is it possible at all?
> >
> > Btw. my configuration is:
> > apache ode 1.3.2
> > the webservice I am invoking is running on apache axis 1.4
> >
> > Thank you guys in advance.
> > Filip
>
>
>
>
>
>
> --
> Mark Ford
> MIT Lincoln Laboratory
> 244 Wood Street
> Lexington MA 02420
> (781) 981-1843
>
--
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)