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 heikki <tr...@gmail.com> on 2006/07/12 16:44:43 UTC

[Axis2] MessageContext w/o any properties

Hi there,

I'm trying to retrieve the HttpServletRequest in a handler, through its
MessageContext, like so

HttpServletRequest httpServletRequest = (HttpServletRequest)
msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);

However, running this,  httpServletRequest was null. On further examination
I looked at all the properties I could get from MessageContext, using this
code

        Map propsMap = msgContext.getProperties();
        if(propsMap.size() == 0) {
            System.out.println("msgContext props map is empty !!!  ");
        }
        Set propsSet = props.entrySet();
        if(propsSet.size() == 0) {
            System.out.println("msgContext props set is empty !!!  ");
        }

which put out this

msgContext props map is empty !!!
msgContext props set is empty !!!

Apparently, I don't have any property in the MessageContext in the handler.
Is this usual? Should I take some extra step somewhere along the line?

My purpose of getting HttpServletRequest is to retrieve URL params from the
HTTP GET request. Is there another way to do achieve this?


thanks and regards,
Heikki Doeleman

Re: [Axis2] MessageContext w/o any properties

Posted by heikki <tr...@gmail.com>.
Yes, I'm sure.. it happens before invocation of the SEI. Just to verify I
put in your code snippet, added printlns about the results :

        if ( msgContext.getFLOW() == MessageContext.IN_FLOW ) {
            // get servlet context, request object
            final ServletContext servletContext = (ServletContext)
msgContext.getProperty(Constants.SERVLET_CONTEXT);
            if(servletContext == null) {
                System.out.println("servletcontext is null");
            }
            final HttpServletRequest request = (HttpServletRequest)
msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST);
            if(request == null) {
                System.out.println("httpservletrequest is null");
            }
        }

this puts out :

servletcontext is null
httpservletrequest is null

Since this code does do it for you, I'm really starting to wonder what might
be wrong. Might it be due to my using WebLogic, incl. the
<prefer-web-inf-classes> classloader setting ? Or might it have to do with
the particular nightly build I'm using (from about 3 weeks ago) ?

As you can guess: any help, tips and advice is very welcome !

Heikki Doeleman




On 7/13/06, Carsten Ziegeler <cz...@apache.org> wrote:
>
> Just to be sure, are you sure that your handler is only invoked for
> incomming request? (I did this mistake and then run into an NPE as the
> servlet request object is only available in the incomming flow, and I
> tried to access it on the outgoing flow as well).
> So this is my code which actually works for me:
>         if ( messageContext.getFLOW() == MessageContext.IN_FLOW ) {
>             // get servlet context, request object
>             final ServletContext servletContext = (ServletContext)
> messageContext.getProperty(Constants.SERVLET_CONTEXT);
>             final HttpServletRequest request = (HttpServletRequest)
> messageContext.getProperty(Constants.HTTP_SERVLET_REQUEST);
>         }
> And they are both not null.
>
> HTH
> Carsten
>
> heikki wrote:
> > thanks for the tips, alas I'm still not getting the HttpServlet Request
> ..
> >
> > I tried, in the handler :
> >
> > 1. Deepal's tip :
> >
> > httpServletRequest = (HttpServletRequest) msgContext.getProperty(
> > Constants.HTTP_SERVLET_REQUEST);
> >
> > 2. Robert's tip :
> >
> > httpServletRequest = (HttpServletRequest) msgContext.getOperationContext
> > ().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
> >
> > 3. those two combined :
> >
> > httpServletRequest = (HttpServletRequest) msgContext.getOperationContext
> > ().getProperty(Constants.HTTP_SERVLET_REQUEST);
> >
> > In each case, I don't find the HttpServletContext, instead ending up
> with
> > null.
> >
> > This being so, I do not fully understand this remark from Robert's post
> :
> >
> >
> > "Its by design- you have to get the operation context from the outgoing
> > MC and then get the incoming MC from that and look there for the servlet
> > context and any other "incoming" info. "
> >
> > My handler is used to process incoming messages; how could I get things
> from
> > outgoing MC at this stage ? Could you explain what is meant here?
> >
> > Does anyone have more advice on how I could obtain the
> HttpServletContext in
> > a handler that operates on incoming messages? Surely this should be a
> quite
> > easy task ..
> >
>
>
>
> --
> Carsten Ziegeler - Open Source Group, S&N AG
> http://www.s-und-n.de
> http://www.osoco.org/weblogs/rael/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: [Axis2] MessageContext w/o any properties

Posted by Carsten Ziegeler <cz...@apache.org>.
Just to be sure, are you sure that your handler is only invoked for
incomming request? (I did this mistake and then run into an NPE as the
servlet request object is only available in the incomming flow, and I
tried to access it on the outgoing flow as well).
So this is my code which actually works for me:
        if ( messageContext.getFLOW() == MessageContext.IN_FLOW ) {
            // get servlet context, request object
            final ServletContext servletContext = (ServletContext)
messageContext.getProperty(Constants.SERVLET_CONTEXT);
            final HttpServletRequest request = (HttpServletRequest)
messageContext.getProperty(Constants.HTTP_SERVLET_REQUEST);
        }
And they are both not null.

HTH
Carsten

heikki wrote:
> thanks for the tips, alas I'm still not getting the HttpServlet Request ..
> 
> I tried, in the handler :
> 
> 1. Deepal's tip :
> 
> httpServletRequest = (HttpServletRequest) msgContext.getProperty(
> Constants.HTTP_SERVLET_REQUEST);
> 
> 2. Robert's tip :
> 
> httpServletRequest = (HttpServletRequest) msgContext.getOperationContext
> ().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
> 
> 3. those two combined :
> 
> httpServletRequest = (HttpServletRequest) msgContext.getOperationContext
> ().getProperty(Constants.HTTP_SERVLET_REQUEST);
> 
> In each case, I don't find the HttpServletContext, instead ending up with
> null.
> 
> This being so, I do not fully understand this remark from Robert's post :
> 
> 
> "Its by design- you have to get the operation context from the outgoing
> MC and then get the incoming MC from that and look there for the servlet
> context and any other "incoming" info. "
> 
> My handler is used to process incoming messages; how could I get things from
> outgoing MC at this stage ? Could you explain what is meant here?
> 
> Does anyone have more advice on how I could obtain the HttpServletContext in
> a handler that operates on incoming messages? Surely this should be a quite
> easy task ..
> 



-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] MessageContext w/o any properties

Posted by Davanum Srinivas <da...@gmail.com>.
ok deprecated Constants.HTTP_SERVLET_REQUEST and made sure that
HTTPConstants.MC_HTTP_SERVLETREQUEST works.

-- dims

