tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreessen <andrees...@list.ru>
Subject Re: SOAP HEADERS with OpenEJB
Date Fri, 20 Nov 2009 10:22:35 GMT

Hi Jean-Louis,
I just reworked slightly simple-webservice project do demonstrate what I
mean... Attached you could find it.

Thanks for your help.
http://old.nabble.com/file/p26436766/simple-webservice.zip
simple-webservice.zip 


Jean-Louis MONTEIRO wrote:
> 
> Hi,
> 
> did you have a look to our simple-webservice sample?
> As far as i can remember, it contains SOAP headers.
> 
> Otherwise, can you give us a bit more details or a simple test project?
> 
> Jean-Louis
> 
> 
> 
> andreessen wrote:
>> 
>> Hi there,
>> 
>> Would you be so kind to help me with a problem I met.. I am currently
>> using Openejb to test my app during maven build and I need to send xml
>> token in SOAP Headers so I put it there in this way:
>> 
>> WSBindingProvider wsPort = (WSBindingProvider) provider;
>>         wsPort.setOutboundHeaders(Headers.create(new
>> QName("http://my.service.com/", "token"),token));
>> 
>> Initially I tried to get it from WebServiceContext injected into my
>> service (@Resource WebServiceContext wctx:
>> 
>> String test =
>> wctx.getMessageContext().get(JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY)
>> 
>> it did not help... then I created ejb handler: public class MyHandler
>> implements SOAPHandler<SOAPMessageContext> and I tried to extract headers
>> from envelope as described there:
>> http://www.docjar.com/html/api/org/apache/cxf/jaxws/handler/soap/SOAPMessageContextImpl.java.html
>> 
>> public boolean handleMessage(SOAPMessageContext context) {
>>    SOAPHeader header = message.getSOAPPart().getEnvelope().getHeader();
>>    LOG.log(Level.INFO, "Handler MessageContext SOAPHeader: " +
>> header.toString(), "");
>> }
>> 
>> ..but it just empty.. - so does SOAP envelope...
>> 
>> Could you give me a hint what I am doing wrong and is it possible to do
>> it altogether?
>> 
>> Appreciate your help, thanks!
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/SOAP-HEADERS-with-OpenEJB-tp26412403p26436766.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message