This example code describes a JAX-RPC client acting in the subscriber role, creating a pull point for use by a consumer application that is to use pull style notifications.
This example is based on using the Java™ API for XML-based remote procedure calls (JAX-RPC) APIs with code generated by using the WSDL2Java tool (run against the Notification Broker WSDL generated as a result of creating your WS-Notification service point) and WebSphere® Application Server APIs and SPIs.
// Look up the JAX-RPC service. The JNDI name is specific to your web services client implementation InitialContext context = new InitialContext(); javax.xml.rpc.Service service = (javax.xml.rpc.Service) context.lookup( "java:comp/env/services/NotificationBroker"); // Get a stub for the port on which you want to invoke operations NotificationBroker stub = (NotificationBroker) service.getPort(NotificationBroker.class); // Create the request information. SOAPElement[] optionalInformation = null; CreatePullPoint cpp = new CreatePullPoint(optionalInformation); // Invoke the CreatePullPoint operation by calling the associated method on the stub CreatePullPointResponse response = stub.createPullPoint(cpp); // Retrieve the reference to the pull point from the response EndpointReference pullPointEPR = response.getPullPoint(); // Retrieve any additional information from the response SOAPElement[] additionalInformation = response.getElements();