On 7/30/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> On Mon, 2006-07-17 at 10:00 +0200, heikki wrote:
> > Hi Deepal,
> >
> > yes it works now ! I'm using the nighlty build fom July 16th.
> >
> > To summarize -- the way that you indicated is the *only* way that
> > works, that is to say :
> >
> > - you must use Constants.HTTP_SERVLET_REQUEST (and not
> > HTTPConstants.MC_HTTP_SERVLETREQUEST) ;
>
> Why do we have both these constants? It seems like a bug to me!
>
> > - you must use msgCtx.getProperty() (and not
> > msgCtx.getOperationContext().getProperty() )
> >
> > Otherwise the HttpServletRequest won't be found.
>
> The transport details for a given message context are only available
> from that message context. So if you're processing the incoming message
> then you can look up the transport info from that message context. If
> you're processing the outgoing message (of an IN-OUT MEP) and want the
> servlet context associated with the incoming message, then you need to
> get the incoming MC from the operation context and then ask it for the
> transport info.
>
> Sanjiva.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] MessageContext w/o any properties

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Mon, 2006-07-17 at 10:00 +0200, heikki wrote:
> Hi Deepal,
> 
> yes it works now ! I'm using the nighlty build fom July 16th. 
> 
> To summarize -- the way that you indicated is the *only* way that
> works, that is to say :
> 
> - you must use Constants.HTTP_SERVLET_REQUEST (and not
> HTTPConstants.MC_HTTP_SERVLETREQUEST) ;

Why do we have both these constants? It seems like a bug to me!

> - you must use msgCtx.getProperty() (and not
> msgCtx.getOperationContext().getProperty() )
> 
> Otherwise the HttpServletRequest won't be found.

The transport details for a given message context are only available
from that message context. So if you're processing the incoming message
then you can look up the transport info from that message context. If
you're processing the outgoing message (of an IN-OUT MEP) and want the
servlet context associated with the incoming message, then you need to
get the incoming MC from the operation context and then ask it for the
transport info.

Sanjiva.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] MessageContext w/o any properties

Posted by Deepal Jayasinghe <de...@opensource.lk>.
heikki wrote:

> Hi Deepal,
>
> yes it works now ! I'm using the nighlty build fom July 16th.
>
> To summarize -- the way that you indicated is the *only* way that
> works, that is to say :
>
> - you must use Constants.HTTP_SERVLET_REQUEST (and not
> HTTPConstants.MC_HTTP_SERVLETREQUEST) ;
> - you must use msgCtx.getProperty() (and not
> msgCtx.getOperationContext().getProperty() )

Yes that is the correct behavior.

