axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bahman Kalali" <bkal...@csg.uwaterloo.ca>
Subject How to get an operation Name in a Requstor Handler
Date Wed, 06 Nov 2002 19:47:00 GMT
----- Original Message ----- 
From: Bahman Kalali 
To: axis-user@xml.apache.org 
Sent: Wednesday, November 06, 2002 2:23 PM
Subject: Re: How to get an operation Name in a Requstor Handler


Thanks Bobby,

I had even tried that one, but I got the same error message(java.lang.NullPointerException)

I just read an APIdocs of OperationDesc, I guess there is something wrong with OperationDesc.

http://www.cs.unc.edu/Courses/comp190/docs/documentation/axis/apiDocs/org/apache/axis/description/OperationDesc.html

I am using 

xml-Axis-1.0 Release Oct 7, 2002
JDK1.3.1_04
Tomcat4.1

--Bahman

  ----- Original Message ----- 
  From: Bobby Carp 
  To: 'axis-user@xml.apache.org' 
  Sent: Wednesday, November 06, 2002 1:43 PM
  Subject: RE: How to get an operation Name in a Requstor Handler


  OperationDesc oper = msgCxt.getOperation();

  oper.getName();

    -----Original Message-----
    From: Bahman Kalali [mailto:bkalali@csg.uwaterloo.ca]
    Sent: Wednesday, November 06, 2002 9:58 AM
    To: axis-user@xml.apache.org
    Subject: How to get an operation Name in a Requstor Handler


    I am trying to write a Service requestor Handler. Inside the Handler's invoke method,
I want to get the method name of service provider:  

    I can get an operation name from a MessageContext as follows. 
    public void invoke(MessageContext msgContext) throws AxisFault

    {

    Handler serviceHandler = msgContext.getService();


    Message msg=msgContext.getRequestMessage();

    SOAPEnvelope envelope=msg.getSOAPEnvelope();

    Element envElement=envelope.getAsDOM();

    Document doc= envelope.getAsDocument();

    String operationName=mygetOperation(doc);

    }

    Is there any other way that I can get an operation name and its expected passing parameters
in my Handlers from a MessageContext?



    I tried this, but it gives me NULL pointer exception error.

    OperationDesc op =msgContext.getOperation();


    Method t= op.getMethod();

    System.out.println(t.getName())===>java.lang.NullPointerException



    I really appreciate your input.

    --Bahman






Mime
View raw message