You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Rick Isaacs <re...@gmail.com> on 2007/11/25 22:21:19 UTC

non/blocking dual in AXIS2 almost works, but hangs, why?

Hi,

I have been trying for several days to get the Axis2 blocking/nonblocking
dual samples working

with some success, except that when the client terminates (returns in main()
), the

client does not terminate, meaning that a thread is still active, blocking
the termination of the java process.

The request, response and the client listener executed OK (onComplete
called).

I have searched and tried various nonblocking samples, but either the
samples are too old to compile

or executes OK, but hangs.

Does the non/blocking dual correctly execute?

I am using tomcat 5.5, windows, and java 5.0

Rick

Re: non/blocking dual in AXIS2 almost works, but hangs, why?

Posted by Rick Isaacs <re...@gmail.com>.
Hi Martin,

Thank you for your suggestion.

>did you try using a callback
http://ws.apache.org/axis2/0_95/userguide3.html?<http://ws.apache.org/axis2/0_95/userguide3.html>

Yes

In http://ws.apache.org/axis2/0_95/userguide3.html

Section: EchoNonBlockingDualClient

The method finalizeInvoke is not defined in the class ServiceClient

   serviceClinet.finalizeInvoke();


Can you get the two dual samples in the Axis2 /Userguide to work and
terminate correctly?


The sample works OK, but does not terminate - I think a thread is still
active.

Here is the code for the EchoNonBlockingDualClient that I am using

with  sender.disengageModule("addressing");  in the finally cleanup block.

This is the Axis2 /Userguide sample with logging module.

I have only deployed the ant built service in

C:\apache-tomcat-5.5.25\webapps\axis2\WEB-INF\services\sample-MyService.aar

And the logging mar in

C:\apache-tomcat-5.5.25\webapps\axis2\WEB-INF\modules\logging.mar
C:\apache-tomcat-5.5.25\webapps\axis2\WEB-INF\repository\modules\logging.mar

And use the ant run clients

Rick

-----------------------------------------------------------------------

CODE


/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */


package userguide.clients;

import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.client.async.AsyncResult;
import org.apache.axis2.client.async.Callback;

import javax.xml.namespace.QName;

/**
 * Sample for asynchronous dual channel non-blocking service invocation.
 * Message Exchage Pattern IN-OUT
 * Ulitmate asynchronous service invocation sample.
 */