>
> Otherwise the HttpServletRequest won't be found.
>
> Thank you very much !
> Heikki Doeleman
>
>
> On 7/13/06, *Deepal Jayasinghe* <deepal@opensource.lk
> <ma...@opensource.lk>> wrote:
>
>     Hi Heikki;
>
>     I am sorry for my mistake , I thought that you are invoking service
>     using http post ,
>     there was a problem in http get and I fixed that in current code
>     base ,
>     so you will be able to get the HttpServlet Request  using
>
>     httpServletRequest = (HttpServletRequest)
>     msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST );
>
>     if you use either nightly builds or current svn code .
>
>     heikki wrote:
>
>     > thanks for the tips, alas I'm still not getting the HttpServlet
>     Request ..
>     >
>     > I tried, in the handler :
>     >
>     > 1. Deepal's tip :
>     >
>     > httpServletRequest = (HttpServletRequest)
>     > msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST );
>     >
>     > 2. Robert's tip :
>     >
>     > httpServletRequest = (HttpServletRequest)
>     >
>     msgContext.getOperationContext().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
>     >
>     > 3. those two combined :
>     >
>     > httpServletRequest = (HttpServletRequest)
>     >
>     msgContext.getOperationContext().getProperty(Constants.HTTP_SERVLET_REQUEST);
>     >
>     > In each case, I don't find the HttpServletContext, instead ending up
>     > with null.
>     >
>     > This being so, I do not fully understand this remark from
>     Robert's post :
>     >
>     >
>     > "Its by design- you have to get the operation context from the
>     outgoing
>     > MC and then get the incoming MC from that and look there for the
>     servlet
>     > context and any other "incoming" info. "
>     >
>     > My handler is used to process incoming messages; how could I get
>     > things from outgoing MC at this stage ? Could you explain what is
>     > meant here?
>     >
>     > Does anyone have more advice on how I could obtain the
>     > HttpServletContext in a handler that operates on incoming messages?
>     > Surely this should be a quite easy task ..
>     >
>     > thank you and regards,
>     > Heikki Doeleman
>     >
>     >
>     >
>     >
>     >
>     >
>     >
>     > On 7/13/06, *Carsten Ziegeler* <cziegeler@apache.org
>     <ma...@apache.org>
>     > <mailto:cziegeler@apache.org <ma...@apache.org>>> wrote:
>     >
>     >     This is a bug in the MessageContext which has been discussed
>     >     recently on
>     >     the dev list. The getProperties() method of the
>     MessageContext always
>     >     returns an empty map. So you can only get those properties you
>     >     know the
>     >     key of by calling getProperty(key).
>     >
>     >     Carsten
>     >
>     >     Deepal Jayasinghe wrote:
>     >     > You need to call
>     >     > msgCtx.getProperty(Constants.HTTP_SERVLET_REQUEST );
>     >     >
>     >     > heikki wrote:
>     >     >
>     >     >> Hi there,
>     >     >>
>     >     >> I'm trying to retrieve the HttpServletRequest in a handler,
>     >     through
>     >     >> its MessageContext, like so
>     >     >>
>     >     >> HttpServletRequest httpServletRequest = (HttpServletRequest)
>     >     >>
>     msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST );
>     >     >>
>     >     >> However, running this,  httpServletRequest was null. On
>     further
>     >     >> examination I looked at all the properties I could get from
>     >     >> MessageContext, using this code
>     >     >>
>     >     >>         Map propsMap = msgContext.getProperties();
>     >     >>         if(propsMap.size () == 0) {
>     >     >>             System.out.println("msgContext props map is
>     empty
>     >     !!!  ");
>     >     >>         }
>     >     >>         Set propsSet = props.entrySet();
>     >     >>         if(propsSet.size() == 0) {
>     >     >>             System.out.println ("msgContext props set is
>     empty
>     >     !!!  ");
>     >     >>         }
>     >     >>
>     >     >> which put out this
>     >     >>
>     >     >> msgContext props map is empty !!!
>     >     >> msgContext props set is empty !!!
>     >     >>
>     >     >> Apparently, I don't have any property in the
>     MessageContext in the
>     >     >> handler. Is this usual? Should I take some extra step
>     somewhere
>     >     along
>     >     >> the line?
>     >     >>
>     >     >> My purpose of getting HttpServletRequest is to retrieve
>     URL params
>     >     >> from the HTTP GET request. Is there another way to do
>     achieve this?
>     >     >>
>     >     >>
>     >     >> thanks and regards,
>     >     >> Heikki Doeleman
>     >     >
>     >     >
>     >
>     >
>     >     --
>     >     Carsten Ziegeler - Open Source Group, S&N AG
>     >     http://www.s-und-n.de
>     >     http://www.osoco.org/weblogs/rael/
>     >
>     >    
>     ---------------------------------------------------------------------
>     >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>     >     For additional commands, e-mail:
>     axis-user-help@ws.apache.org <ma...@ws.apache.org>
>     >     <mailto:axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>     >
>     >
>
>     --
>     Thanks,
>     Deepal
>     ................................................................
>     ~Future is Open~
>
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] MessageContext w/o any properties

Posted by heikki <tr...@gmail.com>.
Hi Deepal,

yes it works now ! I'm using the nighlty build fom July 16th.

To summarize -- the way that you indicated is the *only* way that works,
that is to say :

- you must use Constants.HTTP_SERVLET_REQUEST (and not
HTTPConstants.MC_HTTP_SERVLETREQUEST) ;
- you must use msgCtx.getProperty() (and not
msgCtx.getOperationContext().getProperty()
)

Otherwise the HttpServletRequest won't be found.

Thank you very much !
Heikki Doeleman


On 7/13/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
>
> Hi Heikki;
>
> I am sorry for my mistake , I thought that you are invoking service
> using http post ,
> there was a problem in http get and I fixed that in current code base ,
> so you will be able to get the HttpServlet Request  using
>
> httpServletRequest = (HttpServletRequest)
> msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST );
>
> if you use either nightly builds or current svn code .
>
> heikki wrote:
>
> > thanks for the tips, alas I'm still not getting the HttpServlet Request
> ..
> >
> > I tried, in the handler :
> >
> > 1. Deepal's tip :
> >
> > httpServletRequest = (HttpServletRequest)
> > msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST );
> >
> > 2. Robert's tip :
> >
> > httpServletRequest = (HttpServletRequest)
> > msgContext.getOperationContext().getProperty(
> HTTPConstants.MC_HTTP_SERVLETREQUEST);
> >
> > 3. those two combined :
> >
> > httpServletRequest = (HttpServletRequest)
> > msgContext.getOperationContext().getProperty(
> Constants.HTTP_SERVLET_REQUEST);
> >
> > In each case, I don't find the HttpServletContext, instead ending up
> > with null.
> >
> > This being so, I do not fully understand this remark from Robert's post
> :
> >
> >
> > "Its by design- you have to get the operation context from the outgoing
> > MC and then get the incoming MC from that and look there for the servlet
> > context and any other "incoming" info. "
> >
> > My handler is used to process incoming messages; how could I get
> > things from outgoing MC at this stage ? Could you explain what is
> > meant here?
> >
> > Does anyone have more advice on how I could obtain the
> > HttpServletContext in a handler that operates on incoming messages?
> > Surely this should be a quite easy task ..
> >
> > thank you and regards,
> > Heikki Doeleman
> >
> >
> >
> >
> >
> >
> >
> > On 7/13/06, *Carsten Ziegeler* <cziegeler@apache.org
> > <ma...@apache.org>> wrote:
> >
> >     This is a bug in the MessageContext which has been discussed
> >     recently on
> >     the dev list. The getProperties() method of the MessageContext
> always
> >     returns an empty map. So you can only get those properties you
> >     know the
> >     key of by calling getProperty(key).
> >
> >     Carsten
> >
> >     Deepal Jayasinghe wrote:
> >     > You need to call
> >     > msgCtx.getProperty(Constants.HTTP_SERVLET_REQUEST);
> >     >
> >     > heikki wrote:
> >     >
> >     >> Hi there,
> >     >>
> >     >> I'm trying to retrieve the HttpServletRequest in a handler,
> >     through
> >     >> its MessageContext, like so
> >     >>
> >     >> HttpServletRequest httpServletRequest = (HttpServletRequest)
> >     >> msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST );
> >     >>
> >     >> However, running this,  httpServletRequest was null. On further
> >     >> examination I looked at all the properties I could get from
> >     >> MessageContext, using this code
> >     >>
> >     >>         Map propsMap = msgContext.getProperties();
> >     >>         if(propsMap.size () == 0) {
> >     >>             System.out.println("msgContext props map is empty
> >     !!!  ");
> >     >>         }
> >     >>         Set propsSet = props.entrySet();
> >     >>         if(propsSet.size() == 0) {
> >     >>             System.out.println("msgContext props set is empty
> >     !!!  ");
> >     >>         }
> >     >>
> >     >> which put out this
> >     >>
> >     >> msgContext props map is empty !!!
> >     >> msgContext props set is empty !!!
> >     >>
> >     >> Apparently, I don't have any property in the MessageContext in
> the
> >     >> handler. Is this usual? Should I take some extra step somewhere
> >     along
> >     >> the line?
> >     >>
> >     >> My purpose of getting HttpServletRequest is to retrieve URL
> params
> >     >> from the HTTP GET request. Is there another way to do achieve
> this?
> >     >>
> >     >>
> >     >> thanks and regards,
> >     >> Heikki Doeleman
> >     >
> >     >
> >
> >
> >     --
> >     Carsten Ziegeler - Open Source Group, S&N AG
> >     http://www.s-und-n.de
> >     http://www.osoco.org/weblogs/rael/
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
>
> --
> Thanks,
> Deepal
> ................................................................
> ~Future is Open~
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: [Axis2] MessageContext w/o any properties

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Heikki;

I am sorry for my mistake , I thought that you are invoking service
using http post ,
there was a problem in http get and I fixed that in current code base ,
so you will be able to get the HttpServlet Request  using

httpServletRequest = (HttpServletRequest)
msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST );

if you use either nightly builds or current svn code .

heikki wrote:

> thanks for the tips, alas I'm still not getting the HttpServlet Request ..
>
> I tried, in the handler :
>
> 1. Deepal's tip :
>
> httpServletRequest = (HttpServletRequest)
> msgContext.getProperty(Constants.HTTP_SERVLET_REQUEST );
>
> 2. Robert's tip :
>
> httpServletRequest = (HttpServletRequest)
> msgContext.getOperationContext().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
>
> 3. those two combined :
>
> httpServletRequest = (HttpServletRequest)
> msgContext.getOperationContext().getProperty(Constants.HTTP_SERVLET_REQUEST);
>
> In each case, I don't find the HttpServletContext, instead ending up
> with null.
>
> This being so, I do not fully understand this remark from Robert's post :
>
>
> "Its by design- you have to get the operation context from the outgoing
> MC and then get the incoming MC from that and look there for the servlet
> context and any other "incoming" info. "
>
> My handler is used to process incoming messages; how could I get
> things from outgoing MC at this stage ? Could you explain what is
> meant here?
>
> Does anyone have more advice on how I could obtain the
> HttpServletContext in a handler that operates on incoming messages?
> Surely this should be a quite easy task ..
>
> thank you and regards,
> Heikki Doeleman
>
>
>
>
>
>
>
> On 7/13/06, *Carsten Ziegeler* <cziegeler@apache.org
> <ma...@apache.org>> wrote:
>
>     This is a bug in the MessageContext which has been discussed
>     recently on
>     the dev list. The getProperties() method of the MessageContext always
>     returns an empty map. So you can only get those properties you
>     know the
>     key of by calling getProperty(key).
>
>     Carsten
>
>     Deepal Jayasinghe wrote:
>     > You need to call
>     > msgCtx.getProperty(Constants.HTTP_SERVLET_REQUEST);
>     >
>     > heikki wrote:
>     >
>     >> Hi there,
>     >>
>     >> I'm trying to retrieve the HttpServletRequest in a handler,
>     through
>     >> its MessageContext, like so
>     >>
>     >> HttpServletRequest httpServletRequest = (HttpServletRequest)
>     >> msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST );
>     >>
>     >> However, running this,  httpServletRequest was null. On further
>     >> examination I looked at all the properties I could get from
>     >> MessageContext, using this code
>     >>
>     >>         Map propsMap = msgContext.getProperties();
>     >>         if(propsMap.size () == 0) {
>     >>             System.out.println("msgContext props map is empty
>     !!!  ");
>     >>         }
>     >>         Set propsSet = props.entrySet();
>     >>         if(propsSet.size() == 0) {
>     >>             System.out.println("msgContext props set is empty
>     !!!  ");
>     >>         }
>     >>
>     >> which put out this
>     >>
>     >> msgContext props map is empty !!!
>     >> msgContext props set is empty !!!
>     >>
>     >> Apparently, I don't have any property in the MessageContext in the
>     >> handler. Is this usual? Should I take some extra step somewhere
>     along
>     >> the line?
>     >>
>     >> My purpose of getting HttpServletRequest is to retrieve URL params
>     >> from the HTTP GET request. Is there another way to do achieve this?
>     >>
>     >>
>     >> thanks and regards,
>     >> Heikki Doeleman
>     >
>     >
>
>
>     --
>     Carsten Ziegeler - Open Source Group, S&N AG
>     http://www.s-und-n.de
>     http://www.osoco.org/weblogs/rael/
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] MessageContext w/o any properties

Posted by heikki <tr...@gmail.com>.
thanks for the tips, alas I'm still not getting the HttpServlet Request ..

I tried, in the handler :

1. Deepal's tip :

httpServletRequest = (HttpServletRequest) msgContext.getProperty(
Constants.HTTP_SERVLET_REQUEST);

2. Robert's tip :

httpServletRequest = (HttpServletRequest) msgContext.getOperationContext
().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);

