Examples of AsyncPort


Examples of org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort

    }

    private AsyncPort getPort() {

        AsyncService service = new AsyncService();
        AsyncPort port = service.getAsyncPort();
        assertNotNull("Port is null", port);

        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                DOCLITWR_ASYNC_ENDPOINT);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort

     *               is a server not found case). Expected to throw a
     *               EE/WSE/UnknownHostException
     */
    public void testAsyncPolling_asyncMEP_UnknwonHost() throws Exception {

        AsyncPort port = getPort();

        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                HOST_NOT_FOUND_ENDPOINT);

        Response<ThrowExceptionResponse> resp = port
                .throwExceptionAsync(ExceptionTypeEnum.WSE);

        AsyncClient.waitBlocking(resp);
        try {
            resp.get();
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort

     *               configured against an endpoint which does not exist (this
     *               is a 404-Not Found case). Expected to throw a EE/WSE
     */
    public void testAsyncPolling_asyncMEP_404NotFound() throws Exception {

        AsyncPort port = getPort();
        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, CONNECT_404_ENDPOINT);
        Response<ThrowExceptionResponse> resp = port
                .throwExceptionAsync(ExceptionTypeEnum.WSE);

        AsyncClient.waitBlocking(resp);
        try {
            resp.get();
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort

     *               EE/SOAPFaultException
     */
    public void testAsyncPolling_asyncMEP_WebServiceException()
            throws Exception {

        AsyncPort port = getPort();
        Response<ThrowExceptionResponse> resp = port
                .throwExceptionAsync(ExceptionTypeEnum.WSE);

        AsyncClient.waitBlocking(resp);
        try {
            resp.get();
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort

     *               will throw a wsdl:fault which should result in a
     *               EE/SimpleFault
     */
    public void testAsyncPolling_asyncMEP_WsdlFault() throws Exception {

        AsyncPort port = getPort();
        Response<ThrowExceptionResponse> resp = port
                .throwExceptionAsync(ExceptionTypeEnum.WSDL_FAULT);

        AsyncClient.waitBlocking(resp);
        try {
            resp.get();
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort

     *               is a server not found case). Expected to throw a
     *               EE/WSE/UnknownHostException
     */
    public void testAsyncCallback_asyncMEP_UnknownHost() throws Exception {

        AsyncPort port = getPort();
        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                HOST_NOT_FOUND_ENDPOINT);

        CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
        Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE,
                handler);

        AsyncClient.waitBlocking(resp);
        try {
            handler.get();
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort

     *               is a 404 Not Found case). Expected to throw a
     *               EE/WSE/UnknownHostException
     */
    public void testAsyncCallback_asyncMEP_404NotFound() throws Exception {

        AsyncPort port = getPort();
        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, CONNECT_404_ENDPOINT);

        CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
        Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE,
                handler);

        AsyncClient.waitBlocking(resp);
        try {
            handler.get();
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort

     *               the record for longest method name in Apache here.
     */
    public void testAsyncCallback_asyncMEP_WebServiceException()
            throws Exception {

        AsyncPort port = getPort();

        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                DOCLITWR_ASYNC_ENDPOINT);
        rc.put(AddressingConstants.WSA_REPLY_TO, "blarg");

        CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
        Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE,
                handler);

        AsyncClient.waitBlocking(resp);
        Exception e = null;
        try {
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort

        ClientConfigurationFactory factory = new ClientConfigurationFactory(
                configurator);
        MetadataFactoryRegistry.setFactory(ClientConfigurationFactory.class,
                factory);

        AsyncPort port = getPort();

        Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
        rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                DOCLITWR_ASYNC_ENDPOINT);
        //rc.put(AddressingConstants.WSA_REPLY_TO, AddressingConstants.Final.WSA_ANONYMOUS_URL);
        rc.put("org.apache.axis2.jaxws.use.async.mep", Boolean.TRUE);

        CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
        Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSE,
                handler);

        AsyncClient.waitBlocking(resp);
        Exception e = null;
        try {
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.asyncdoclit.client.AsyncPort

     *               will throw a wsdl:fault which should result in a
     *               EE/SimpleFault
     */
    public void testAsyncCallback_asyncMEP_WsdlFault() throws Exception {

        AsyncPort port = getPort();
        CallbackHandler<ThrowExceptionResponse> handler = new CallbackHandler<ThrowExceptionResponse>();
        Future<?> resp = port.throwExceptionAsync(ExceptionTypeEnum.WSDL_FAULT,
                handler);

        AsyncClient.waitBlocking(resp);

        try {
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.