An endpoint identifies the final destination of a message. An endpoint is defined either by the Endpoint class (if you use a provider) or by the URLEndpoint class (if you don’t use a provider).)
You can initialize an endpoint either by calling its constructor or by looking it up in a naming service. For information about creating administered objects for endpoints, see Using SOAP Administered Objects.
The following code uses a constructor to create a URLEndpoint:
myEndpoint = new URLEndpoint("http://somehost/myServlet");
If you are using a provider, the Message Factory creating the message includes the endpoint specification in the message header.
If you do not use a provider, you can specify the endpoint as a parameter to the SOAPConnection.call method, which you use to send a SOAP message.
If you are using an administered object to define an endpoint, note that it is possible to associate that administered object with multiple URLs--each URL, is capable of processing incoming SOAP messages. The code sample below associates the endpoint whose lookup name is myEndpoint with two URLs: http://www.myServlet1/ and http://www.myServlet2/.
imqobjmgr add -t e -l "cn=myEndpoint" -o "imqSOAPEndpointList=http://www.myServlet1/ http://www.myServlet2/" |
This syntax allows you to use a SOAP connection to publish a SOAP message to multiple endpoints. For additional information about the endpoint administered object, see Using SOAP Administered Objects.