3. those two combined :

httpServletRequest = (HttpServletRequest) msgContext.getOperationContext
().getProperty(Constants.HTTP_SERVLET_REQUEST);

In each case, I don't find the HttpServletContext, instead ending up with
null.

This being so, I do not fully understand this remark from Robert's post :


"Its by design- you have to get the operation context from the outgoing
MC and then get the incoming MC from that and look there for the servlet
context and any other "incoming" info. "

My handler is used to process incoming messages; how could I get things from
outgoing MC at this stage ? Could you explain what is meant here?

Does anyone have more advice on how I could obtain the HttpServletContext in
a handler that operates on incoming messages? Surely this should be a quite
easy task ..

thank you and regards,
Heikki Doeleman







On 7/13/06, Carsten Ziegeler <cz...@apache.org> wrote:
>
> This is a bug in the MessageContext which has been discussed recently on
> the dev list. The getProperties() method of the MessageContext always
> returns an empty map. So you can only get those properties you know the
> key of by calling getProperty(key).
>
> Carsten
>
> Deepal Jayasinghe wrote:
> > You need to call
> > msgCtx.getProperty(Constants.HTTP_SERVLET_REQUEST);
> >
> > heikki wrote:
> >
> >> Hi there,
> >>
> >> I'm trying to retrieve the HttpServletRequest in a handler, through
> >> its MessageContext, like so
> >>
> >> HttpServletRequest httpServletRequest = (HttpServletRequest)
> >> msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST );
> >>
> >> However, running this,  httpServletRequest was null. On further
> >> examination I looked at all the properties I could get from
> >> MessageContext, using this code
> >>
> >>         Map propsMap = msgContext.getProperties();
> >>         if(propsMap.size() == 0) {
> >>             System.out.println("msgContext props map is empty !!!  ");
> >>         }
> >>         Set propsSet = props.entrySet();
> >>         if(propsSet.size() == 0) {
> >>             System.out.println("msgContext props set is empty !!!  ");
> >>         }
> >>
> >> which put out this
> >>
> >> msgContext props map is empty !!!
> >> msgContext props set is empty !!!
> >>
> >> Apparently, I don't have any property in the MessageContext in the
> >> handler. Is this usual? Should I take some extra step somewhere along
> >> the line?
> >>
> >> My purpose of getting HttpServletRequest is to retrieve URL params
> >> from the HTTP GET request. Is there another way to do achieve this?
> >>
> >>
> >> thanks and regards,
> >> Heikki Doeleman
> >
> >
>
>
> --
> Carsten Ziegeler - Open Source Group, S&N AG
> http://www.s-und-n.de
> http://www.osoco.org/weblogs/rael/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: [Axis2] MessageContext w/o any properties

Posted by Carsten Ziegeler <cz...@apache.org>.
This is a bug in the MessageContext which has been discussed recently on
 the dev list. The getProperties() method of the MessageContext always
returns an empty map. So you can only get those properties you know the
key of by calling getProperty(key).

Carsten

Deepal Jayasinghe wrote:
> You need to call
> msgCtx.getProperty(Constants.HTTP_SERVLET_REQUEST);
> 
> heikki wrote:
> 
>> Hi there,
>>
>> I'm trying to retrieve the HttpServletRequest in a handler, through
>> its MessageContext, like so
>>
>> HttpServletRequest httpServletRequest = (HttpServletRequest)
>> msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST );
>>
>> However, running this,  httpServletRequest was null. On further
>> examination I looked at all the properties I could get from
>> MessageContext, using this code
>>
>>         Map propsMap = msgContext.getProperties();
>>         if(propsMap.size() == 0) {
>>             System.out.println("msgContext props map is empty !!!  ");
>>         }
>>         Set propsSet = props.entrySet();
>>         if(propsSet.size() == 0) {
>>             System.out.println("msgContext props set is empty !!!  ");
>>         }
>>
>> which put out this
>>
>> msgContext props map is empty !!!
>> msgContext props set is empty !!!
>>
>> Apparently, I don't have any property in the MessageContext in the
>> handler. Is this usual? Should I take some extra step somewhere along
>> the line?
>>
>> My purpose of getting HttpServletRequest is to retrieve URL params
>> from the HTTP GET request. Is there another way to do achieve this?
>>
>>
>> thanks and regards,
>> Heikki Doeleman
> 
> 


-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] MessageContext w/o any properties

Posted by Deepal Jayasinghe <de...@opensource.lk>.
You need to call
msgCtx.getProperty(Constants.HTTP_SERVLET_REQUEST);

heikki wrote:

> Hi there,
>
> I'm trying to retrieve the HttpServletRequest in a handler, through
> its MessageContext, like so
>
> HttpServletRequest httpServletRequest = (HttpServletRequest)
> msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST );
>
> However, running this,  httpServletRequest was null. On further
> examination I looked at all the properties I could get from
> MessageContext, using this code
>
>         Map propsMap = msgContext.getProperties();
>         if(propsMap.size() == 0) {
>             System.out.println("msgContext props map is empty !!!  ");
>         }
>         Set propsSet = props.entrySet();
>         if(propsSet.size() == 0) {
>             System.out.println("msgContext props set is empty !!!  ");
>         }
>
> which put out this
>
> msgContext props map is empty !!!
> msgContext props set is empty !!!
>
> Apparently, I don't have any property in the MessageContext in the
> handler. Is this usual? Should I take some extra step somewhere along
> the line?
>
> My purpose of getting HttpServletRequest is to retrieve URL params
> from the HTTP GET request. Is there another way to do achieve this?
>
>
> thanks and regards,
> Heikki Doeleman


