Re: [AXIS2] SOAP Header problem

2007-10-29 Thread Amila Suriarachchi
I have fixed this locally will commit soon.

On 10/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi again,
>
> I have verified it to be a question solely about the attribute in the
> SOAP Header block.
> I have generated and executed a SOAP request through AXIS2. I have
> copied the generated SOAP message and executed it again (SoapUI) this
> time with the only difference that I manually inserted the missing
> attribute.
> And this works.
>
> So - how do I force AXIS2 to accept the attribute I set on an Java
> object representing the SOAP header block?
>
> BR
> Morten
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 25. oktober 2007 13:38
> To: axis-user@ws.apache.org
> Subject: RE: [AXIS2] SOAP Header problem
>
> Thanks for the answer.
>
> In my case I have no problem in reaching the correct service deployed.
> The problem is, that the server-side will validate the incomming XML
> document (SOAP message) and this validation fails because my generated
> SOAP Header Block is not correct according to the XSD defining the
> Header Block.
>
> So I do not think the soapAction is a problem in this case.
>
> I somehow need to force AXIS2 to use my attribute settings (Java part)
> for generating the correct SOAP Header Block.
>
> BR
> Morten
>
>
> -Original Message-----
> From: Jon Hanshew [mailto:[EMAIL PROTECTED]
> Sent: 24. oktober 2007 20:45
> To: axis-user@ws.apache.org
> Subject: Re: [AXIS2] SOAP Header problem
>
>
> The first thing that I see is that "soapAction" is null ("").
>
> It needs to match your service call.  The Axis2 stub code generated by
> wsdl2java does a "setAction" call that uses the wsdl value of soapAction
> to identify the function to call on the service.
>
> Hope this helps.
>
>
> morten.frank wrote:
> >
> > Hi,
> >
> > I am currently evaluating different WS technologies to be used in a
> > client side Java environment.
> >
> > The deal is, that we have a number of WSDL docs and they refer several
>
> > XSD schemas for describing service input/output and data types etc.
> >
> > My problem is, that somehow I can't get AXIS2 to generate the correct
> > SOAP header block according to our WSDL and XSD definitions.
> >
> > Example:
> >
> > A WSDL document defines the binding:
> >> type="tns:HelloWorldService">
> >> transport="http://schemas.xmlsoap.org/soap/http"/>
> >   
> >   
> >   
> >   
> >> message="common:MetadataMessage" part="metadata" use="literal"/>
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >
> > The thing to note is the  > part="metadata" use="literal"/> part.
> >
> > The Common.wsdl is imported in the above WSDL and is defined as:
> >   > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> > xmlns:tns="http://common.ntpsoa.nordea.com/common/wsdl/v1";
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > xmlns:md="http://metadata.ntpsoa.nordea.com/object";
> > xmlns:err="http://error.ntpsoa.nordea.com/object/v1"; name="CommonWSDL"
> > targetNamespace="http://common.ntpsoa.nordea.com/common/wsdl/v1";>
> >   
> >   
> >> namespace="http://metadata.ntpsoa.nordea.com/object";
> > schemaLocation="../xsd/Metadata.xsd"/>
> >> namespace="http://error.ntpsoa.nordea.com/object/v1";
> > schemaLocation="../xsd/Error.xsd"/>
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> > 
> >
> > In the Metadata.xsd the following part is defined:
> >  > use="required">
> >
> >
> > I have run the WSDL file through the wsdl2java to generate the client
> > stub.
> > I have tried with ADT and XMLBeans as binding mechanism, both give the
>
> > same result: In both cases I get an Ja

RE: [AXIS2] SOAP Header problem

2007-10-26 Thread morten.frank
Hi again,

I have verified it to be a question solely about the attribute in the
SOAP Header block.
I have generated and executed a SOAP request through AXIS2. I have
copied the generated SOAP message and executed it again (SoapUI) this
time with the only difference that I manually inserted the missing
attribute.
And this works.

So - how do I force AXIS2 to accept the attribute I set on an Java
object representing the SOAP header block?

BR
Morten
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 25. oktober 2007 13:38
To: axis-user@ws.apache.org
Subject: RE: [AXIS2] SOAP Header problem

Thanks for the answer.

In my case I have no problem in reaching the correct service deployed.
The problem is, that the server-side will validate the incomming XML
document (SOAP message) and this validation fails because my generated
SOAP Header Block is not correct according to the XSD defining the
Header Block.

So I do not think the soapAction is a problem in this case.

I somehow need to force AXIS2 to use my attribute settings (Java part)
for generating the correct SOAP Header Block.

BR
Morten
 

-Original Message-
From: Jon Hanshew [mailto:[EMAIL PROTECTED]
Sent: 24. oktober 2007 20:45
To: axis-user@ws.apache.org
Subject: Re: [AXIS2] SOAP Header problem


The first thing that I see is that "soapAction" is null ("").

It needs to match your service call.  The Axis2 stub code generated by
wsdl2java does a "setAction" call that uses the wsdl value of soapAction
to identify the function to call on the service.

Hope this helps.
 

morten.frank wrote:
> 
> Hi,
> 
> I am currently evaluating different WS technologies to be used in a 
> client side Java environment.
> 
> The deal is, that we have a number of WSDL docs and they refer several

> XSD schemas for describing service input/output and data types etc.
> 
> My problem is, that somehow I can't get AXIS2 to generate the correct 
> SOAP header block according to our WSDL and XSD definitions.
> 
> Example:
> 
> A WSDL document defines the binding:
>type="tns:HelloWorldService">
>transport="http://schemas.xmlsoap.org/soap/http"/>
>   
>   
>   
>   
>message="common:MetadataMessage" part="metadata" use="literal"/>
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
> The thing to note is the  part="metadata" use="literal"/> part.
> 
> The Common.wsdl is imported in the above WSDL and is defined as:
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:tns="http://common.ntpsoa.nordea.com/common/wsdl/v1";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:md="http://metadata.ntpsoa.nordea.com/object";
> xmlns:err="http://error.ntpsoa.nordea.com/object/v1"; name="CommonWSDL"
> targetNamespace="http://common.ntpsoa.nordea.com/common/wsdl/v1";>
>   
>   
>namespace="http://metadata.ntpsoa.nordea.com/object";
> schemaLocation="../xsd/Metadata.xsd"/>
>namespace="http://error.ntpsoa.nordea.com/object/v1";
> schemaLocation="../xsd/Error.xsd"/>
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> In the Metadata.xsd the following part is defined:
>  use="required">
> 
> 
> I have run the WSDL file through the wsdl2java to generate the client 
> stub.
> I have tried with ADT and XMLBeans as binding mechanism, both give the

> same result: In both cases I get an Java class representing the 
> Metadata. In both cases I am able to set the Java attributes for the 
> elements and attributes of the underlying XML document, including the 
> "schemaVersion".
> 
> Using XMLBeans I have tried to dump the headerblock generated by 
> XMLBeans. The result is:
>  xmlns:obj="http://metadata.ntpsoa.nordea.com/object";>
>   N231820
>   SE
>   String
>   String
>  
> 2007-10-22T15:29:55.625+02:00 am
> p>
>   String
>   false
> 
> 
> Note, that "schemaVersion" is set correctly at this point.
> 
> But in both cases, the actual SOAP message looks like:
> 
>   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

RE: [AXIS2] SOAP Header problem

2007-10-25 Thread morten.frank
Thanks for the answer.

In my case I have no problem in reaching the correct service deployed.
The problem is, that the server-side will validate the incomming XML
document (SOAP message) and this validation fails because my generated
SOAP Header Block is not correct according to the XSD defining the
Header Block.

So I do not think the soapAction is a problem in this case.

I somehow need to force AXIS2 to use my attribute settings (Java part)
for generating the correct SOAP Header Block.

BR
Morten
 

-Original Message-
From: Jon Hanshew [mailto:[EMAIL PROTECTED] 
Sent: 24. oktober 2007 20:45
To: axis-user@ws.apache.org
Subject: Re: [AXIS2] SOAP Header problem


The first thing that I see is that "soapAction" is null ("").

It needs to match your service call.  The Axis2 stub code generated by
wsdl2java does a "setAction" call that uses the wsdl value of soapAction
to identify the function to call on the service.

Hope this helps.
 

morten.frank wrote:
> 
> Hi,
> 
> I am currently evaluating different WS technologies to be used in a 
> client side Java environment.
> 
> The deal is, that we have a number of WSDL docs and they refer several

> XSD schemas for describing service input/output and data types etc.
> 
> My problem is, that somehow I can't get AXIS2 to generate the correct 
> SOAP header block according to our WSDL and XSD definitions.
> 
> Example:
> 
> A WSDL document defines the binding:
>type="tns:HelloWorldService">
>transport="http://schemas.xmlsoap.org/soap/http"/>
>   
>   
>   
>   
>message="common:MetadataMessage" part="metadata" use="literal"/>
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
> The thing to note is the  part="metadata" use="literal"/> part.
> 
> The Common.wsdl is imported in the above WSDL and is defined as:
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:tns="http://common.ntpsoa.nordea.com/common/wsdl/v1";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:md="http://metadata.ntpsoa.nordea.com/object";
> xmlns:err="http://error.ntpsoa.nordea.com/object/v1"; name="CommonWSDL"
> targetNamespace="http://common.ntpsoa.nordea.com/common/wsdl/v1";>
>   
>   
>namespace="http://metadata.ntpsoa.nordea.com/object";
> schemaLocation="../xsd/Metadata.xsd"/>
>namespace="http://error.ntpsoa.nordea.com/object/v1";
> schemaLocation="../xsd/Error.xsd"/>
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> In the Metadata.xsd the following part is defined:
>  use="required">
> 
> 
> I have run the WSDL file through the wsdl2java to generate the client 
> stub.
> I have tried with ADT and XMLBeans as binding mechanism, both give the

> same result: In both cases I get an Java class representing the 
> Metadata. In both cases I am able to set the Java attributes for the 
> elements and attributes of the underlying XML document, including the 
> "schemaVersion".
> 
> Using XMLBeans I have tried to dump the headerblock generated by 
> XMLBeans. The result is:
>  xmlns:obj="http://metadata.ntpsoa.nordea.com/object";>
>   N231820
>   SE
>   String
>   String
>  
> 2007-10-22T15:29:55.625+02:00 am
> p>
>   String
>   false
> 
> 
> Note, that "schemaVersion" is set correctly at this point.
> 
> But in both cases, the actual SOAP message looks like:
> 
>   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>   
>xmlns="http://metadata.ntpsoa.nordea.com/object";
> soapenv:mustUnderstand="0">
>   N231820
>   SE
>   String
>   String
>   
> 2007-10-22T15:29:55.625+02:00
>   String
>   false
>   
>   
>   
>xmlns="http://helloworld.ntpref.nordea.com/object/v1";>
>   
>   Mjallo
>   
>

Re: [AXIS2] SOAP Header problem

2007-10-24 Thread Jon Hanshew

The first thing that I see is that "soapAction" is null ("").

It needs to match your service call.  The Axis2 stub code generated by
wsdl2java does a "setAction" call that uses the wsdl value of soapAction to
identify the function to call on the service.

Hope this helps.
 

morten.frank wrote:
> 
> Hi,
> 
> I am currently evaluating different WS technologies to be used in a
> client side Java environment.
> 
> The deal is, that we have a number of WSDL docs and they refer several
> XSD schemas for describing service input/output and data types etc.
> 
> My problem is, that somehow I can't get AXIS2 to generate the correct
> SOAP header block according to our WSDL and XSD definitions.
> 
> Example:
> 
> A WSDL document defines the binding:
>type="tns:HelloWorldService">
>transport="http://schemas.xmlsoap.org/soap/http"/>
>   
>   
>   
>   
>message="common:MetadataMessage" part="metadata" use="literal"/>
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
> The thing to note is the  part="metadata" use="literal"/> part.
> 
> The Common.wsdl is imported in the above WSDL and is defined as:
> 
> http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:tns="http://common.ntpsoa.nordea.com/common/wsdl/v1";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:md="http://metadata.ntpsoa.nordea.com/object";
> xmlns:err="http://error.ntpsoa.nordea.com/object/v1"; name="CommonWSDL"
> targetNamespace="http://common.ntpsoa.nordea.com/common/wsdl/v1";>
>   
>   
>namespace="http://metadata.ntpsoa.nordea.com/object";
> schemaLocation="../xsd/Metadata.xsd"/>
>namespace="http://error.ntpsoa.nordea.com/object/v1";
> schemaLocation="../xsd/Error.xsd"/>
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> In the Metadata.xsd the following part is defined:
>  use="required">
> 
> 
> I have run the WSDL file through the wsdl2java to generate the client
> stub.
> I have tried with ADT and XMLBeans as binding mechanism, both give the
> same result: In both cases I get an Java class representing the
> Metadata. In both cases I am able to set the Java attributes for the
> elements and attributes of the underlying XML document, including the
> "schemaVersion".
> 
> Using XMLBeans I have tried to dump the headerblock generated by
> XMLBeans. The result is:
>  xmlns:obj="http://metadata.ntpsoa.nordea.com/object";>
>   N231820
>   SE
>   String
>   String
>  
> 2007-10-22T15:29:55.625+02:00 p>
>   String
>   false
> 
> 
> Note, that "schemaVersion" is set correctly at this point.
> 
> But in both cases, the actual SOAP message looks like:
> 
> 
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>   
>xmlns="http://metadata.ntpsoa.nordea.com/object";
> soapenv:mustUnderstand="0">
>   N231820
>   SE
>   String
>   String
>   
> 2007-10-22T15:29:55.625+02:00
>   String
>   false
>   
>   
>   
>xmlns="http://helloworld.ntpref.nordea.com/object/v1";>
>   
>   Mjallo
>   
>   
>   
> 
> 
> It seems like the stub overwrites the generated SOAP header block.
> The elements of the XML document are correct, but the attribute
> "schemaVersion" has been removed and instead the meteadata element
> receives the mustUnderstand attribute.
> 
> What goes wrong here...?
> 
> Regards
> Morten
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-AXIS2--SOAP-Header-problem-tf4683305.html#a13389437
Sent from the Axis - User mailing list archive at Nabble.com.


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



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/


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.

Re: [AXIS2] soap header

2006-07-31 Thread Paul Fremantle

Chinthaka

Sounds like a great idea.

Paul

On 7/31/06, Eran Chinthaka <[EMAIL PROTECTED]> wrote:

David Illsley wrote:
> Fabien,
> If you want access to the SOAPHeader, you can get it through the
> MessageContext. You can get this by adding the following method to
> your skeleton (I think this works for all MessageReceivers):
>

No it doesn't happen for all the message receivers. I think the code gen
templates should be modified to implement the Service interface by the
skeleton and the generated message receiver to invoke the
setOperationContext method.

What do others think about this?

(If agreed I'd like to implement this as an exercise to get in to code
gen module :) )

-- Chinthaka







--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com

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



Re: [AXIS2] soap header

2006-07-31 Thread Davanum Srinivas

+1 from me Eran

-- dims

On 7/31/06, Eran Chinthaka <[EMAIL PROTECTED]> wrote:

David Illsley wrote:
> Fabien,
> If you want access to the SOAPHeader, you can get it through the
> MessageContext. You can get this by adding the following method to
> your skeleton (I think this works for all MessageReceivers):
>

No it doesn't happen for all the message receivers. I think the code gen
templates should be modified to implement the Service interface by the
skeleton and the generated message receiver to invoke the
setOperationContext method.

What do others think about this?

(If agreed I'd like to implement this as an exercise to get in to code
gen module :) )

-- Chinthaka







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

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



Re: [AXIS2] soap header

2006-07-31 Thread Paul Fremantle

Oh thanks David and Chinthaka I'd missed that.

Paul

On 7/31/06, Eran Chinthaka <[EMAIL PROTECTED]> wrote:

Paul Fremantle wrote:
> Fabien
>
> If you write your own message receiver then you can get this info, as
> you are passed the MessageContext. From there you can navigate to the
> headers.

One more addition. If you use any of the in-built message receiver, then
again you will have access to the message context.

-- Chinthaka







--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com

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



Re: [AXIS2] soap header

2006-07-31 Thread Eran Chinthaka
David Illsley wrote:
> Fabien,
> If you want access to the SOAPHeader, you can get it through the
> MessageContext. You can get this by adding the following method to
> your skeleton (I think this works for all MessageReceivers):
> 

No it doesn't happen for all the message receivers. I think the code gen
templates should be modified to implement the Service interface by the
skeleton and the generated message receiver to invoke the
setOperationContext method.

What do others think about this?

(If agreed I'd like to implement this as an exercise to get in to code
gen module :) )

