Java Reference
In-Depth Information
Explicitly Disabling Addressing on the Client
Problem
You want to invoke a service that declares it uses addressing, but you want to disable this in
your client.
Solution
Create an instance of the
javax.xml.ws.AddressingFeature
, using
false
as a constructor
parameter. Then pass this feature instance to the port accessor method on the service stub. The
code to do so looks like this:
new MyImplService().getMyImplPort(
new javax.xml.ws.AddressingFeature(false)
);
Discussion
You might want to disable the processing of addressing instructions in certain cases. For ex-
ample, a client that uses a SAAJ
Dispatch
with a mode of
MESSAGE
(instead of
PAYLOAD
) can
indicate that it wants to process
ReplyTo
or
FaultTo
constructs in its own way, in the absence
of anonymous addressing.
See Also