-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] MessageContext w/o any properties

Posted by heikki <tr...@gmail.com>.
Hi,

I do it inside a custom handler, the code of which is

package com.xxx.handler;

import java.util.Map;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;

import org.apache.axis2.AxisFault;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.engine.Handler;
import org.apache.axis2.handlers.AbstractHandler;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class GetRequestHandler extends AbstractHandler implements Handler {
    private Log log = LogFactory.getLog(GetRequestHandler.class);

    public void invoke(MessageContext msgContext) throws AxisFault {

         Map propsMap = msgContext.getProperties();
         if(propsMap.size() == 0) {
             System.out.println("msgContext props map is empty !!!  ");
         }
         Set propsSet = props.entrySet();
         if(propsSet.size() == 0) {
              System.out.println("msgContext props set is empty !!!  ");
         }

         HttpServletRequest httpServletRequest = (HttpServletRequest)
msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
         if(httpServletRequest == null) {
              System.out.println("httpServletRequest is null !!!  ");
         }
    }
}

On 7/12/06, Bruno Negrao <bn...@gmail.com> wrote:
>
> Hi,
>
> from where did you obtain the msgContext object?
>
> bruno
> On 7/12/06, heikki <tr...@gmail.com> wrote:
> > Hi there,
> >
> > I'm trying to retrieve the HttpServletRequest in a handler, through its
> > MessageContext, like so
> >
> > HttpServletRequest httpServletRequest = (HttpServletRequest)
> > msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST
> > );
> >
> > However, running this,  httpServletRequest was null. On further
> examination
> > I looked at all the properties I could get from MessageContext, using
> this
> > code
> >
> >         Map propsMap = msgContext.getProperties();
> >         if(propsMap.size() == 0) {
> >             System.out.println("msgContext props map is empty !!!  ");
> >         }
> >         Set propsSet = props.entrySet();
> >         if(propsSet.size() == 0) {
> >              System.out.println("msgContext props set is empty !!!  ");
> >         }
> >
> > which put out this
> >
> > msgContext props map is empty !!!
> > msgContext props set is empty !!!
> >
> > Apparently, I don't have any property in the MessageContext in the
> handler.
> > Is this usual? Should I take some extra step somewhere along the line?
> >
> > My purpose of getting HttpServletRequest is to retrieve URL params from
> the
> > HTTP GET request. Is there another way to do achieve this?
> >
> >
> > thanks and regards,
> > Heikki Doeleman
> >
>

Re: [Axis2] MessageContext w/o any properties

Posted by Bruno Negrao <bn...@gmail.com>.
Hi,

from where did you obtain the msgContext object?

bruno
On 7/12/06, heikki <tr...@gmail.com> wrote:
> Hi there,
>
> I'm trying to retrieve the HttpServletRequest in a handler, through its
> MessageContext, like so
>
> HttpServletRequest httpServletRequest = (HttpServletRequest)
> msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST
> );
>
> However, running this,  httpServletRequest was null. On further examination
> I looked at all the properties I could get from MessageContext, using this
> code
>
>         Map propsMap = msgContext.getProperties();
>         if(propsMap.size() == 0) {
>             System.out.println("msgContext props map is empty !!!  ");
>         }
>         Set propsSet = props.entrySet();
>         if(propsSet.size() == 0) {
>              System.out.println("msgContext props set is empty !!!  ");
>         }
>
> which put out this
>
> msgContext props map is empty !!!
> msgContext props set is empty !!!
>
> Apparently, I don't have any property in the MessageContext in the handler.
> Is this usual? Should I take some extra step somewhere along the line?
>
> My purpose of getting HttpServletRequest is to retrieve URL params from the
> HTTP GET request. Is there another way to do achieve this?
>
>
> thanks and regards,
> Heikki Doeleman
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] MessageContext w/o any properties

Posted by robert lazarski <ro...@gmail.com>.
When using properties in a handler, try this:

messageContext.getOperationContext().getProperty(
            HTTPConstants.MC_HTTP_SERVLETREQUEST);

The way this works is explained here:

http://marc.theaimsgroup.com/?l=axis-dev&m=115255047000592&w=2

> In addition it seems that the outgoing MessageContext objects do not
> contain the servlet context. Is this by mistake or by design? If it's
> the latter, how can I access the servlet context?

Its by design- you have to get the operation context from the outgoing
MC and then get the incoming MC from that and look there for the servlet
context and any other "incoming" info.

and here to discuss a problem on its way of being resolved:

http://marc.theaimsgroup.com/?l=axis-dev&m=115260394402411&w=2

I personally use
messageContext.getFLOW() == MessageContext.OUT_FLOW  and
messageContext.getFLOW() == MessageContext.IN_FLOW to determine which
one I'm in, but you can uses LABEL as well.

HTH,
Robert
http://www.braziloutsource.com/



On 7/12/06, heikki <tr...@gmail.com> wrote:
> Hi there,
>
> I'm trying to retrieve the HttpServletRequest in a handler, through its
> MessageContext, like so
>
> HttpServletRequest httpServletRequest = (HttpServletRequest)
> msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST
> );
>
> However, running this,  httpServletRequest was null. On further examination
> I looked at all the properties I could get from MessageContext, using this
> code
>
>         Map propsMap = msgContext.getProperties();
>         if(propsMap.size() == 0) {
>             System.out.println("msgContext props map is empty !!!  ");
>         }
>         Set propsSet = props.entrySet();
>         if(propsSet.size() == 0) {
>              System.out.println("msgContext props set is empty !!!  ");
>         }
>
> which put out this
>
> msgContext props map is empty !!!
> msgContext props set is empty !!!
>
> Apparently, I don't have any property in the MessageContext in the handler.
> Is this usual? Should I take some extra step somewhere along the line?
>
> My purpose of getting HttpServletRequest is to retrieve URL params from the
> HTTP GET request. Is there another way to do achieve this?
>
>
> thanks and regards,
> Heikki Doeleman
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Optimized soap content

Posted by "Taylor, Clarence B" <Cl...@ca.com>.
I am attempting to create some web services for existing legacy
applications.  These applications *CAN* take hundreds of parameters but
usually any given invocation will only use a few.  My initial approach
was to create a java class, called InputParms, that have all of the
parameters defined as private with public getter/setters.  This way when
the client side, via its UI or other appropriate mechanism could set the
few parameters needed for this particular service and then invoke the
web-service with the InputParms class as one of the services parameters.
The service side of the code would then format the data appropriately
for the legacy service.
 
