|
From: Oliver W. <ow...@us...> - 2012-09-24 20:14:12
|
Dear Adriano,
I checked your test program against the wsag4j 2.0.0 version from
sourceforge and for me it seems to work.
I changed the template and factory id back to the sample ids and the
test worked fine.
I guess your problem is that the initiator agreement id is not
automatically set by the API when creating an
agreement offer from a negotiated offer. As I explained before, the
initiator id is primarily foreseen by the specification
for symmetric signaling scenarios. If you want to use the initiator
EPR in a custom scenario in a slightly different way,
this is still possible. In that case you need to set the EPR in your
code. The following snippet illustrates this:
AgreementOfferType offer = new AgreementOfferType(
selectedCounterOffer );
offer.setInitiatorEPR(
EndpointReferenceType.Factory.newInstance() );
offer.getInitiatorEPR().addNewAddress().setStringValue(
"http://foo.org" );
System.out.println( " EPR in client \n" + offer.getInitiatorEPR() );
AgreementClient agreement =
getFactoryClient().createAgreement( offer );
On the server side you can than query the agreement initiator with the
normal API, i.e.:
offer.getInitiatorEPR();
Best regards,
Oliver
On Mon, Sep 24, 2012 at 7:02 PM, Adriano Galati <A.G...@le...> wrote:
> Dear Oliver,
>
> I am using WSRF.
> I attach a simple client which contacts the wsag4j server.
> I am using wsag4j-engine.config from the wsag4j-server-1.0.2
> Thank you very much.
>
> Kind regards,
> Adriano
>
> ________________________________________
> From: oli...@go... [oli...@go...] On Behalf Of Oliver Waeldrich [ow...@us...]
> Sent: 24 September 2012 11:35
> To: Adriano Galati
> Cc: wsa...@li...
> Subject: Re: [Wsag4j-users] Client's Endpoint Reference from wsag4j server
>
> Dear Adriano,
>
> The EPR you try to use is basically the initiator agreement EPR. It
> should be used when you have a scenario were each party needs a copy
> from the created agreement after agreement creation, i.e. for
> bi-lateral monitoring (see WS-Agreement spec, section Port Types and
> Operations - signaling scenarios). However, this should basically
> work. I took a look on the WSRF implementation and the initiator EPR
> is set in the WSRF stack. By the way, negotiation is supported by the
> framework out of the box.
>
> In order to help you could you please tell me which implementation you
> use, WSRF or REST? Is the Initiator EPR set on the client side (this
> is not done automatically). Could you please provide a simple test
> project?
>
> Best regards,
> Oliver
|