Re: [Axis2] SOAP header elements

2007-09-27 Thread keith chapman
AFAIK setting the property on the messageContext is the only way.

Thanks,
Keith

On 9/27/07, Todd Allen <[EMAIL PROTECTED]> wrote:
>
> Is there a preferred way to access the SOAP header elements from
> within the service class of an Axis2 web service?  I realize that the
> MessageContext can be obtained and a property set on it for later
> use.  However, it is preferable not to expose the MessageContext
> object in the service layer.
> Is there a better/different way to do this?
>
> I'm using Axis2 version 1.1.
>
> Thanks,
> Todd
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


[Axis2] SOAP header elements

2007-09-27 Thread Todd Allen
Is there a preferred way to access the SOAP header elements from 
within the service class of an Axis2 web service?  I realize that the 
MessageContext can be obtained and a property set on it for later 
use.  However, it is preferable not to expose the MessageContext 
object in the service layer.

Is there a better/different way to do this?

I'm using Axis2 version 1.1.

Thanks,
Todd


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] SOAP header elements

2007-05-21 Thread Amila Suriarachchi

wsdl2java generated code does not databind headers at ther server side.
if you want to do that see MessageReceiver class fromOM method to see how
you can poplate the xmlbean
objects from an OM element (which you have)

On 5/22/07, Jack Sprat <[EMAIL PROTECTED]> wrote:


Keith.

Thanks again for the reply.

Can you be a bit more specific?  Which stub are you referring to?
In this case the invoke method is being called from a handler class.  I
don't see a fromOM method in any of the classes generated for the elements
in the SOAP header.

T


*keith chapman <[EMAIL PROTECTED]>* wrote:

Exactly, the stub has a fromOM method that populates the xmlBeans classes
from the response received.

Thanks,
Keith.

