Package javax.xml.rpc

Examples of javax.xml.rpc.Stub


        try {
            //Stub stub=(Stub)(new org.tempuri.IExhibitSrvserviceLocator().getIExhibitSrvPort());
            //org.tempuri.IExhibitSrvbindingStub s=(org.tempuri.IExhibitSrvbindingStub)stub;
           
            Stub stub=(Stub)(new org.tempuri.ILOGIN_SERVserviceLocator().getILOGIN_SERVPort());
            org.tempuri.ILOGIN_SERVbindingStub s=(org.tempuri.ILOGIN_SERVbindingStub)stub;


            /*uExhibitClasses.TExchangeSettings a=s.getExchangeSettings();
            System.out.println(a.getDecimalSeparator());
View Full Code Here


    } // getProxyWithWSDL

    private TypeTest getProxy() {
        try {
            Service service = ServiceFactory.newInstance().createService(null);
            Stub binding = (Stub) service.getPort(TypeTest.class);
            binding._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
                    "http://localhost:8080/axis/services/TypeTest");
            throw new AssertionFailedError("Should not get a binding");
        }
        catch (ServiceException jre) {
            return null;
View Full Code Here

                    se.getLinkedCause() == null);
        }

        // Make sure we get the proper ports
        try {
            Stub one = (Stub) service.getPort(portOne, One.class);
            Stub two = (Stub) service.getPort(portTwo, Two.class);
            Stub three = (Stub) service.getPort(portThree, Three.class);
            assertTrue("getPort(portOne) should be of type One, instead it is " + one.getClass().getName(), one instanceof One);
            assertTrue("getPort(portOne) should have address http://localhost:8080/axis/services/portOne, instead it has " + one._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY), "http://localhost:8080/axis/services/portOne".equals(one._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)));
            assertTrue("getPort(portTwo) should be of type Two, instead it is " + two.getClass().getName(), two instanceof Two);
            assertTrue("getPort(portTwo) should have address http://localhost:8080/axis/services/portTwo, instead it has " + two._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY), "http://localhost:8080/axis/services/portTwo".equals(two._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)));
            assertTrue("getPort(portThree) should be of type Three, instead it is " + three.getClass().getName(), three instanceof Three);
            assertTrue("getPort(portThree) should have address http://localhost:8080/axis/services/portThree, instead it has " + three._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY), "http://localhost:8080/axis/services/portThree".equals(three._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)));
        }
        catch (ServiceException se) {
            fail("unexpected failure:  " + se);
        }
    } // testNormalService
View Full Code Here

                    se.getLinkedCause() == null);
        }

        // Make sure we get the proper ports
        try {
            Stub one = (Stub) service.getPort(portOne, One.class);
            Stub two = (Stub) service.getPort(portTwo, Two.class);
            Stub three = (Stub) service.getPort(portTwoA, Three.class);
            assertTrue("getPort(portOne) should be of type One, instead it is " + one.getClass().getName(), one instanceof One);
            assertTrue("getPort(portOne) should have address http://localhost:8080/axis/services/portOne, instead it has " + one._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY), "http://localhost:8080/axis/services/portOne".equals(one._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)));
            assertTrue("getPort(portTwo) should be of type Two, instead it is " + two.getClass().getName(), two instanceof Two);
            assertTrue("getPort(portTwo) should have address http://localhost:8080/axis/services/portTwo, instead it has " + two._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY), "http://localhost:8080/axis/services/portTwo".equals(two._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)));
            assertTrue("getPort(portTwoA) should be of type Two, instead it is " + three.getClass().getName(), three instanceof Two);
            assertTrue("getPort(portThree) should have address http://localhost:8080/axis/services/portTwoA, instead it has " + three._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY), "http://localhost:8080/axis/services/portTwoA".equals(three._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)));
        }
        catch (ServiceException se) {
            fail("unexpected failure:  " + se);
        }
    } // testDoublePortService1
View Full Code Here

                    se.getLinkedCause() == null);
        }

        // Make sure we get the proper ports
        try {
            Stub one = (Stub) service.getPort(portOne, One.class);
            Stub two = (Stub) service.getPort(portTwo, Two.class);
            Stub three = (Stub) service.getPort(portThree, Three.class);
            assertTrue("getPort(portOne) should be of type One, instead it is " + one.getClass().getName(), one instanceof One);
            assertTrue("getPort(portOne) should have address http://localhost:8080/axis/services/portOne, instead it has " + one._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY), "http://localhost:8080/axis/services/portOne".equals(one._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)));
            assertTrue("getPort(portTwo) should be of type Two, instead it is " + two.getClass().getName(), two instanceof Two);
            assertTrue("getPort(portTwo) should have address http://localhost:8080/axis/services/portTwo, instead it has " + two._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY), "http://localhost:8080/axis/services/portTwo".equals(two._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)));
            assertTrue("getPort(portThree) should be of type One, instead it is " + three.getClass().getName(), three instanceof One);
            assertTrue("getPort(portThree) should have address http://localhost:8080/axis/services/portFour, instead it has " + three._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY), "http://localhost:8080/axis/services/portFour".equals(three._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)));
        }
        catch (ServiceException se) {
            fail("unexpected failure:  " + se);
        }
    } // testDoublePortService2
View Full Code Here

    } // getProxyWithWSDL

    private TypeTest getProxy() {
        try {
            Service service = ServiceFactory.newInstance().createService(null);
            Stub binding = (Stub) service.getPort(TypeTest.class);
            binding._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
                    "http://localhost:8080/axis/services/TypeTest");
            throw new AssertionFailedError("Should not get a binding");
        }
        catch (ServiceException jre) {
            return null;
View Full Code Here

    *
    * @throws Exception
    */
   public void testCall_NoSecurity() throws Exception
   {
      Stub stub = (Stub)port;
      stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, null);
      stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, null);

      try
      {
         port.echoMessage(MESSAGE);
         fail("Call should have failed due to no wsse:Security.");
View Full Code Here

   public void testCall_ValidTimestamp() throws Exception
   {
      long started = System.currentTimeMillis();

      Stub stub = (Stub)port;
      stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(0));
      stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(10));

      String response = port.echoMessage(MESSAGE);
      assertEquals("Expected Response", MESSAGE, response);

      long finished = System.currentTimeMillis();
View Full Code Here

   public void testCall_FutureTimestamp() throws Exception
   {
      long started = System.currentTimeMillis();

      Stub stub = (Stub)port;
      stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(10));
      stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(20));

      String response = port.echoMessage(MESSAGE);
      assertEquals("Expected Response", MESSAGE, response);

      long finished = System.currentTimeMillis();
View Full Code Here

   public void testCall_PastExpires() throws Exception
   {
      long started = System.currentTimeMillis();

      Stub stub = (Stub)port;
      stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(0));
      stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(-5));

      String response = port.echoMessage(MESSAGE);
      assertEquals("Expected Response", MESSAGE, response);

      long finished = System.currentTimeMillis();
View Full Code Here

TOP

Related Classes of javax.xml.rpc.Stub

Copyright © 2018 www.massapicom. 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.