-- Chinthaka



signature.asc
Description: OpenPGP digital signature


Re: [AXIS2] soap header

2006-07-31 Thread Eran Chinthaka
Paul Fremantle wrote:
> Fabien
> 
> If you write your own message receiver then you can get this info, as
> you are passed the MessageContext. From there you can navigate to the
> headers.

One more addition. If you use any of the in-built message receiver, then
again you will have access to the message context.

-- Chinthaka



signature.asc
Description: OpenPGP digital signature


Re: [AXIS2] soap header

2006-07-31 Thread David Illsley

Fabien,
If you want access to the SOAPHeader, you can get it through the
MessageContext. You can get this by adding the following method to
your skeleton (I think this works for all MessageReceivers):

...
   OperationContext _oc;
   public void setOperationContext(OperationContext oc){
   _oc = oc;
   }
...

and then when invoked get the MessageContext using:

MessageContext mc =_oc.getMessageContext("In");

and then get the SOAPEnvelope from mc.

If you are trying to get a WS-Addressing reference parameter (and are
using WS-Addressing 2005/08) you can just call:
_oc.getMessageContext("In").getTo().getAllReferenceParameters().get(qnameOfReferenceParameter);


David

On 31/07/06, Fabien Couble <[EMAIL PROTECTED]> wrote:




Hi all,
I'd like to know if it is possible to have access  to the SOAP  header in the 
implementation of the service (skeleton).  Actually, I'd like to get some 
information.
If it is not possible, I suppose I have to get this  information in a module!!?

Thx
Fabien
This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.






--
David Illsley - IBM Web Services Development

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



Re: [AXIS2] soap header

2006-07-31 Thread Paul Fremantle
FabienIf you write your own message receiver then you can get this info, as you are passed the MessageContext. From there you can navigate to the headers. In a codegen skeleton I don't think you can (maybe I missed it). You could also modify the generated MessageReceiver to set it onto the object, but you'd have to be careful to not regenerate.
PaulOn 7/31/06, Fabien Couble <[EMAIL PROTECTED]> wrote:







Hi all,
I'd like to know if it is possible to have access 
to the SOAP  header in the implementation of the service (skeleton). 
Actually, I'd like to get some information. 
If it is not possible, I suppose I have to get this 
information in a module!!?
 
Thx 
Fabien

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.



-- Paul FremantleVP/Technology, WSO2 and OASIS WS-RX TC Co-chairhttp://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]"Oxygenating the Web Service Platform", www.wso2.com