dev@jax-ws.java.net

MessageContext.keySet(). NPE when iterating

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Thu, 31 Aug 2006 17:34:37 +0200

Hi,

im getting NPE in WS implementation.

/ @Resource
    private WebServiceContext wsContext;

    public void serv() {
        for(String s : wsContext.getMessageContext().keySet())
System.out.println(s);
    }
/
this WS method, when called will throw NPE:
     [java] java.lang.NullPointerException
     [java] at java.util.AbstractMap$1$1.hasNext(AbstractMap.java:379)


WBR,
Alexey.