public class EchoNonBlockingDualClient {
    private static EndpointReference targetEPR = new EndpointReference("
http://127.0.0.1:8080/axis2/services/MyService");

    public static void main(String[] args)
    {
        ServiceClient sender = null;
                System.out.println("----- EchoNonBlockingDualClient");

        try {
            OMElement payload = ClientUtil.getEchoOMElement();

            Options options = new Options();
            options.setTo(targetEPR);
            options.setAction("urn:echo");
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            options.setUseSeparateListener(true);
            options.setAction("urn:echo");  // this is the action mapping we
put within the service.xml

            //Callback to handle the response
            Callback callback = new Callback() {
                public void onComplete(AsyncResult result) {

                                    System.out.println("----- onComplete
Response");
                    System.out.println(result.getResponseEnvelope());
                }

                public void onError(Exception e) {
                    e.printStackTrace();
                }
            };

            //Non-Blocking Invocation
            sender = new ServiceClient();
            sender.engageModule(Constants.MODULE_ADDRESSING);
            sender.setOptions(options);

               System.out.println("----- sendReceiveNonBlocking");
            sender.sendReceiveNonBlocking(payload, callback);

            //Wait till the callback receives the response.
            while (!callback.isComplete()) {
                                System.out.println("----- waiting");
                Thread.sleep(1000);
            }

            //Need to close the Client Side Listener.

                System.out.println("----- Callback isComplete");

        } catch (AxisFault axisFault) {
            axisFault.printStackTrace();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            try
            {
                        System.out.println("----- finally cleanup");

sender.disengageModule("addressing");  // added to the original sample

                    sender.cleanup();

///                    sender.finalizeInvoke();  // not defined in class

             } catch (AxisFault axisFault) {
                //have to ignore this
                axisFault.printStackTrace();
            }
        }

         System.out.println("----- Exit main");


    } // main
}


-----------------------------------------------------------------------

TRACE

C:\apache-tomcat-5.5.25\webapps\axis2\WEB-INF\samples\userguide>ant
run.client.nonblockingdual
Buildfile: build.xml

compile:

run.client.nonblockingdual:
     [java] ----- EchoNonBlockingDualClient

     [java] [DEBUG] XMLStreamReader is
com.ctc.wstx.sr.ValidatingStreamReader
     [java] [DEBUG] Handler RequestURIBasedDispatcher added to Phase
Transport
     [java] [DEBUG] Handler SOAPActionBasedDispatcher added to Phase
Transport
     [java] [DEBUG] Handler AddressingBasedDispatcher added to Phase
Addressing
     [java] [DEBUG] Handler RequestURIBasedDispatcher added to Phase
Dispatch
     [java] [DEBUG] Handler SOAPActionBasedDispatcher added to Phase
Dispatch
     [java] [DEBUG] Handler RequestURIOperationDispatcher added to Phase
Dispatch
     [java] [DEBUG] Handler SOAPMessageBodyBasedDispatcher added to Phase
Dispatch
     [java] [DEBUG] Handler HTTPLocationBasedDispatcher added to Phase
Dispatch
     [java] [DEBUG] Handler AddressingBasedDispatcher added to Phase
Addressing
     [java] [DEBUG] Handler RequestURIBasedDispatcher added to Phase
Dispatch
     [java] [DEBUG] Handler SOAPActionBasedDispatcher added to Phase
Dispatch
     [java] [DEBUG] Handler RequestURIOperationDispatcher added to Phase
Dispatch
     [java] [DEBUG] Handler SOAPMessageBodyBasedDispatcher added to Phase
Dispatch
     [java] [DEBUG] Handler HTTPLocationBasedDispatcher added to Phase
Dispatch
     [java] [INFO] Created temporary file :
C:\DOCUME~1\Rick\LOCALS~1\Temp\_axis2\axis263843addressing-1.3.mar
     [java] [DEBUG] XMLStreamReader is
com.ctc.wstx.sr.ValidatingStreamReader
     [java] [DEBUG] getBundle(org.apache.axis2,org.apache.axis2.i18n
,resource,null,...)
     [java] [DEBUG] loadBundle: Ignoring MissingResourceException: Can't
find bundle for base name org.apache.axis2.resource, locale en_GB
     [java] [DEBUG] Created org.apache.axis2.i18n.resource, linked to parent
null
     [java] [DEBUG] getBundle(org.apache.axis2,org.apache.axis2.i18n
,resource,null,...)
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(addingnewmodule)
     [java] [DEBUG] Adding new module
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(deployeingmodule)
     [java] [INFO] Deploying module: addressing-1.3
     [java] [INFO] Created temporary file :
C:\DOCUME~1\Rick\LOCALS~1\Temp\_axis2\axis263844axis2-scripting-1.3.mar
     [java] [DEBUG] XMLStreamReader is
com.ctc.wstx.sr.ValidatingStreamReader
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(addingnewmodule)
     [java] [DEBUG] Adding new module
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(deployeingmodule)
     [java] [INFO] Deploying module: script-1.3
     [java] [INFO] Created temporary file :
C:\DOCUME~1\Rick\LOCALS~1\Temp\_axis2\axis263845logging.mar
     [java] [DEBUG] XMLStreamReader is
com.ctc.wstx.sr.ValidatingStreamReader
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(addingnewmodule)
     [java] [DEBUG] Adding new module
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(deployeingmodule)
     [java] [INFO] Deploying module: sample-logging
     [java] [INFO] Created temporary file :
C:\DOCUME~1\Rick\LOCALS~1\Temp\_axis2\axis263846mex-1.3.mar
     [java] [DEBUG] XMLStreamReader is
com.ctc.wstx.sr.ValidatingStreamReader
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(addingnewmodule)
     [java] [DEBUG] Adding new module
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(deployeingmodule)
     [java] [INFO] Deploying module: metadataExchange-1.3
     [java] [INFO] Created temporary file :
C:\DOCUME~1\Rick\LOCALS~1\Temp\_axis2\axis263847ping-1.3.mar
     [java] [DEBUG] XMLStreamReader is
com.ctc.wstx.sr.ValidatingStreamReader
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(addingnewmodule)
     [java] [DEBUG] Adding new module
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(deployeingmodule)
     [java] [INFO] Deploying module: ping-1.3
     [java] [INFO] Created temporary file :
C:\DOCUME~1\Rick\LOCALS~1\Temp\_axis2\axis263848sample-logging.mar
     [java] [DEBUG] XMLStreamReader is
com.ctc.wstx.sr.ValidatingStreamReader
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(addingnewmodule)
     [java] [DEBUG] Adding new module
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(deployeingmodule)
     [java] [INFO] Deploying module: sample-logging
     [java] [INFO] Created temporary file :
C:\DOCUME~1\Rick\LOCALS~1\Temp\_axis2\axis263849soapmonitor-1.3.mar
     [java] [DEBUG] XMLStreamReader is
com.ctc.wstx.sr.ValidatingStreamReader
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(addingnewmodule)
     [java] [DEBUG] Adding new module
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(deployeingmodule)
     [java] [INFO] Deploying module: soapmonitor-1.3

     [java] LoggingModule:init  // trace info from logging module

     [java] [DEBUG] script services init
     [java] [INFO] script module activated
     [java] [DEBUG] mapActionToOperation: Mapping Action to Operation:
action: anonRobustOp; operation: org.apache.axis2.description.RobustOutO
     [java] [DEBUG] mapActionToOperation: Mapping Action to Operation:
action: urn:anonRobustOp; operation: org.apache.axis2.description.Robust
     [java] [DEBUG] mapActionToOperation: Mapping Action to Operation:
action: anonOutonlyOp; operation: org.apache.axis2.description.OutOnlyAx
     [java] [DEBUG] mapActionToOperation: Mapping Action to Operation:
action: urn:anonOutonlyOp; operation: org.apache.axis2.description.OutOn
     [java] [DEBUG] mapActionToOperation: Mapping Action to Operation:
action: anonOutInOp; operation: org.apache.axis2.description.OutInAxisOp
     [java] [DEBUG] mapActionToOperation: Mapping Action to Operation:
action: urn:anonOutInOp; operation: org.apache.axis2.description.OutInAx
     [java] [DEBUG] Handler AddressingOutHandler added to Phase MessageOut
     [java] [DEBUG] Handler AddressingOutHandler added to Phase MessageOut
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase
     [java] [DEBUG] Handler null added to Phase soapmonitorPhase

     [java] ----- sendReceiveNonBlocking

Note:

In Tomcat window "MyExample1:echo"




     [java] [DEBUG] Entry: OutInAxisOperationClient::execute, false
     [java] [DEBUG] Starting Listener...
     [java] [INFO] HTTP Listener starting on port : 9000
     [java] [DEBUG] useAsync=false, seperateListener=true
     [java] [DEBUG] Creating new callback receiver
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking pre-condition for
Phase "soapmonitorPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking phase
"soapmonitorPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking Handler 'null' in
Phase 'soapmonitorPhase'
     [java] [DEBUG] XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking post-conditions for
phase "soapmonitorPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking pre-condition for
Phase "OperationOutPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking phase
"OperationOutPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking post-conditions for
phase "OperationOutPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking pre-condition for
Phase "loggingPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking phase
"loggingPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking post-conditions for
phase "loggingPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking pre-condition for
Phase "RMPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking phase "RMPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking post-conditions for
phase "RMPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking pre-condition for
Phase "PolicyDetermination"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking phase
"PolicyDetermination"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking post-conditions for
phase "PolicyDetermination"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking pre-condition for
Phase "MessageOut"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking phase "MessageOut"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking Handler
'AddressingOutHandler' in Phase 'MessageO
     [java] [DEBUG] WSAHeaderWriter: isFinal=false addMU=false replace=false
includeOptional=false
     [java] [DEBUG] toOM: Factory,
org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory@1f297e7
     [java] [DEBUG] toOM: Endpoint reference, Address:
http://IDAHO:9000/axis2/services/anonService1
     [java] [DEBUG] toOM: Element qname, {
http://www.w3.org/2005/08/addressing}ReplyTo
     [java] [DEBUG] toOM: Addressing namespace,
http://www.w3.org/2005/08/addressing
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking post-conditions for
phase "MessageOut"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking pre-condition for
Phase "Security"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking phase "Security"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Checking post-conditions for
phase "Security"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking flowComplete() in
Phase "Security"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking flowComplete() in
Phase "MessageOut"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking flowComplete() for
Handler 'AddressingOutHandler'
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking flowComplete() in
Phase "PolicyDetermination"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking flowComplete() in
Phase "RMPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking flowComplete() in
Phase "loggingPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking flowComplete() in
Phase "OperationOutPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking flowComplete() in
Phase "soapmonitorPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069956323] Invoking flowComplete() for
Handler 'null' in Phase 'soapm

     [java] ----- waiting

     [java] [DEBUG] contentType from the OMOutputFormat =text/xml
     [java] [DEBUG] contentType returned =text/xml; charset=UTF-8
     [java] [DEBUG] start writeTo()
     [java] [DEBUG]   preserve=false
     [java] [DEBUG]   isOptimized=false
     [java] [DEBUG]   isDoingSWA=false
     [java] [DEBUG] XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
     [java] [DEBUG] end writeTo()
     [java] [DEBUG] >> "27c[\r][\n]"
     [java] [DEBUG] >> "<?xml version='1.0'
encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/" xmlns
     [java] [DEBUG] >> "[\r][\n]"
     [java] [DEBUG] >> "0"
     [java] [DEBUG] >> "[\r][\n]"
     [java] [DEBUG] >> "[\r][\n]"
     [java] [DEBUG] Using backport of the util.concurrent package..
     [java] [DEBUG] I/O session 1 [interested ops: []; ready ops: []]: Set
event [r]
     [java] [DEBUG] HTTP connection [/192.168.127.1:1391]: Connected
     [java] [DEBUG] I/O session 1 [interested ops: [r]; ready ops: [r]]: 182
bytes read
     [java] [DEBUG] HTTP connection [/192.168.127.1:1391]: POST
/axis2/services/anonService1 HTTP/1.1
     [java] [INFO] Using simulated buffered Pipes for event-driven to stream
IO bridging
     [java] [DEBUG] >> POST /axis2/services/anonService1 HTTP/1.1
     [java] [DEBUG] >> Content-Type: text/xml; charset=UTF-8
     [java] [DEBUG] >> SOAPAction: "urn:echoResponse"
     [java] [DEBUG] >> User-Agent: Axis2
     [java] [DEBUG] >> Host: IDAHO:9000
     [java] [DEBUG] >> Transfer-Encoding: chunked
     [java] [DEBUG] HTTP connection [/192.168.127.1:1391]: Input ready
     [java] [DEBUG] I/O session 1 [interested ops: [r]; ready ops: [r]]: 0
bytes read
     [java] [DEBUG] HTTP connection [/192.168.127.1:1391]: Content decoder
[chunk-coded; completed: false]
     [java] [DEBUG] HTTP connection [/192.168.127.1:1391]: Input ready
     [java] [DEBUG] I/O session 1 [interested ops: [r]; ready ops: [r]]: 722
bytes read
     [java] [DEBUG] I/O session 1 [interested ops: [r]; ready ops: [r]]: 0
bytes read
     [java] [DEBUG] I/O session 1 [interested ops: [r]; ready ops: [r]]: 0
bytes read
     [java] [DEBUG] HTTP connection [/192.168.127.1:1391]: Content decoder
[chunk-coded; completed: true]
     [java] [DEBUG] Input contentType (text/xml; charset=UTF-8)
     [java] [DEBUG] CharSetEncoding from content-type (UTF-8)
     [java] [DEBUG] createSOAPEnvelope using Builder (class
org.apache.axis2.builder.SOAPBuilder) selected from type (text/xml)
     [java] [DEBUG] char set encoding set from default =UTF-8
     [java] [DEBUG] XMLStreamReader is
com.ctc.wstx.sr.ValidatingStreamReader
     [java] [DEBUG] Starting to process SOAP 1.1 message
     [java] [DEBUG] Build the OMElelment EnvelopeBy the StaxSOAPModelBuilder
     [java] [DEBUG] Build the OMElelment HeaderBy the StaxSOAPModelBuilder
     [java] [DEBUG] Build the OMElelment ToBy the StaxSOAPModelBuilder
     [java] [DEBUG] Build the OMElelment ReplyToBy the StaxSOAPModelBuilder
     [java] [DEBUG] Build the OMElelment AddressBy the StaxSOAPModelBuilder
     [java] [DEBUG] Build the OMElelment MessageIDBy the
StaxSOAPModelBuilder
     [java] [DEBUG] Build the OMElelment ActionBy the StaxSOAPModelBuilder
     [java] [DEBUG] Build the OMElelment RelatesToBy the
StaxSOAPModelBuilder
     [java] [DEBUG] Build the OMElelment BodyBy the StaxSOAPModelBuilder
     [java] [DEBUG] Build the OMElelment echoBy the StaxSOAPModelBuilder
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking pre-condition for
Phase "Transport"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking phase "Transport"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'RequestURIBasedDispatcher' in Phase 'Tra
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking for Service using
target endpoint address : /axis
     [java] [DEBUG] parseRequestURLForServiceAndOperation :
[/axis2/services/anonService1][axis2/services]
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(servicefound)
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Found AxisService :
anonService1
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'SOAPActionBasedDispatcher' in Phase 'Tra
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking for Operation using
Action : urn:echoResponse
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking post-conditions for
phase "Transport"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking pre-condition for
Phase "Addressing"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking phase "Addressing"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'AddressingFinalInHandler' in Phase 'Addr
     [java] [DEBUG] Starting WS-Addressing Final IN handler ...
     [java] [DEBUG] WS-Addressing Final Headers present in the SOAP message.
Starting to process ...
     [java] [DEBUG] fromOM: Found address element for namespace,
http://www.w3.org/2005/08/addressing
     [java] [DEBUG] fromOM: Endpoint reference, Address:
http://www.w3.org/2005/08/addressing/none, Address Attributes: []
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'AddressingSubmissionInHandler' in Phase
     [java] [DEBUG] Another handler has processed the addressing headers.
Nothing to do here.
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'AddressingBasedDispatcher' in Phase 'Add
     [java] [DEBUG] org.apache.axis2.i18n.resource::handleGetObject
(checkingrelatesto)
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] The system is checking the
following  RelatesTo: urn:uuid:
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Dispatched successfully on
the RelatesTo. operation=org.ap
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'AddressingValidationHandler' in Phase 'A
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking post-conditions for
phase "Addressing"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking pre-condition for
Phase "Security"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking phase "Security"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking post-conditions for
phase "Security"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking pre-condition for
Phase "PreDispatch"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking phase "PreDispatch"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking post-conditions for
phase "PreDispatch"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking pre-condition for
Phase "Dispatch"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking phase "Dispatch"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'RequestURIBasedDispatcher' in Phase 'Dis
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'SOAPActionBasedDispatcher' in Phase 'Dis
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'RequestURIOperationDispatcher' in Phase
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'SOAPMessageBodyBasedDispatcher' in Phase
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler
'HTTPLocationBasedDispatcher' in Phase 'D
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking post-conditions for
phase "Dispatch"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking pre-condition for
Phase "RMPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking phase "RMPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking post-conditions for
phase "RMPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking pre-condition for
Phase "OperationInPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking phase
"OperationInPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking post-conditions for
phase "OperationInPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking pre-condition for
Phase "soapmonitorPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking phase
"soapmonitorPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking Handler 'null' in
Phase 'soapmonitorPhase'
     [java] [DEBUG] XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
     [java] [DEBUG] Build the OMElelment TextBy the StaxSOAPModelBuilder
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking post-conditions for
phase "soapmonitorPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking pre-condition for
Phase "loggingPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking phase
"loggingPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Checking post-conditions for
phase "loggingPhase"

     [java] ----- onComplete Response

     [java] [DEBUG] XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter

 [java] <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http:/

     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() in
Phase "loggingPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() in
Phase "soapmonitorPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'null' in Phase 'soapm
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() in
Phase "OperationInPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() in
Phase "RMPhase"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() in
Phase "Dispatch"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'HTTPLocationBasedDisp
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'SOAPMessageBodyBasedD
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'RequestURIOperationDi
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'SOAPActionBasedDispat
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'RequestURIBasedDispat
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() in
Phase "PreDispatch"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() in
Phase "Security"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() in
Phase "Addressing"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'AddressingValidationH
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'AddressingBasedDispat
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'AddressingSubmissionI
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'AddressingFinalInHand
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() in
Phase "Transport"
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'SOAPActionBasedDispat
     [java] [DEBUG] [MessageContext:
logID=urn:uuid:267A89B4DEDE1355751196069957266] Invoking flowComplete() for
Handler 'RequestURIBasedDispat
     [java] [DEBUG] HTTP connection [/192.168.127.1:1391]: HTTP/1.1 202
Accepted
     [java] [DEBUG] I/O session 1 [interested ops: [r]; ready ops: [r]]: Set
event [w]
     [java] [DEBUG] I/O session 1 [interested ops: [rw]; ready ops: [w]]:
124 bytes written
     [java] [DEBUG] HTTP connection [/192.168.127.1:1391]: Output ready
     [java] [DEBUG] << HTTP/1.1 202 Accepted
     [java] [DEBUG] << Date: Mon, 26 Nov 2007 09:39:17 GMT
     [java] [DEBUG] << Server: Axis2-HttpComponents-NIO
     [java] [DEBUG] << Transfer-Encoding: chunked
     [java] [DEBUG] HTTP connection [/192.168.127.1:1391]: Content encoder
[chunk-coded; completed: true]
     [java] [DEBUG] I/O session 1 [interested ops: [rw]; ready ops: [w]]: 5
bytes written
     [java] [DEBUG] I/O session 1 [interested ops: [rw]; ready ops: [w]]:
Clear event [w]
     [java] [DEBUG] HTTP connection [/192.168.127.1:1391]: Response ready

     [java] ----- Callback isComplete
     [java] ----- finally cleanup

     [java] [DEBUG] Found RequestResponseTransport setting response written
     [java] [INFO] Listener Shutdown
     [java] [DEBUG] HTTP connection [closed]: Closed
     [java] [INFO] Listener shut down

     [java] LoggingModule:shutdown

     [java] ----- Exit main

     [java] Java Result: 1        <<<<< after ctrl-c

BUILD SUCCESSFUL
Total time: 5 seconds
Terminate batch job (Y/N)? y





















On Nov 25, 2007 10:36 PM, Martin Gainty <mg...@hotmail.com> wrote:

>  did you try using a callback?
> http://ws.apache.org/axis2/0_95/userguide3.html
>
> and then with sendReceiveNonBlocking send the payload as 1st param and
> callback object as 2nd param e.g.
> client.sendReceiveNonBlocking(payload, callback);
>
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
>
>  ------------------------------
> Date: Sun, 25 Nov 2007 22:21:19 +0100
> From: reg.isaacs@gmail.com
> To: axis-user@ws.apache.org
> Subject: non/blocking dual in AXIS2 almost works, but hangs, why?
>
>
>
> Hi,
>
> I have been trying for several days to get the Axis2 blocking/nonblocking
> dual samples working
>
> with some success, except that when the client terminates (returns in
> main() ), the
>
> client does not terminate, meaning that a thread is still active, blocking
> the termination of the java process.
>
> The request, response and the client listener executed OK (onComplete
> called).
>
> I have searched and tried various nonblocking samples, but either the
> samples are too old to compile
>
> or executes OK, but hangs.
>
> Does the non/blocking dual correctly execute?
>
> I am using tomcat 5.5, windows, and java 5.0
>
> Rick
>
>
>
> ------------------------------
> Connect and share in new ways with Windows Live. Connect now!<http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007>
>

RE: non/blocking dual in AXIS2 almost works, but hangs, why?

Posted by Martin Gainty <mg...@hotmail.com>.
did you try using a callback?
http://ws.apache.org/axis2/0_95/userguide3.htmland then with sendReceiveNonBlocking send the payload as 1st param and callback object as 2nd param e.g.
client.sendReceiveNonBlocking(payload, callback);Martin______________________________________________Disclaimer and confidentiality noteEverything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.


Date: Sun, 25 Nov 2007 22:21:19 +0100From: reg.isaacs@gmail.comTo: axis-user@ws.apache.orgSubject: non/blocking dual in AXIS2 almost works, but hangs, why?Hi,I have been trying for several days to get the Axis2 blocking/nonblocking dual samples working with some success, except that when the client terminates (returns in main() ), theclient does not terminate, meaning that a thread is still active, blocking the termination of the java process. The request, response and the client listener executed OK (onComplete called).I have searched and tried various nonblocking samples, but either the samples are too old to compileor executes OK, but hangs. Does the non/blocking dual correctly execute?I am using tomcat 5.5, windows, and java 5.0Rick
_________________________________________________________________
Connect and share in new ways with Windows Live.
http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007