<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-12168038.post2169958293400720297..comments</id><updated>2009-09-16T03:06:46.051+05:30</updated><title type='text'>Comments on Vinod Singh: How to get operation name in JAX-WS handler</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.vinodsingh.com/feeds/2169958293400720297/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12168038/2169958293400720297/comments/default'/><link rel='alternate' type='text/html' href='http://blog.vinodsingh.com/2009/03/how-to-get-operation-name-in-jax-ws.html'/><author><name>Vinod Singh</name><uri>http://www.blogger.com/profile/14429571106836951918</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-12168038.post-2526337212388686806</id><published>2009-09-16T03:06:46.051+05:30</published><updated>2009-09-16T03:06:46.051+05:30</updated><title type='text'>what if I want to get the arguments passed in the ...</title><content type='html'>what if I want to get the arguments passed in the operation? How do I perform that?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12168038/2169958293400720297/comments/default/2526337212388686806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12168038/2169958293400720297/comments/default/2526337212388686806'/><link rel='alternate' type='text/html' href='http://blog.vinodsingh.com/2009/03/how-to-get-operation-name-in-jax-ws.html?showComment=1253050606051#c2526337212388686806' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.vinodsingh.com/2009/03/how-to-get-operation-name-in-jax-ws.html' ref='tag:blogger.com,1999:blog-12168038.post-2169958293400720297' source='http://www.blogger.com/feeds/12168038/posts/default/2169958293400720297' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-12168038.post-5951919929283017504</id><published>2009-05-27T21:56:18.312+05:30</published><updated>2009-05-27T21:56:18.312+05:30</updated><title type='text'>The following article states that the WSDL_OPERATI...</title><content type='html'>The following article states that the WSDL_OPERATION property is optional and might be presented only if the binding has information about WSDL metadata.&lt;br /&gt;&lt;br /&gt;http://www.javaworld.com/javaworld/jw-02-2007/jw-02-handler.html</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12168038/2169958293400720297/comments/default/5951919929283017504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12168038/2169958293400720297/comments/default/5951919929283017504'/><link rel='alternate' type='text/html' href='http://blog.vinodsingh.com/2009/03/how-to-get-operation-name-in-jax-ws.html?showComment=1243441578312#c5951919929283017504' title=''/><author><name>Anshu Gaind</name><uri>http://www.blogger.com/profile/02901876221871212381</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.vinodsingh.com/2009/03/how-to-get-operation-name-in-jax-ws.html' ref='tag:blogger.com,1999:blog-12168038.post-2169958293400720297' source='http://www.blogger.com/feeds/12168038/posts/default/2169958293400720297' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-12168038.post-2834514045806932545</id><published>2009-03-24T14:23:00.000+05:30</published><updated>2009-03-24T14:23:00.000+05:30</updated><title type='text'>Dmitry thanks for the update. This was an quick an...</title><content type='html'>Dmitry thanks for the update. This was an quick and dirty solution for the problem in hand.&lt;BR/&gt;&lt;BR/&gt;Besides the problem you mentioned the way mentioned here works only for server side handlers not for client handlers as there are different classes being used by JAX-WS RI on client side. Anyway good news is that JAX-WS RI 2.2 will again provide operation name, hence no more dirty tricks :-)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12168038/2169958293400720297/comments/default/2834514045806932545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12168038/2169958293400720297/comments/default/2834514045806932545'/><link rel='alternate' type='text/html' href='http://blog.vinodsingh.com/2009/03/how-to-get-operation-name-in-jax-ws.html?showComment=1237884780000#c2834514045806932545' title=''/><author><name>Vinod Singh</name><uri>http://www.blogger.com/profile/14429571106836951918</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='05637947753824606738'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.vinodsingh.com/2009/03/how-to-get-operation-name-in-jax-ws.html' ref='tag:blogger.com,1999:blog-12168038.post-2169958293400720297' source='http://www.blogger.com/feeds/12168038/posts/default/2169958293400720297' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-12168038.post-3384751716702359700</id><published>2009-03-24T13:27:00.000+05:30</published><updated>2009-03-24T13:27:00.000+05:30</updated><title type='text'>Your solution works only for rpc operations, where...</title><content type='html'>Your solution works only for rpc operations, where name of first element in payload equal to operation name. If operation has style=document your will get name of element, not name of operation.&lt;BR/&gt;&lt;BR/&gt;However I found solution using your code, here it is:&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;private QName getOperationName(SOAPMessageContext context) {&lt;BR/&gt;    try {&lt;BR/&gt;        QName operationName = null;&lt;BR/&gt;        if (context.get(MessageContext.WSDL_OPERATION) != null) {&lt;BR/&gt;            operationName = (QName) context.get(MessageContext.WSDL_OPERATION);&lt;BR/&gt;        } else {&lt;BR/&gt;            Field field = context.getClass().getSuperclass().getDeclaredField("packet");&lt;BR/&gt;            field.setAccessible(true);&lt;BR/&gt;                Packet packet = (Packet) field.get(context);&lt;BR/&gt;&lt;BR/&gt;                SOAPSEIModel seiModel = ((com.sun.xml.ws.client.sei.SEIStub) context&lt;BR/&gt;                        .get(BindingProviderProperties.JAXWS_CLIENT_HANDLE_PROPERTY)).seiModel;&lt;BR/&gt;&lt;BR/&gt;                String operationLocalName = packet.getMessage().getMethod(seiModel).getOperationName();&lt;BR/&gt;                String portNamespace = ((QName)context.get(MessageContext.WSDL_PORT)).getNamespaceURI();&lt;BR/&gt;                operationName = new QName(portNamespace, operationLocalName);&lt;BR/&gt;            }&lt;BR/&gt;            return operationName;&lt;BR/&gt;        } catch (Exception e) {&lt;BR/&gt;            throw new RuntimeException("Error while trying to get wsdl operation name", e);&lt;BR/&gt;        }&lt;BR/&gt;    }&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;It returns wsdl operation's QName for both rpc and document style operations.&lt;BR/&gt;&lt;BR/&gt;So thank you for publish your solution :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12168038/2169958293400720297/comments/default/3384751716702359700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12168038/2169958293400720297/comments/default/3384751716702359700'/><link rel='alternate' type='text/html' href='http://blog.vinodsingh.com/2009/03/how-to-get-operation-name-in-jax-ws.html?showComment=1237881420000#c3384751716702359700' title=''/><author><name>Dmitry</name><uri>http://www.blogger.com/profile/06537387509952609756</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.vinodsingh.com/2009/03/how-to-get-operation-name-in-jax-ws.html' ref='tag:blogger.com,1999:blog-12168038.post-2169958293400720297' source='http://www.blogger.com/feeds/12168038/posts/default/2169958293400720297' type='text/html'/></entry></feed>