However when the InputParms class is serialized into the soap body it
becomes very large.  I am looking for a technique that is "content"
driven so that only those parameters specified are sent.  Because of the
large number of parameters, I hesitate to surface them in WSDL, because
then the WSDL becomes more unwieldy.
 
I am aware that this is not an "AXIS" issue per se, however since the
axis is engine is doing the serialization of the classes, I thought that
perhaps others have run into this issue.  If there are other appropriate
forums, pointers to them would be appreciated.
 
Thank you 
 
Brad Taylor

AXIS2-811 rampart in weblogic 9.1

Posted by qz...@dstina.com.




I have the same issue as that found by Anamitra Bhattacharyya and reported
as a bug (AXIS2-811). I tried a simple web service with web service
security features engaged. It works fine under JBoss 4.0.4 but the same
thing does not work under Weblogic 9.1. I wonder if there is any resolution
to this issue in Axis2 or work around with Weblogic.  Thanks.


-----------------------------------------
This e-mail and any attachments are intended only for the
individual or company to which it is addressed and may contain
information which is privileged, confidential and prohibited from
disclosure or unauthorized use under applicable law.  If you are
not the intended recipient of this e-mail, you are hereby notified
that any use, dissemination, or copying of this e-mail or the
information contained in this e-mail is strictly prohibited by the
sender.  If you have received this transmission in error, please
return the material received to the sender and delete all copies
from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Optional parameters in a service

Posted by Pradeepta Bhattacharya <pr...@bsil.com>.
How to define that some arguments for a service can be optional and can
contain null values. Do we specify them through wsdl or there is some other
mechanism to achieve that. Thanks a lot.

 

Kind Regards

Pradeepta


RE: Urgent :Kindly verify whether the procedure is right or not

Posted by Pradeepta Bhattacharya <pr...@bsil.com>.
We are supposed to send back an XML structure bean to the client. So the
structure is hierarchic in that sense.

 

Thanks.

Pradeepta

 

  _____  

From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Wednesday, July 12, 2006 9:05 PM
To: axis-user@ws.apache.org
Subject: Re: Urgent :Kindly verify whether the procedure is right or not

 

What is your definition of 'hierarchic response' which you return in the
response?
M- 

*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

 


 

----- Original Message ----- 

From: Pradeepta Bhattacharya <ma...@bsil.com>  

To: axis-user@ws.apache.org 

Cc: axis-dev@ws.apache.org 

Sent: Wednesday, July 12, 2006 10:53 AM

Subject: Urgent :Kindly verify whether the procedure is right or not

 

Hello All,

 

            Kindly verify whether the procedure opted is right or not. I
have an urgent delivery and need to get this clarified as soon as possible.
I need to send a hierarchic object to a service as a parameter and get a
hierarchic object as a response. The steps taken by me is:- 

1)      Define the Beans and the service interface

2)      Generate the WSDL using java2wsdl 

3)      Generate the stubs and skeletons using the wsdl to java

4)      Put the business logic in the skeleton classes to perform the
required business operations

5)      Deploy it in the server 

6)      Get the server WSDL generated and prepare the stubs to invoke the
service.

 

The procedure works fine as earlier the problem faced was that the
hierarchic object as request/response was not able to be
serialized/deserialized into SOAP stream. Could you please let me know if
this is the right procedure or there are some other mechanism that we are
suppose to use. Thanks a lot

 

Pradeepta

 

 

 


Re: Urgent :Kindly verify whether the procedure is right or not

Posted by Martin Gainty <mg...@hotmail.com>.
What is your definition of 'hierarchic response' which you return in the response?
M- 
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



  ----- Original Message ----- 
  From: Pradeepta Bhattacharya 
  To: axis-user@ws.apache.org 
  Cc: axis-dev@ws.apache.org 
  Sent: Wednesday, July 12, 2006 10:53 AM
  Subject: Urgent :Kindly verify whether the procedure is right or not


  Hello All,

   

              Kindly verify whether the procedure opted is right or not. I have an urgent delivery and need to get this clarified as soon as possible. I need to send a hierarchic object to a service as a parameter and get a hierarchic object as a response. The steps taken by me is:- 

  1)      Define the Beans and the service interface

  2)      Generate the WSDL using java2wsdl 

  3)      Generate the stubs and skeletons using the wsdl to java

  4)      Put the business logic in the skeleton classes to perform the required business operations

  5)      Deploy it in the server 

  6)      Get the server WSDL generated and prepare the stubs to invoke the service.

   

  The procedure works fine as earlier the problem faced was that the hierarchic object as request/response was not able to be serialized/deserialized into SOAP stream. Could you please let me know if this is the right procedure or there are some other mechanism that we are suppose to use. Thanks a lot

   

  Pradeepta

   

   

   

RE: Urgent :Kindly verify whether the procedure is right or not

Posted by Kinichiro Inoguchi <in...@yahoo.com>.
Hi, Pradeepta

About RPCMessageReceiver, it is generic message receiver and
if you have service class and request & response bean class,
RPCMessageReceiver generates WSDL automatically and SOAP
selialize/deselialize will be done.
And, Yes, RPCMessageReceiver at the server side,
receiving SOAP request and send SOAP response.

You have your own service class and beans, so I thought
using RPCMessageReceiver is easy for you.

Regards,
kinichiro

--- Pradeepta Bhattacharya <pr...@bsil.com> wrote:

