Examples of PingServicePortProxy


Examples of org.apache.axis2.jaxws.samples.client.ping.PingServicePortProxy

     * @param input       The message string
     * @return Boolean true if the ping works
     */
    public boolean buildPing(String endpointURL, URL wsdlURL, String input) {
        try {
            PingServicePortProxy ping = new PingServicePortProxy(wsdlURL);
            ping._getDescriptor().setEndpoint(endpointURL);
            System.out.println(">> CLIENT: SEI Ping to " + endpointURL);

            // Configure SOAPAction properties
            BindingProvider bp = (BindingProvider) (ping._getDescriptor()
                    .getProxy());
            bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                    endpointURL);
            bp.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY,
                    Boolean.TRUE);
            bp.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY,
                    "pingOperation");

            // Build the input object
            PingStringInput pingParm =
                    new ObjectFactory().createPingStringInput();
            pingParm.setPingInput(input);

            // Call the service
            ping.pingOperation(pingParm);
            System.out.println(">> CLIENT: SEI Ping SUCCESS.");
            return true;
        } catch (Exception e) {
            System.out.println(">> CLIENT: ERROR: SEI Ping EXCEPTION.");
            e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.