RE: Apache Axis 2: how to get header? Options

2007-04-25 Thread Krishnamoorthy J (HCL Financial Services)
From: Shaoguang Cong [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 9:40 PM To: axis-user@ws.apache.org Subject: Re: Apache Axis 2: how to get header? Options In the generated Stub class, do a search for the method "fromOM" - you'll get the idea on how to get your UserInfo o

Re: Apache Axis 2: how to get header? Options

2007-04-24 Thread Shaoguang Cong
In the generated Stub class, do a search for the method "fromOM" - you'll get the idea on how to get your UserInfo object from the OMElement (getHeader().getFirstChildWithName(QName of "UserInfo") ). craig wickesser <[EMAIL PROTECTED]> wrote: so far I haven't found the "parse" method. On

Re: Apache Axis 2: how to get header? Options

2007-04-24 Thread craig wickesser
so far I haven't found the "parse" method. On 4/23/07, craig wickesser <[EMAIL PROTECTED]> wrote: which class should have parse method? On 4/23/07, Davanum Srinivas <[EMAIL PROTECTED]> wrote: > > look for parse method in those classes. The parse method takes in a > XMLStreamReader. If you see

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread craig wickesser
which class should have parse method? On 4/23/07, Davanum Srinivas <[EMAIL PROTECTED]> wrote: look for parse method in those classes. The parse method takes in a XMLStreamReader. If you see it it means you are using ADB based code. Next step is to use the AXIOM API to get the OMElement correspo

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread Davanum Srinivas
look for parse method in those classes. The parse method takes in a XMLStreamReader. If you see it it means you are using ADB based code. Next step is to use the AXIOM API to get the OMElement corresponding to your UserInfo element in the soap header. basically call getChildren on the header and i

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread craig wickesser
there is UserInfoImpl and UserInfoDocumentImpl. On 4/23/07, craig wickesser <[EMAIL PROTECTED]> wrote: yes On 4/23/07, Davanum Srinivas <[EMAIL PROTECTED]> wrote: > > Was this UserInfo class generated by WSDL2Java/ADB? > > -- dims > > On 4/23/07, craig wickesser < [EMAIL PROTECTED]> wrote: > >

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread craig wickesser
yes On 4/23/07, Davanum Srinivas <[EMAIL PROTECTED]> wrote: Was this UserInfo class generated by WSDL2Java/ADB? -- dims On 4/23/07, craig wickesser <[EMAIL PROTECTED]> wrote: > Ok, I put code into my Stub class so I could get the _returnMessageContext. > Now that I have access to the > org.ap

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread Davanum Srinivas
Was this UserInfo class generated by WSDL2Java/ADB? -- dims On 4/23/07, craig wickesser <[EMAIL PROTECTED]> wrote: Ok, I put code into my Stub class so I could get the _returnMessageContext. Now that I have access to the org.apache.axiom.soap.SOAPHeader it gives me the XML, is there a way to ge

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread craig wickesser
Ok, I put code into my Stub class so I could get the _returnMessageContext. Now that I have access to the org.apache.axiom.soap.SOAPHeader it gives me the XML, is there a way to get the actual JavaBean objects based on the header(s)? For example if my header looks like...

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread José Antonio Sánchez
rviceClient.getServiceContext().setLastOperationContext(_operationClient.getOperationContext()); > > > > > > > > > > > > > > > > > > 4) Finally you can get the Response Header from stub > > > > > > > > > > > > Operat

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread Shaoguang Cong
> > > > > > > > > 4) Finally you can get the Response Header from stub > > > > > > > > > > > > OperationContext oprCtxt = > > > > stub._getServiceClient().getLastOperationContext(); > > > > > > MessageCo

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread Shaoguang Cong
Thank you. - Original Message - From: Shaoguang Cong To: axis-user@ws.apache.org Sent: Sunday, April 22, 2007 7:20 PM Subject: Re: Apache Axis 2: how to get header? Options I observed the same thing: MessageContext.getCurrentMessageContext() returns null. I don't

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread craig wickesser
> > > > > > > > > > > > _serviceClient.getServiceContext().setLastOperationContext(_operationClient.getOperationContext()); > > > > > > > > > > > > > > > > > > 4) Finally you can get the Response Header from stub > > > &g

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread Thilina Gunarathne
; > > > > > 4) Finally you can get the Response Header from stub > > > > > > > > > > OperationContext oprCtxt = > > > stub._getServiceClient().getLastOperationContext(); > > > > > MessageContext inMsgContext = > > > oprCtxt.getMessageContext

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread José Antonio Sánchez
MessageContext inMsgContext = > > oprCtxt.getMessageContext (WSDLConstants.MESSAGE_LABEL_IN_VALUE); > > > > SOAPHeader header = inMsgContext.getEnvelope().getHeader(); > > > > > > > > return > > Header_T.Factory.parse(header.getFir

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread Deepal Jayasinghe
etEnvelope().getHeader(); > > > > > > > > return > > Header_T.Factory.parse(header.getFirstElement > ().getXMLStreamReaderWithoutCaching()); > > > > > > > > Not sure if there is any easier way but fi

Re: Apache Axis 2: how to get header? Options

2007-04-23 Thread craig wickesser
xt.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); > > > SOAPHeader header = inMsgContext.getEnvelope().getHeader(); > > > > > > return > Header_T.Factory.parse(header.getFirstElement ().getXMLStreamReaderWithoutCaching()); > > > >