> 	I was following the same mechanism previously but was getting an
> error when the response was being returned to the client. As
> AirAvailabilityRequest object which is sent as a request parameter
> contains
> other objects which in turn has many objects and so on, I was getting
> this
> error frequently. So I shifted to this mechanism and it worked.
> 
> 	 And also by using the RPCReceiver mechanism the services were not
> being able to be invoked by the .Net client. 
> 
> 	Could you please guide whether using the RPCReceiver mechanism what
> would act as my skeleton class. Would it be at the server? Thanks a
> lot.
> 
> Pradeepta
> 
> 
> 
> -----Original Message-----
> From: Kinichiro Inoguchi [mailto:ingc1968@yahoo.com] 
> Sent: Wednesday, July 12, 2006 9:50 PM
> To: axis-user@ws.apache.org
> Subject: RE: Urgent :Kindly verify whether the procedure is right or
> not
> 
> Hi,
> 
> How about using RPCMessageReceiver instead of using skelton ?
> 
> 1. Create class ShoppingEngine like this,
> 
> public class ShoppingEngine {
>     public AirAvailabilityResponse airAvailability(
>         AirAvailabilityRequest request) {
>         AirAvailabilityResponse resp = null;
>         ...
>         return resp;
>         }
> }
> 
> 2. your serivces.xml like this
> 
> <service name="ShoppingService">
>     <description>Shopping Service.</description>
>     <parameter name="ServiceClass"
>
locked="false">com.bsil.project.airtrade.shoppingengine.ShoppingEngine</para
> meter>
>     <operation name="airAvailability">
>         <messageReceiver
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </operation>
> </service>
> 
> 3. pack your service to ShoppingEngine.aar and deploy it.
> 
> I could see the service WSDL of this with latest nightly build war.
> 
> Maybe, latest nightly builds are better because many bug fixes are
> made.
> 
> Regards,
> kinichiro
> 
> --- Pradeepta Bhattacharya <pr...@bsil.com> wrote:
> 
> > 
> > Thanks for your reply. Find attached the beans and the service
> > interface and
> > skeleton.
> > 
> > Pradeepta
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: Kinichiro Inoguchi [mailto:ingc1968@yahoo.com] 
> > Sent: Wednesday, July 12, 2006 8:43 PM
> > To: axis-user@ws.apache.org
> > Subject: Re: Urgent :Kindly verify whether the procedure is right
> or
> > not
> > 
> > Hi
> > 
> > Could you post your Beans and service java code ?
> > 
> > I think your process is right if you want to use 
> > generated server skelton.
> > 
> > BTW, are you using Axis2 release 1.0 ?
> > 
> > Regards,
> > kinichiro
> > 
> > --- Pradeepta Bhattacharya <pr...@bsil.com> wrote:
> > 
> > > Hello All,
> > > 
> > >  
> > > 
> > >             Kindly verify whether the procedure opted is right or
> > > not. I
> > > have an urgent delivery and need to get this clarified as soon as
> > > possible.
> > > I need to send a hierarchic object to a service as a parameter
> and
> > > get a
> > > hierarchic object as a response. The steps taken by me is:- 
> > > 
> > > 1)      Define the Beans and the service interface
> > > 
> > > 2)      Generate the WSDL using java2wsdl 
> > > 
> > > 3)      Generate the stubs and skeletons using the wsdl to java
> > > 
> > > 4)      Put the business logic in the skeleton classes to perform
> > the
> > > required business operations
> > > 
> > > 5)      Deploy it in the server 
> > > 
> > > 6)      Get the server WSDL generated and prepare the stubs to
> > invoke
> > > the
> > > service.
> > > 
> > >  
> > > 
> > > The procedure works fine as earlier the problem faced was that
> the
> > > hierarchic object as request/response was not able to be
> > > serialized/deserialized into SOAP stream. Could you please let me
> > > know if
> > > this is the right procedure or there are some other mechanism
> that
> > we
> > > are
> > > suppose to use. Thanks a lot
> > > 
> > >  
> > > 
> > > Pradeepta
> > > 
> > >  
> > > 
> > >  
> > > 
> > >  
> > > 
> > > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around 
> > http://mail.yahoo.com 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Urgent :Kindly verify whether the procedure is right or not

Posted by Pradeepta Bhattacharya <pr...@bsil.com>.
	I was following the same mechanism previously but was getting an
error when the response was being returned to the client. As
AirAvailabilityRequest object which is sent as a request parameter contains
other objects which in turn has many objects and so on, I was getting this
error frequently. So I shifted to this mechanism and it worked.

	 And also by using the RPCReceiver mechanism the services were not
being able to be invoked by the .Net client. 

	Could you please guide whether using the RPCReceiver mechanism what
would act as my skeleton class. Would it be at the server? Thanks a lot.

Pradeepta



-----Original Message-----
From: Kinichiro Inoguchi [mailto:ingc1968@yahoo.com] 
Sent: Wednesday, July 12, 2006 9:50 PM
To: axis-user@ws.apache.org
Subject: RE: Urgent :Kindly verify whether the procedure is right or not

Hi,

How about using RPCMessageReceiver instead of using skelton ?

1. Create class ShoppingEngine like this,

public class ShoppingEngine {
    public AirAvailabilityResponse airAvailability(
        AirAvailabilityRequest request) {
        AirAvailabilityResponse resp = null;
        ...
        return resp;
        }
}

2. your serivces.xml like this

<service name="ShoppingService">
    <description>Shopping Service.</description>
    <parameter name="ServiceClass"
locked="false">com.bsil.project.airtrade.shoppingengine.ShoppingEngine</para
meter>
    <operation name="airAvailability">
        <messageReceiver
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </operation>
</service>

3. pack your service to ShoppingEngine.aar and deploy it.

I could see the service WSDL of this with latest nightly build war.

Maybe, latest nightly builds are better because many bug fixes are
made.

Regards,
kinichiro

--- Pradeepta Bhattacharya <pr...@bsil.com> wrote:

> 
> Thanks for your reply. Find attached the beans and the service
> interface and
> skeleton.
> 
> Pradeepta
> 
> 
> 
> 
> -----Original Message-----
> From: Kinichiro Inoguchi [mailto:ingc1968@yahoo.com] 
> Sent: Wednesday, July 12, 2006 8:43 PM
> To: axis-user@ws.apache.org
> Subject: Re: Urgent :Kindly verify whether the procedure is right or
> not
> 
> Hi
> 
> Could you post your Beans and service java code ?
> 
> I think your process is right if you want to use 
> generated server skelton.
> 
> BTW, are you using Axis2 release 1.0 ?
> 
> Regards,
> kinichiro
> 
> --- Pradeepta Bhattacharya <pr...@bsil.com> wrote:
> 
> > Hello All,
> > 
> >  
> > 
> >             Kindly verify whether the procedure opted is right or
> > not. I
> > have an urgent delivery and need to get this clarified as soon as
> > possible.
> > I need to send a hierarchic object to a service as a parameter and
> > get a
> > hierarchic object as a response. The steps taken by me is:- 
> > 
> > 1)      Define the Beans and the service interface
> > 
> > 2)      Generate the WSDL using java2wsdl 
> > 
> > 3)      Generate the stubs and skeletons using the wsdl to java
> > 
> > 4)      Put the business logic in the skeleton classes to perform
> the
> > required business operations
> > 
> > 5)      Deploy it in the server 
> > 
> > 6)      Get the server WSDL generated and prepare the stubs to
> invoke
> > the
> > service.
> > 
> >  
> > 
> > The procedure works fine as earlier the problem faced was that the
> > hierarchic object as request/response was not able to be
> > serialized/deserialized into SOAP stream. Could you please let me
> > know if
> > this is the right procedure or there are some other mechanism that
> we
> > are
> > suppose to use. Thanks a lot
> > 
> >  
> > 
> > Pradeepta
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Urgent :Kindly verify whether the procedure is right or not

Posted by Kinichiro Inoguchi <in...@yahoo.com>.
Hi,

How about using RPCMessageReceiver instead of using skelton ?

1. Create class ShoppingEngine like this,

public class ShoppingEngine {
    public AirAvailabilityResponse airAvailability(
        AirAvailabilityRequest request) {
        AirAvailabilityResponse resp = null;
        ...
        return resp;
        }
}

2. your serivces.xml like this

<service name="ShoppingService">
    <description>Shopping Service.</description>
    <parameter name="ServiceClass"
locked="false">com.bsil.project.airtrade.shoppingengine.ShoppingEngine</parameter>
    <operation name="airAvailability">
        <messageReceiver
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </operation>
</service>

3. pack your service to ShoppingEngine.aar and deploy it.

I could see the service WSDL of this with latest nightly build war.

Maybe, latest nightly builds are better because many bug fixes are
made.

Regards,
kinichiro

--- Pradeepta Bhattacharya <pr...@bsil.com> wrote:

