I don't quite follow the ReplyTo issue. ReplyTo is set by default for
request response in WSE (even if you don't set it). The default value is the
anonymous role as outlined in WS-Addressing.
There are several ways to create headers. One way is to add reference
properties in the destination EPR. Another way is to use the SoapHeader
attribute of ASMX. The other option is the one you suggested. Create one
first:
XmlElement header = message.Context.Envelope.CreateHeader();
> I don't quite follow the ReplyTo issue. ReplyTo is set by default for
> request response in WSE (even if you don't set it). The default value is the
> anonymous role as outlined in WS-Addressing.
OK, I can't set the ReplyTo value of the SoapEnvelope header myself, because
then the response would be sent to that address. Not what I want. In a
sense, what I want is unrelated messages to be sent to some specified
address, and the response sent to the sender of the request.
> There are several ways to create headers. One way is to add reference
> properties in the destination EPR. Another way is to use the SoapHeader
> attribute of ASMX. The other option is the one you suggested. Create one
> first:
OK, not sure if we are talking about the same side. I am talking
client-side. Also, I don't use an autogenerated proxy. Setting the
SoapHeader attribute of ASMX seems to be done server-side, and would thus
only work if the proxy is autogenerated.
> XmlElement header = message.Context.Envelope.CreateHeader();
OK, this might help... I hadn't seen this function yet.
Thanks.
> > Hi all,
> >
[quoted text clipped - 17 lines]
> >
> > Thanks,
Lucien - 29 Jul 2004 00:42 GMT
To clarify my EPR/header suggestion: If you add an referenceProperty to the
destination on the client, it will get serialized as a header on the request
message. Likewise if you add an ReferenceProperty to the ReplyTo it will get
serialized on the response message (and serialized as a type on the
request).
If you set the ReplyTo yourself to anonymous role the response would be sent
back to the client. If you want to send another message from the service
besides the reply you can add that logic in the service method (and I assume
you want to use a header on the request to indicate the address).
> > I don't quite follow the ReplyTo issue. ReplyTo is set by default for
> > request response in WSE (even if you don't set it). The default value is
[quoted text clipped - 47 lines]
> > >
> > > Thanks,
SA - 29 Jul 2004 22:54 GMT
> If you set the ReplyTo yourself to anonymous role the response would be sent
> back to the client. If you want to send another message from the service
> besides the reply you can add that logic in the service method (and I assume
> you want to use a header on the request to indicate the address).
Yes, and that works great. Simply using CreateHeader was the answer. I am
still familiarizing myself with the object model of WSE 2.0, as you can
tell...
I now have a clean implementation, instead of trying to fit that address
somewhere in the body.
Thanks.