Re: Apache Axis 2: how to get header? Options

2007-04-22 Thread Thilina Gunarathne
this. > > > > > > Kamal Kang > > > > > > -Original Message- > > From: José Antonio Sánchez [mailto:[EMAIL PROTECTED] > > Sent: Thursday, April 19, 2007 3:56 PM > > To: axis-user@ws.apache.org > > Subject: Re: Apache Axis 2: how

Re: Apache Axis 2: how to get header? Options

2007-04-22 Thread Martin Gainty
007 7:20 PM Subject: Re: Apache Axis 2: how to get header? Options I observed the same thing: MessageContext.getCurrentMessageContext() returns null. I don't know what's the designer's intention with "CurrentMessageContex", maybe that's for asynchronical

Re: Apache Axis 2: how to get header? Options

2007-04-22 Thread Shaoguang Cong
I observed the same thing: MessageContext.getCurrentMessageContext() returns null. I don't know what's the designer's intention with "CurrentMessageContex", maybe that's for asynchronical calls. To get headers from the response, try MessageContext.getSoapEnvelope().getHeader(). I only

Re: Apache Axis 2: how to get header? Options

2007-04-21 Thread craig wickesser
yea so far I am not finding how to get headers from the response, am I missing something ? On 4/20/07, craig wickesser <[EMAIL PROTECTED]> wrote: Here is what it says at that link: *org.apache.axis2.transport.http.HTTPConstants.HTTP_HEADERS* You might sometimes want to send your own custom HT

Re: Apache Axis 2: how to get header? Options

2007-04-20 Thread craig wickesser
Here is what it says at that link: *org.apache.axis2.transport.http.HTTPConstants.HTTP_HEADERS* You might sometimes want to send your own custom HTTP headers. You can set an ArrayList filled with org.apache.commons.httpclient.Header objects using the above property. You must not try to overrid

Re: Apache Axis 2: how to get header? Options

2007-04-20 Thread robert lazarski
You'll need to work with MessageContext. Here's the reference for the properties you're looking for: http://wso2.org/library/230#HTTP_HEADERS HTH, Robert On 4/20/07, craig wickesser <[EMAIL PROTECTED]> wrote: client side On 4/20/07, robert lazarski <[EMAIL PROTECTED]> wrote: > > Client or se

Re: Apache Axis 2: how to get header? Options

2007-04-20 Thread craig wickesser
client side On 4/20/07, robert lazarski <[EMAIL PROTECTED]> wrote: Client or server side ? On 4/20/07, craig wickesser <[EMAIL PROTECTED]> wrote: > > any ideas? >

Re: Apache Axis 2: how to get header? Options

2007-04-20 Thread robert lazarski
Client or server side ? On 4/20/07, craig wickesser <[EMAIL PROTECTED]> wrote: any ideas?

Re: Apache Axis 2: how to get header? Options

2007-04-20 Thread craig wickesser
any ideas?

Re: Apache Axis 2: how to get header? Options

2007-04-19 Thread Amila Suriarachchi
> > > Kamal Kang > > > -Original Message- > From: José Antonio Sánchez [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 19, 2007 3:56 PM > To: axis-user@ws.apache.org > Subject: Re: Apache Axis 2: how to get header? Options > > AFAIK you have to modify t

Re: Apache Axis 2: how to get header? Options

2007-04-19 Thread craig wickesser
Starting with step one I tried to get the message context MyStub stub = new MyStub(); HelloWorldDocument reqDoc = HellWorldDocument.Factory.newInstance(); reqDoc.setName("bob"); HelloWorldResponseDocumnet resp = stub.SayHello(reqDoc); MessageContext mc = MessageContext.getCurrentMessageCont

Re: Apache Axis 2: how to get header? Options

2007-04-19 Thread Davanum Srinivas
iginal Message- From: José Antonio Sánchez [mailto:[EMAIL PROTECTED] Sent: Thursday, April 19, 2007 3:56 PM To: axis-user@ws.apache.org Subject: Re: Apache Axis 2: how to get header? Options AFAIK you have to modify the stub code and get headers from there. In Axis2 1.2 there is an operation

RE: Apache Axis 2: how to get header? Options

2007-04-19 Thread Kang, Kamaljeet K.
know if you need more help with this. Kamal Kang -Original Message- From: José Antonio Sánchez [mailto:[EMAIL PROTECTED] Sent: Thursday, April 19, 2007 3:56 PM To: axis-user@ws.apache.org Subject: Re: Apache Axis 2: how to get header? Options AFAIK you have to modify the stub code and

Re: Apache Axis 2: how to get header? Options

2007-04-19 Thread José Antonio Sánchez
AFAIK you have to modify the stub code and get headers from there. In Axis2 1.2 there is an operation in the generated stub to get the last operation context (and so the envelope object) but it didn't work for me. On 4/19/07, craig wickesser <[EMAIL PROTECTED]> wrote: anyone??? On 4/18/07, cra

Re: Apache Axis 2: how to get header? Options

2007-04-19 Thread craig wickesser
anyone??? On 4/18/07, craig wickesser <[EMAIL PROTECTED]> wrote: Hi...I have a client which I am using to access a web service The code I have is... MyStub stub = new MyStub(); HelloWorldDocument reqDoc = HellWorldDocument.Factory.newInstance();