> 
> Thanks for your reply. Find attached the beans and the service
> interface and
> skeleton.
> 
> Pradeepta
> 
> 
> 
> 
> -----Original Message-----
> From: Kinichiro Inoguchi [mailto:ingc1968@yahoo.com] 
> Sent: Wednesday, July 12, 2006 8:43 PM
> To: axis-user@ws.apache.org
> Subject: Re: Urgent :Kindly verify whether the procedure is right or
> not
> 
> Hi
> 
> Could you post your Beans and service java code ?
> 
> I think your process is right if you want to use 
> generated server skelton.
> 
> BTW, are you using Axis2 release 1.0 ?
> 
> Regards,
> kinichiro
> 
> --- Pradeepta Bhattacharya <pr...@bsil.com> wrote:
> 
> > Hello All,
> > 
> >  
> > 
> >             Kindly verify whether the procedure opted is right or
> > not. I
> > have an urgent delivery and need to get this clarified as soon as
> > possible.
> > I need to send a hierarchic object to a service as a parameter and
> > get a
> > hierarchic object as a response. The steps taken by me is:- 
> > 
> > 1)      Define the Beans and the service interface
> > 
> > 2)      Generate the WSDL using java2wsdl 
> > 
> > 3)      Generate the stubs and skeletons using the wsdl to java
> > 
> > 4)      Put the business logic in the skeleton classes to perform
> the
> > required business operations
> > 
> > 5)      Deploy it in the server 
> > 
> > 6)      Get the server WSDL generated and prepare the stubs to
> invoke
> > the
> > service.
> > 
> >  
> > 
> > The procedure works fine as earlier the problem faced was that the
> > hierarchic object as request/response was not able to be
> > serialized/deserialized into SOAP stream. Could you please let me
> > know if
> > this is the right procedure or there are some other mechanism that
> we
> > are
> > suppose to use. Thanks a lot
> > 
> >  
> > 
> > Pradeepta
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Urgent :Kindly verify whether the procedure is right or not

Posted by Pradeepta Bhattacharya <pr...@bsil.com>.
Thanks for your reply. Find attached the beans and the service interface and
skeleton.

Pradeepta




-----Original Message-----
From: Kinichiro Inoguchi [mailto:ingc1968@yahoo.com] 
Sent: Wednesday, July 12, 2006 8:43 PM
To: axis-user@ws.apache.org
Subject: Re: Urgent :Kindly verify whether the procedure is right or not

Hi

Could you post your Beans and service java code ?

I think your process is right if you want to use 
generated server skelton.

BTW, are you using Axis2 release 1.0 ?

Regards,
kinichiro

--- Pradeepta Bhattacharya <pr...@bsil.com> wrote:

> Hello All,
> 
>  
> 
>             Kindly verify whether the procedure opted is right or
> not. I
> have an urgent delivery and need to get this clarified as soon as
> possible.
> I need to send a hierarchic object to a service as a parameter and
> get a
> hierarchic object as a response. The steps taken by me is:- 
> 
> 1)      Define the Beans and the service interface
> 
> 2)      Generate the WSDL using java2wsdl 
> 
> 3)      Generate the stubs and skeletons using the wsdl to java
> 
> 4)      Put the business logic in the skeleton classes to perform the
> required business operations
> 
> 5)      Deploy it in the server 
> 
> 6)      Get the server WSDL generated and prepare the stubs to invoke
> the
> service.
> 
>  
> 
> The procedure works fine as earlier the problem faced was that the
> hierarchic object as request/response was not able to be
> serialized/deserialized into SOAP stream. Could you please let me
> know if
> this is the right procedure or there are some other mechanism that we
> are
> suppose to use. Thanks a lot
> 
>  
> 
> Pradeepta
> 
>  
> 
>  
> 
>  
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org

Re: Urgent :Kindly verify whether the procedure is right or not

Posted by Kinichiro Inoguchi <in...@yahoo.com>.
Hi

Could you post your Beans and service java code ?

I think your process is right if you want to use 
generated server skelton.

BTW, are you using Axis2 release 1.0 ?

Regards,
kinichiro

--- Pradeepta Bhattacharya <pr...@bsil.com> wrote:

> Hello All,
> 
>  
> 
>             Kindly verify whether the procedure opted is right or
> not. I
> have an urgent delivery and need to get this clarified as soon as
> possible.
> I need to send a hierarchic object to a service as a parameter and
> get a
> hierarchic object as a response. The steps taken by me is:- 
> 
> 1)      Define the Beans and the service interface
> 
> 2)      Generate the WSDL using java2wsdl 
> 
> 3)      Generate the stubs and skeletons using the wsdl to java
> 
> 4)      Put the business logic in the skeleton classes to perform the
> required business operations
> 
> 5)      Deploy it in the server 
> 
> 6)      Get the server WSDL generated and prepare the stubs to invoke
> the
> service.
> 
>  
> 
> The procedure works fine as earlier the problem faced was that the
> hierarchic object as request/response was not able to be
> serialized/deserialized into SOAP stream. Could you please let me
> know if
> this is the right procedure or there are some other mechanism that we
> are
> suppose to use. Thanks a lot
> 
>  
> 
> Pradeepta
> 
>  
> 
>  
> 
>  
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Urgent :Kindly verify whether the procedure is right or not

Posted by Pradeepta Bhattacharya <pr...@bsil.com>.
Hello All,

 

            Kindly verify whether the procedure opted is right or not. I
have an urgent delivery and need to get this clarified as soon as possible.
I need to send a hierarchic object to a service as a parameter and get a
hierarchic object as a response. The steps taken by me is:- 

1)      Define the Beans and the service interface

2)      Generate the WSDL using java2wsdl 

3)      Generate the stubs and skeletons using the wsdl to java

4)      Put the business logic in the skeleton classes to perform the
required business operations

5)      Deploy it in the server 

6)      Get the server WSDL generated and prepare the stubs to invoke the
service.

 

The procedure works fine as earlier the problem faced was that the
hierarchic object as request/response was not able to be
serialized/deserialized into SOAP stream. Could you please let me know if
this is the right procedure or there are some other mechanism that we are
suppose to use. Thanks a lot

 

Pradeepta

 

 

 


Urgent :Kindly verify whether the procedure is right or not

Posted by Pradeepta Bhattacharya <pr...@bsil.com>.
Hello All,

 

            Kindly verify whether the procedure opted is right or not. I
have an urgent delivery and need to get this clarified as soon as possible.
I need to send a hierarchic object to a service as a parameter and get a
hierarchic object as a response. The steps taken by me is:- 

1)      Define the Beans and the service interface

2)      Generate the WSDL using java2wsdl 

3)      Generate the stubs and skeletons using the wsdl to java

4)      Put the business logic in the skeleton classes to perform the
required business operations

5)      Deploy it in the server 

6)      Get the server WSDL generated and prepare the stubs to invoke the
service.

 

The procedure works fine as earlier the problem faced was that the
hierarchic object as request/response was not able to be
serialized/deserialized into SOAP stream. Could you please let me know if
this is the right procedure or there are some other mechanism that we are
suppose to use. Thanks a lot

 

Pradeepta