On 5/22/07, Todd Allen < [EMAIL PROTECTED]> wrote:
>
> Keith,
>
> Thanks very much for the reply.
>
> Can you elaborate on your last statement of "drill down to the XMLBeans
> class?"  How would I do that?  I think that's the last piece of my puzzle.
> Is this similar to the fromOM method I see in the message receiver class
> generated by WSDL2Java?
>
> Thanks,
> Todd
>
>
> keith chapman wrote:
> > Hi jack,
> >
> > U can use the following once you have the SOAPEnvelop to get the
> > header block.
> >
> > SOAPHeader header = envelope.getHeader();
> >
> > Once you get that you can get the specific header you want by using
> > header.getHeaderBlocksWithNSURI();
> >
> > or get all the headers and iterate through them using
> > header.getChildren();
> >
> > Once you have the header block you can drill down to the xmlBeans
> class.
> >
> > Thanks,
> > Keith.
> >
> >
> > On 5/21/07, *Jack Sprat* < [EMAIL PROTECTED]
> > > wrote:
> >
> > OK.  I was able to get the header elements using the
> > getChildElements() method and iterating.
> >
> > But the XMLBenas question remains.  How do I get at the class
> > created by XMLBeans for these 2 header elements?
> >
> > Thanks,
> > T
> >
> >
> > */Jack Sprat < [EMAIL PROTECTED]
> > >/* wrote:
> >
> > Deepal,
> >
> > Thanks for the reply.
> > Yes, this is server side.  I can get the SOAPEnvelope but then
> > how do I get the contents of the elements themselves?  In this
> > case it is a user and password element.  The Axis2 JavaDocs
> > have a return value of |org.apache.axiom.soap.SOAPEnvelope for
> > the getEnvelope() method ||but I don't have any docs for that
> > type.
> > |
> > Also, does the class created by XMLBeans for the user and
> > password elements come into play at all?  I was expecting to
> > be able to pull in those classes created by XMLBeans for these
> > 2 elements.
> >
> > Thanks,
> > T
> >
> >
> > */Deepal Jayasinghe <[EMAIL PROTECTED]
> > >/* wrote:
> >
> > Hi Jack ,
> > If this is in the server side , you can get the message
> > context and from
> > that you can get the SOAP envelope and from the soap
> > envelope you can
> > get the soap headers.
> >
> > If it is the in the client side , the the process is ,
> > - First you get the last operation context from the
> > service client
> > - and then follow the above steps.
> >
> > Thanks
> > Deepal
> > > Can anyone answer this question? I thought this would be
>
> > fairly
> > > common but I've not seen any tutorials or anything like
> > that.
> > > Any help is appreciated.
> > >
> > > Thanks.
> > > T
> > >
> > >
> > > */Jack Sprat /* wrote:
> > >
> > > I am using Axis 1.2 with XML Beans and need to get the
> > user and
> > > password SOAP header elements. I've set up an Axis2
> > handler and
> > > it is being called properly.
> > > My question is how exactly do I get the to the SOAP
> > header elements?
> > >
> > > Thanks.
> > > T
> > >
> >
>

--
Need Mail bonding?
Go to the Yahoo! Mail 
Q&Afor
 great
tips from Yahoo! 
Answersusers.





--
Amila Suriarachchi,
WSO2 Inc.


Re: [Axis2] SOAP header elements

2007-05-21 Thread Jack Sprat
Keith.

Thanks again for the reply.

Can you be a bit more specific?  Which stub are you referring to?
In this case the invoke method is being called from a handler class.  I don't 
see a fromOM method in any of the classes generated for the elements in the 
SOAP header.

T


keith chapman <[EMAIL PROTECTED]> wrote: Exactly, the stub has a fromOM method 
that populates the xmlBeans classes from the response received.

Thanks,
Keith.

On 5/22/07, Todd Allen < [EMAIL PROTECTED]> wrote:Keith,

Thanks very much for the reply. 

Can you elaborate on your last statement of "drill down to the XMLBeans class?" 
 How would I do that?  I think that's the last piece of my puzzle.
Is this similar to the fromOM method I see in the message receiver class 
generated by WSDL2Java?

Thanks,
Todd


keith chapman wrote:
> Hi jack,
>
> U can use the following once you have the SOAPEnvelop to get the
> header block.
>
> SOAPHeader header =  envelope.getHeader();
>
> Once you get that you can get the specific header you want by using
> header.getHeaderBlocksWithNSURI();
>
> or get all the headers and iterate through them using
 > header.getChildren();
>
> Once you have the header block you can drill down to the xmlBeans class.
>
> Thanks,
> Keith.
>
>
> On 5/21/07, *Jack Sprat* < [EMAIL PROTECTED]
> > wrote:
>
> OK.  I was able to get the header elements using the
> getChildElements() method and iterating. 
>
> But the XMLBenas question remains.  How do I get at the class
> created by XMLBeans for these 2 header elements?
>
> Thanks,
> T
>
>
> */Jack Sprat < [EMAIL PROTECTED]
> >/* wrote:
>
> Deepal,
>
> Thanks for the reply. 
> Yes, this is server side.  I can get the SOAPEnvelope but then
> how do I get the contents of the elements themselves?  In this
> case it is a user and password element.  The Axis2 JavaDocs 
> have a return value of |org.apache.axiom.soap.SOAPEnvelope for
> the getEnvelope() method ||but I don't have any docs for that
> type.
> |
> Also, does the class created by XMLBeans for the user and 
> password elements come into play at all?  I was expecting to
> be able to pull in those classes created by XMLBeans for these
> 2 elements.
>
> Thanks,
> T 
>
>
> */Deepal Jayasinghe <[EMAIL PROTECTED]
> >/* wrote: 
>
> Hi Jack ,
> If this is in the server side , you can get the message
> context and from
> that you can get the SOAP envelope and from the soap 
> envelope you can
> get the soap headers.
>
> If it is the in the client side , the the process is ,
> - First you get the last operation context from the 
> service client
> - and then follow the above steps.
>
> Thanks
> Deepal
> > Can anyone answer this question? I thought this would be 
> fairly
> > common but I've not seen any tutorials or anything like
> that.
> > Any help is appreciated.
> >
> > Thanks. 
> > T
> >
> >
> > */Jack Sprat /* wrote:
> >
> > I am using Axis 1.2 with XML Beans and need to get the 
> user and
> > password SOAP header elements. I've set up an Axis2
> handler and
> > it is being called properly.
> > My question is how exactly do I get the to the SOAP 
> header elements?
> >
> > Thanks.
> > T
> >
>



 
-
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

Re: [Axis2] SOAP header elements

2007-05-21 Thread keith chapman

Exactly, the stub has a fromOM method that populates the xmlBeans classes
from the response received.

Thanks,
Keith.

On 5/22/07, Todd Allen <[EMAIL PROTECTED]> wrote:


Keith,

Thanks very much for the reply.

Can you elaborate on your last statement of "drill down to the XMLBeans
class?"  How would I do that?  I think that's the last piece of my puzzle.
Is this similar to the fromOM method I see in the message receiver class
generated by WSDL2Java?

Thanks,
Todd


keith chapman wrote:
> Hi jack,
>
> U can use the following once you have the SOAPEnvelop to get the
> header block.
>
> SOAPHeader header = envelope.getHeader();
>
> Once you get that you can get the specific header you want by using
> header.getHeaderBlocksWithNSURI();
>
> or get all the headers and iterate through them using
> header.getChildren();
>
> Once you have the header block you can drill down to the xmlBeans class.
>
> Thanks,
> Keith.
>
>
> On 5/21/07, *Jack Sprat* <[EMAIL PROTECTED]
> > wrote:
>
> OK.  I was able to get the header elements using the
> getChildElements() method and iterating.
>
> But the XMLBenas question remains.  How do I get at the class
> created by XMLBeans for these 2 header elements?
>
> Thanks,
> T
>
>
> */Jack Sprat <[EMAIL PROTECTED]
> >/* wrote:
>
> Deepal,
>
> Thanks for the reply.
> Yes, this is server side.  I can get the SOAPEnvelope but then
> how do I get the contents of the elements themselves?  In this
> case it is a user and password element.  The Axis2 JavaDocs
> have a return value of |org.apache.axiom.soap.SOAPEnvelope for
> the getEnvelope() method ||but I don't have any docs for that
> type.
> |
> Also, does the class created by XMLBeans for the user and
> password elements come into play at all?  I was expecting to
> be able to pull in those classes created by XMLBeans for these
> 2 elements.
>
> Thanks,
> T
>
>
> */Deepal Jayasinghe <[EMAIL PROTECTED]
> >/* wrote:
>
> Hi Jack ,
> If this is in the server side , you can get the message
> context and from
> that you can get the SOAP envelope and from the soap
> envelope you can
> get the soap headers.
>
> If it is the in the client side , the the process is ,
> - First you get the last operation context from the
> service client
> - and then follow the above steps.
>
> Thanks
> Deepal
> > Can anyone answer this question? I thought this would be
> fairly
> > common but I've not seen any tutorials or anything like
> that.
> > Any help is appreciated.
> >
> > Thanks.
> > T
> >
> >
> > */Jack Sprat /* wrote:
> >
> > I am using Axis 1.2 with XML Beans and need to get the
> user and
> > password SOAP header elements. I've set up an Axis2
> handler and
> > it is being called properly.
> > My question is how exactly do I get the to the SOAP
> header elements?
> >
> > Thanks.
> > T
> >
>
>
> Shape Yahoo! in your own image. Join our Network Research
> Panel today!
>
http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
> <
http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
>
> hot CTA = Join our Network Research Panel
>
>
>

> Pinpoint customers
> <
http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50
>who
> are looking for what you sell.
>
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


Re: [Axis2] SOAP header elements

2007-05-21 Thread Todd Allen

Keith,

Thanks very much for the reply.

Can you elaborate on your last statement of "drill down to the XMLBeans 
class?"  How would I do that?  I think that's the last piece of my puzzle.
Is this similar to the fromOM method I see in the message receiver class 
generated by WSDL2Java?


Thanks,
Todd


keith chapman wrote:

Hi jack,

U can use the following once you have the SOAPEnvelop to get the 
header block.


SOAPHeader header = envelope.getHeader();

Once you get that you can get the specific header you want by using
header.getHeaderBlocksWithNSURI();

or get all the headers and iterate through them using
header.getChildren();

Once you have the header block you can drill down to the xmlBeans class.

Thanks,
Keith.


On 5/21/07, *Jack Sprat* <[EMAIL PROTECTED] 
> wrote:


OK.  I was able to get the header elements using the
getChildElements() method and iterating.

But the XMLBenas question remains.  How do I get at the class
created by XMLBeans for these 2 header elements?

Thanks,
T


*/Jack Sprat <[EMAIL PROTECTED]
>/* wrote:

Deepal,

Thanks for the reply.
Yes, this is server side.  I can get the SOAPEnvelope but then
how do I get the contents of the elements themselves?  In this
case it is a user and password element.  The Axis2 JavaDocs
have a return value of |org.apache.axiom.soap.SOAPEnvelope for
the getEnvelope() method ||but I don't have any docs for that
type.
|
Also, does the class created by XMLBeans for the user and
password elements come into play at all?  I was expecting to
be able to pull in those classes created by XMLBeans for these
2 elements.

Thanks,
T


*/Deepal Jayasinghe <[EMAIL PROTECTED]
>/* wrote:

Hi Jack ,
If this is in the server side , you can get the message
context and from
that you can get the SOAP envelope and from the soap
envelope you can
get the soap headers.

If it is the in the client side , the the process is ,
- First you get the last operation context from the
service client
- and then follow the above steps.

Thanks
Deepal
> Can anyone answer this question? I thought this would be
fairly
> common but I've not seen any tutorials or anything like
that.
> Any help is appreciated.
>
> Thanks.
> T
>
>
> */Jack Sprat /* wrote:
>
> I am using Axis 1.2 with XML Beans and need to get the
user and
> password SOAP header elements. I've set up an Axis2
handler and
> it is being called properly.
> My question is how exactly do I get the to the SOAP
header elements?
>
> Thanks.
> T
>


Shape Yahoo! in your own image. Join our Network Research
Panel today!

http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7


hot CTA = Join our Network Research Panel



Pinpoint customers

who
are looking for what you sell. 





--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/ 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Service vs. Operation client APIs [was Re: [Axis2] SOAP header elements]

2007-05-20 Thread Samisa Abeysinghe

Eran Chinthaka wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Samisa Abeysinghe wrote:
 


OK, I really do not want to criticize the client API here, specially
given that it has been around for more than two years.

However, I have a problem when deciding whether to use the service
client or operation client API for my implementation.
As an example, in operation client, I do not have an API to engage a
module but with service client I can. However if I want to access the
SOAP envelope or play around with SOAP level stuff, I have to use
operation client. 
   



See you are not getting the point here. ServiceClient is for users who
just want to send and receive some XML chunks. In ServiceClient there
are quite a number of convenient methods to do things, which are not
available. So are you suggesting to have all the methods that are in
ServiceClient to be available in OperationClient. No.
ServiceClient is for simple users and OperationClient is for more
adventurous users who wanna get some more control.
 


Well the problem here is my non-Java mindset. :(
I am too much dependent on the ServiceClient API, and you guys are too 
much accustomed to this API to understand my mindset ;)

Anyway, thanks to the explanation, I get the point at last :)

 


Now I am confused as to what I should be using. How
should I go about making my decision? If you can point me to some docs
that would be great.
   



As you know we are still improving Axis2/java docs and I agree that it
is not complete. Perhaps we can learn a lot about documentation from
Axis2/C project ;)
 


Well I do not think Axis2/C is there yet either :)


If you are curious about engaging a module, this is how you do it.

AxisModule module = axisConfig.getModule(moduleName);
   if (module != null) {
   axisService.engageModule(module);
   } else {
   throw new AxisFault("Unable to engage module : " +
moduleName);
   }

Don't think I am smart to write this code. Just copied and pasted from
ServiceClient.engageModule method. So in Axis2/Java we follow the
concept of "on-demand" documentation :D
 


Again, my problem was, I was only looking at the API.
Well, code is the best form of documentation, next time I should also 
have a look into the code  :)


Thanks,
Samisa...


Chinthaka
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGUS5njON2uBzUhh8RAuzmAJ9MQBTKU/99tTKnxRixX67KOMNQiACdG3VR
b5sEmIRAz8/M+wue/ZxZzcg=
=ogQj
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Service vs. Operation client APIs [was Re: [Axis2] SOAP header elements]

2007-05-20 Thread Eran Chinthaka
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Samisa Abeysinghe wrote:
> OK, I really do not want to criticize the client API here, specially
> given that it has been around for more than two years.
> 
> However, I have a problem when deciding whether to use the service
> client or operation client API for my implementation.
> As an example, in operation client, I do not have an API to engage a
> module but with service client I can. However if I want to access the
> SOAP envelope or play around with SOAP level stuff, I have to use
> operation client. 

See you are not getting the point here. ServiceClient is for users who
just want to send and receive some XML chunks. In ServiceClient there
are quite a number of convenient methods to do things, which are not
available. So are you suggesting to have all the methods that are in
ServiceClient to be available in OperationClient. No.
ServiceClient is for simple users and OperationClient is for more
adventurous users who wanna get some more control.

> Now I am confused as to what I should be using. How
> should I go about making my decision? If you can point me to some docs
> that would be great.

As you know we are still improving Axis2/java docs and I agree that it
is not complete. Perhaps we can learn a lot about documentation from
Axis2/C project ;)
If you are curious about engaging a module, this is how you do it.

AxisModule module = axisConfig.getModule(moduleName);
if (module != null) {
axisService.engageModule(module);
} else {
throw new AxisFault("Unable to engage module : " +
moduleName);
}

Don't think I am smart to write this code. Just copied and pasted from
ServiceClient.engageModule method. So in Axis2/Java we follow the
concept of "on-demand" documentation :D

Chinthaka
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGUS5njON2uBzUhh8RAuzmAJ9MQBTKU/99tTKnxRixX67KOMNQiACdG3VR
b5sEmIRAz8/M+wue/ZxZzcg=
=ogQj
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Service vs. Operation client APIs [was Re: [Axis2] SOAP header elements]

2007-05-20 Thread Samisa Abeysinghe
OK, I really do not want to criticize the client API here, specially 
given that it has been around for more than two years.


However, I have a problem when deciding whether to use the service 
client or operation client API for my implementation.
As an example, in operation client, I do not have an API to engage a 
module but with service client I can. However if I want to access the 
SOAP envelope or play around with SOAP level stuff, I have to use 
operation client. Now I am confused as to what I should be using. How 
should I go about making my decision? If you can point me to some docs 
that would be great.


Samisa...

Eran Chinthaka wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Samisa and all,

You have a very good point here, except that you started from the wrong
class. The complete API for the users to use is the OperationClient API.
But since most users, yes *most* user's concern is to send and receieve
XML fragment which is supported in ServiceClient API.

There are lots of things missing in ServiceClient. From the day one
ServiceClient API was meant to be the simple API for simple work. Most
of the users do not look at SOAP message. Especially because of J2EE
containers users even do not look at the XML fragment. That is why we
gave a convenient API on top of OperationClient.

If you want to look at the SOAP message or if you want to change the
engine or if you want to change MEP, then we consider that as an
advanced operation which require him to use OperationClient. One can
come-up with various use cases which seems simple to them and might
wonder why it is not included in ServiceClient. The simple answer is
Axis2 was there for a long time, more than 2 years and ServiceClient
must have been there at least for 2 years, but we found out that users
are satisfied with the existing way of only dealing with OMElement in
and OMElement out.

Again I totally agree with you that users need to face extra bit of
hassle when they want to add little bit more to what they are using with
ServiceClient, but that is intentional.

Thanks,
Chinthaka

Samisa Abeysinghe wrote:
 


Deepal Jayasinghe wrote:
   




 


Hi Jack ,
If this is in the server side , you can get the message context and
from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side  , the the process is ,
- First you get the last operation context from the service client
- and then follow the above steps.
 
   

 
That looks like too much work for me to get a simple thing done  :(

Why not have some method like:
getLastResponseSoapEnvelope()
to service client API and do all the context access stuff within that
method ?
   




Idea is cool  I am +1 on doing that , but ...
 


One of the design goal of service client was to provide a convenient
API  for  simple usage (cater for average users), and the assumption was
that user only trying to send  OM element and trying to get OM element .
If you need to do advanced work like accessing SOAP headers  , then you
can use OperationClient.
 


OK, cool, I forgot about operation client. However, there still remains
a minor concern about the usability/maintainability of the stuff. This
case is an ideal example - the use writes some code, and gets it working
- now wants to do more with the API, and he/she has to switch from one
API to the other to get the things done :(

Samisa...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGUQifjON2uBzUhh8RAl3SAJ4uCtbs4pElSKfbr1eOQtvSoExRhgCfb438
2aPufLx7Sthf8JSgzpf3joQ=
=6WJN
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] SOAP header elements

2007-05-20 Thread keith chapman

Hi jack,

U can use the following once you have the SOAPEnvelop to get the header
block.

SOAPHeader header = envelope.getHeader();

Once you get that you can get the specific header you want by using
header.getHeaderBlocksWithNSURI();

or get all the headers and iterate through them using
header.getChildren();

Once you have the header block you can drill down to the xmlBeans class.

Thanks,
Keith.


On 5/21/07, Jack Sprat <[EMAIL PROTECTED]> wrote:


OK.  I was able to get the header elements using the getChildElements()
method and iterating.

But the XMLBenas question remains.  How do I get at the class created by
XMLBeans for these 2 header elements?

Thanks,
T


*Jack Sprat <[EMAIL PROTECTED]>* wrote:

Deepal,

Thanks for the reply.
Yes, this is server side.  I can get the SOAPEnvelope but then how do I
get the contents of the elements themselves?  In this case it is a user and
password element.  The Axis2 JavaDocs have a return value of
org.apache.axiom.soap.SOAPEnvelope for the getEnvelope() method but I
don't have any docs for that type.

Also, does the class created by XMLBeans for the user and password
elements come into play at all?  I was expecting to be able to pull in those
classes created by XMLBeans for these 2 elements.

Thanks,
T


*Deepal Jayasinghe <[EMAIL PROTECTED]>* wrote:

Hi Jack ,
If this is in the server side , you can get the message context and from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side , the the process is ,
- First you get the last operation context from the service client
- and then follow the above steps.

Thanks
Deepal
> Can anyone answer this question? I thought this would be fairly
> common but I've not seen any tutorials or anything like that.
> Any help is appreciated.
>
> Thanks.
> T
>
>
> */Jack Sprat /* wrote:
>
> I am using Axis 1.2 with XML Beans and need to get the user and
> password SOAP header elements. I've set up an Axis2 handler and
> it is being called properly.
> My question is how exactly do I get the to the SOAP header elements?
>
> Thanks.
> T
>


Shape Yahoo! in your own image. Join our Network Research Panel today!
http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7hot
 CTA = Join our Network Research Panel


--
Pinpoint customers
who
are looking for what you sell.





--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


Re: [Axis2] SOAP header elements

2007-05-20 Thread Eran Chinthaka
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Samisa and all,

You have a very good point here, except that you started from the wrong
class. The complete API for the users to use is the OperationClient API.
But since most users, yes *most* user's concern is to send and receieve
XML fragment which is supported in ServiceClient API.

There are lots of things missing in ServiceClient. From the day one
ServiceClient API was meant to be the simple API for simple work. Most
of the users do not look at SOAP message. Especially because of J2EE
containers users even do not look at the XML fragment. That is why we
gave a convenient API on top of OperationClient.

If you want to look at the SOAP message or if you want to change the
engine or if you want to change MEP, then we consider that as an
advanced operation which require him to use OperationClient. One can
come-up with various use cases which seems simple to them and might
wonder why it is not included in ServiceClient. The simple answer is
Axis2 was there for a long time, more than 2 years and ServiceClient
must have been there at least for 2 years, but we found out that users
are satisfied with the existing way of only dealing with OMElement in
and OMElement out.

Again I totally agree with you that users need to face extra bit of
hassle when they want to add little bit more to what they are using with
ServiceClient, but that is intentional.

Thanks,
Chinthaka

Samisa Abeysinghe wrote:
> 
>>> Deepal Jayasinghe wrote:
>>  
>>
> Hi Jack ,
> If this is in the server side , you can get the message context and
> from
> that you can get the SOAP envelope and from the soap envelope you can
> get the soap headers.
>
> If it is the in the client side  , the the process is ,
>  - First you get the last operation context from the service client
>  - and then follow the above steps.
>   
>>>   
>>> That looks like too much work for me to get a simple thing done  :(
>>> Why not have some method like:
>>> getLastResponseSoapEnvelope()
>>> to service client API and do all the context access stuff within that
>>> method ?
>>  
>>
>> Idea is cool  I am +1 on doing that , but ...
> 
>> One of the design goal of service client was to provide a convenient
>> API  for  simple usage (cater for average users), and the assumption was
>> that user only trying to send  OM element and trying to get OM element .
>> If you need to do advanced work like accessing SOAP headers  , then you
>> can use OperationClient.
> 
> OK, cool, I forgot about operation client. However, there still remains
> a minor concern about the usability/maintainability of the stuff. This
> case is an ideal example - the use writes some code, and gets it working
> - now wants to do more with the API, and he/she has to switch from one
> API to the other to get the things done :(
> 
> Samisa...
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGUQifjON2uBzUhh8RAl3SAJ4uCtbs4pElSKfbr1eOQtvSoExRhgCfb438
2aPufLx7Sthf8JSgzpf3joQ=
=6WJN
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] SOAP header elements

2007-05-20 Thread Jack Sprat
OK.  I was able to get the header elements using the getChildElements() method 
and iterating.

But the XMLBenas question remains.  How do I get at the class created by 
XMLBeans for these 2 header elements?

Thanks,
T


Jack Sprat <[EMAIL PROTECTED]> wrote: Deepal,

Thanks for the reply.
Yes, this is server side.  I can get the SOAPEnvelope but then how do I get the 
contents of the elements themselves?  In this case it is a user and password 
element.  The Axis2 JavaDocs have a return value of 
org.apache.axiom.soap.SOAPEnvelope for the getEnvelope() method but I don't 
have any docs for that type.

Also, does the class created by XMLBeans for the user and password elements 
come into play at all?  I was expecting to be able to pull in those classes 
created by XMLBeans for these 2  elements.

Thanks,
T


Deepal Jayasinghe <[EMAIL PROTECTED]> wrote: Hi Jack ,
If this is in the server side , you can get the message context and from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side  , the the process is ,
 - First you get the last operation context from the service client
 - and then follow the above steps.

Thanks
Deepal
> Can anyone answer this question?  I thought this would be fairly
> common but I've not seen any tutorials or anything like that.
> Any help is appreciated.
>
> Thanks.
> T
>
>
> */Jack Sprat /* wrote:
>
> I am using Axis 1.2 with XML Beans and need to get the user and
> password  SOAP header elements.  I've set up an Axis2 handler and
> it is being called properly.
> My question is how exactly do I get the to the SOAP header elements?
>
> Thanks.
> T
>

Shape Yahoo! in your own image.   Join our Network Research Panel 
today!  
http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
   hot CTA = Join our Network Research Panel


   
-
Pinpoint customers who are looking for what you sell. 

Re: [Axis2] SOAP header elements

2007-05-20 Thread Samisa Abeysinghe



Deepal Jayasinghe wrote:
 


Hi Jack ,
If this is in the server side , you can get the message context and from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side  , the the process is ,
 - First you get the last operation context from the service client
 - and then follow the above steps.
  
   

That looks like too much work for me to get a simple thing done  :( 
Why not have some method like:

getLastResponseSoapEnvelope()
to service client API and do all the context access stuff within that
method ?
 


Idea is cool  I am +1 on doing that , but ...


One of the design goal of service client was to provide a convenient 
API  for  simple usage (cater for average users), and the assumption was

that user only trying to send  OM element and trying to get OM element .
If you need to do advanced work like accessing SOAP headers  , then you
can use OperationClient.


OK, cool, I forgot about operation client. However, there still remains a minor 
concern about the usability/maintainability of the stuff. This case is an ideal 
example - the use writes some code, and gets it working - now wants to do more 
with the API, and he/she has to switch from one API to the other to get the 
things done :(

Samisa...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] SOAP header elements

2007-05-19 Thread Jack Sprat
Deepal,

Thanks for the reply.
Yes, this is server side.  I can get the SOAPEnvelope but then how do I get the 
contents of the elements themselves?  In this case it is a user and password 
element.  The Axis2 JavaDocs have a return value of 
org.apache.axiom.soap.SOAPEnvelope for the getEnvelope() method but I don't 
have any docs for that type.

Also, does the class created by XMLBeans for the user and password elements 
come into play at all?  I was expecting to be able to pull in those classes 
created by XMLBeans for these 2 elements.

Thanks,
T


Deepal Jayasinghe <[EMAIL PROTECTED]> wrote: Hi Jack ,
If this is in the server side , you can get the message context and from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side  , the the process is ,
 - First you get the last operation context from the service client
 - and then follow the above steps.

Thanks
Deepal
> Can anyone answer this question?  I thought this would be fairly
> common but I've not seen any tutorials or anything like that.
> Any help is appreciated.
>
> Thanks.
> T
>
>
> */Jack Sprat /* wrote:
>
> I am using Axis 1.2 with XML Beans and need to get the user and
> password SOAP header elements.  I've set up an Axis2 handler and
> it is being called properly.
> My question is how exactly do I get the to the SOAP header elements?
>
> Thanks.
> T
>


   Shape Yahoo! in your own image.  Join our Network Research Panel 
today!http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
 hot CTA = Join our Network Research Panel

Re: [Axis2] SOAP header elements

2007-05-18 Thread Deepal Jayasinghe

> Deepal Jayasinghe wrote:
>> Hi Jack ,
>> If this is in the server side , you can get the message context and from
>> that you can get the SOAP envelope and from the soap envelope you can
>> get the soap headers.
>>
>> If it is the in the client side  , the the process is ,
>>  - First you get the last operation context from the service client
>>  - and then follow the above steps.
>>   
> That looks like too much work for me to get a simple thing done :(
> Why not have some method like:
> getLastResponseSoapEnvelope()
> to service client API and do all the context access stuff within that
> method ?
Idea is cool  I am +1 on doing that , but ...

One of the design goal of service client was to provide a convenient 
API  for  simple usage (cater for average users), and the assumption was
that user only trying to send  OM element and trying to get OM element .
If you need to do advanced work like accessing SOAP headers  , then you
can use OperationClient.

Deepal


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] SOAP header elements

2007-05-18 Thread Samisa Abeysinghe

Deepal Jayasinghe wrote:

Hi Jack ,
If this is in the server side , you can get the message context and from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side  , the the process is ,
 - First you get the last operation context from the service client
 - and then follow the above steps.
  

That looks like too much work for me to get a simple thing done :(
Why not have some method like:
getLastResponseSoapEnvelope()
to service client API and do all the context access stuff within that 
method ?


Samisa...

Thanks
Deepal
  

Can anyone answer this question?  I thought this would be fairly
common but I've not seen any tutorials or anything like that.
Any help is appreciated.

Thanks.
T


*/Jack Sprat <[EMAIL PROTECTED]>/* wrote:

I am using Axis 1.2 with XML Beans and need to get the user and
password SOAP header elements.  I've set up an Axis2 handler and
it is being called properly.
My question is how exactly do I get the to the SOAP header elements?

Thanks.
T




No need to miss a message. Get email on-the-go

with Yahoo! Mail for Mobile. Get started.
 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



--
Samisa Abeysinghe : http://www.bloglines.com/blog/samisa


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] SOAP header elements

2007-05-17 Thread Deepal Jayasinghe
Hi Jack ,
If this is in the server side , you can get the message context and from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side  , the the process is ,
 - First you get the last operation context from the service client
 - and then follow the above steps.

Thanks
Deepal
> Can anyone answer this question?  I thought this would be fairly
> common but I've not seen any tutorials or anything like that.
> Any help is appreciated.
>
> Thanks.
> T
>
>
> */Jack Sprat <[EMAIL PROTECTED]>/* wrote:
>
> I am using Axis 1.2 with XML Beans and need to get the user and
> password SOAP header elements.  I've set up an Axis2 handler and
> it is being called properly.
> My question is how exactly do I get the to the SOAP header elements?
>
> Thanks.
> T
>
>
>
> 
> No need to miss a message. Get email on-the-go
> 
> with Yahoo! Mail for Mobile. Get started.
>  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] SOAP header elements

2007-05-17 Thread robert lazarski

That's correct, just don't link to .93 code ;-) .

The OP indicated that he wants to get the header in a handle I think. In
that case, the message context is already set. See MessageContext.IN_FLOWand
MessageContext.OUT_FLOW to know whether its a request or a response. See
org/apache/axis2/handlers/soapmonitor/SOAPMonitorHandler.java for an example
of all this. Of course at the handler level this is all independent of the
databinding method used.

HTH,
Robert

On 5/17/07, Glen Mazza <[EMAIL PROTECTED]> wrote:


I think I can partly help you.  I'm assuming you used wsdl2java to
create your service.  At least in my case, this created these two
classes (among others):

(A) MyServiceMessageReceiverInOut.java
and
(B) MyServiceSkeleton.java

Class (A), in its function invokeBusinessLogic(msgContext,
newMegContext), determines the service in Class (B) to call.

To get to the SOAPHeader[1], I believe you just need to call:
msgContext.getEnvelope().getHeader() within this method.

Let us know if this works for you. (For my code above, I used ADB
databinding so the code may be different for you.)

Glen

[1]
http://ws.apache.org/axis2/0_93/api/org/apache/axis2/soap/SOAPHeader.html


Am Donnerstag, den 17.05.2007, 17:35 -0700 schrieb Jack Sprat:
> Can anyone answer this question?  I thought this would be fairly
> common but I've not seen any tutorials or anything like that.
> Any help is appreciated.
>
> Thanks.
> T
>
>
> Jack Sprat <[EMAIL PROTECTED]> wrote:
> I am using Axis 1.2 with XML Beans and need to get the user
> and password SOAP header elements.  I've set up an Axis2
> handler and it is being called properly.
> My question is how exactly do I get the to the SOAP header
> elements?
>
> Thanks.
> T
>
>
>
>
>
>
>
> __
> No need to miss a message. Get email on-the-go
> with Yahoo! Mail for Mobile. Get started.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [Axis2] SOAP header elements

2007-05-17 Thread Glen Mazza
I think I can partly help you.  I'm assuming you used wsdl2java to
create your service.  At least in my case, this created these two
classes (among others):

(A) MyServiceMessageReceiverInOut.java
and
(B) MyServiceSkeleton.java

Class (A), in its function invokeBusinessLogic(msgContext,
newMegContext), determines the service in Class (B) to call.

To get to the SOAPHeader[1], I believe you just need to call:
msgContext.getEnvelope().getHeader() within this method.

Let us know if this works for you. (For my code above, I used ADB
databinding so the code may be different for you.)

Glen

[1]
http://ws.apache.org/axis2/0_93/api/org/apache/axis2/soap/SOAPHeader.html


Am Donnerstag, den 17.05.2007, 17:35 -0700 schrieb Jack Sprat:
> Can anyone answer this question?  I thought this would be fairly
> common but I've not seen any tutorials or anything like that.
> Any help is appreciated.
> 
> Thanks.
> T
> 
> 
> Jack Sprat <[EMAIL PROTECTED]> wrote:
> I am using Axis 1.2 with XML Beans and need to get the user
> and password SOAP header elements.  I've set up an Axis2
> handler and it is being called properly.
> My question is how exactly do I get the to the SOAP header
> elements?
> 
> Thanks.
> T
> 
> 
> 
> 
> 
> 
> 
> __
> No need to miss a message. Get email on-the-go 
> with Yahoo! Mail for Mobile. Get started.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] SOAP header elements

2007-05-17 Thread Jack Sprat
Can anyone answer this question?  I thought this would be fairly common but 
I've not seen any tutorials or anything like that.
Any help is appreciated.

Thanks.
T


Jack Sprat <[EMAIL PROTECTED]> wrote: I am using Axis 1.2 with XML Beans and 
need to get the user and password SOAP header elements.  I've set up an Axis2 
handler and it is being called properly.
My question is how exactly do I get the to the SOAP header elements?

Thanks.
T





 
-
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.

[Axis2] SOAP header elements

2007-05-17 Thread Jack Sprat
I am using Axis 1.2 with XML Beans and need to get the user and password SOAP 
header elements.  I've set up a handler and it is being called properly.
My question is how exactly do I get the to the SOAP header elements?

Thanks.
T

   
-
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.