cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r825233 - in /cxf/branches/2.2.x-fixes: ./ systests/jaxws/src/test/java/org/apache/cxf/systest/provider/
Date Wed, 14 Oct 2009 19:33:36 GMT
Author: dkulp
Date: Wed Oct 14 19:33:35 2009
New Revision: 825233

URL: http://svn.apache.org/viewvc?rev=825233&view=rev
Log:
Merged revisions 825166 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r825166 | dkulp | 2009-10-14 11:29:56 -0400 (Wed, 14 Oct 2009) | 1 line
  
  [CXF-2469] Add test cases for operation qname
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java
    cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadProvider.java
    cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadXMLBindingProvider.java
    cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSAXSourceMessageProvider.java
    cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSAXSourcePayloadProvider.java
    cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageDocProvider.java
    cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
    cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java
    cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWStreamSourceMessageProvider.java
    cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWStreamSourcePayloadProvider.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java?rev=825233&r1=825232&r2=825233&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourceMessageProvider.java
Wed Oct 14 19:33:35 2009
@@ -20,6 +20,7 @@
 package org.apache.cxf.systest.provider;
 import java.io.InputStream;
 
+import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPBody;
@@ -28,7 +29,10 @@
 import javax.xml.ws.Provider;
 import javax.xml.ws.Service;
 import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
+
 import org.w3c.dom.Node;
 
 
@@ -42,6 +46,10 @@
 
     private static QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHi");
     private static QName greetMe = new QName("http://apache.org/hello_world_rpclit", "greetMe");
+    
+    @Resource 
+    WebServiceContext ctx;
+    
     private SOAPMessage sayHiResponse;
     private SOAPMessage greetMeResponse;
     private MessageFactory factory;
@@ -62,6 +70,11 @@
     }
 
     public DOMSource invoke(DOMSource request) {
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
+        
         //XMLUtils.writeTo(request, System.out);
         DOMSource response = new DOMSource();
         try {

Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadProvider.java?rev=825233&r1=825232&r2=825233&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadProvider.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadProvider.java
Wed Oct 14 19:33:35 2009
@@ -20,6 +20,7 @@
 package org.apache.cxf.systest.provider;
 import java.io.InputStream;
 
+import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 import javax.xml.soap.Detail;
 import javax.xml.soap.DetailEntry;
@@ -30,7 +31,9 @@
 import javax.xml.soap.SOAPFault;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
 import javax.xml.ws.soap.SOAPFaultException;
 
 import org.w3c.dom.Document;
@@ -46,12 +49,16 @@
                       targetNamespace = "http://apache.org/hello_world_rpclit",
  wsdlLocation = "/wsdl/hello_world_rpc_lit.wsdl")
 public class HWDOMSourcePayloadProvider implements Provider<DOMSource> {
-
     private static QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHi");
     private static QName greetMe = new QName("http://apache.org/hello_world_rpclit", "greetMe");
+
+    @Resource 
+    WebServiceContext ctx;
+
     private Document sayHiResponse;
     private Document greetMeResponse;
     private MessageFactory factory;
+    
 
     public HWDOMSourcePayloadProvider() {
         try {
@@ -68,6 +75,11 @@
     }
 
     public DOMSource invoke(DOMSource request) {
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
+        
         DOMSource response = new DOMSource();
 
         Node n = request.getNode();
@@ -107,14 +119,5 @@
         }
         return response;
     }
-/*    
-    private Node getElementChildNode(SOAPBody body) {
-        Node n = body.getFirstChild();
 
-        while (n.getNodeType() != Node.ELEMENT_NODE) {
-            n = n.getNextSibling();
-        }
-        
-        return n;        
-    }*/
 }

Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadXMLBindingProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadXMLBindingProvider.java?rev=825233&r1=825232&r2=825233&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadXMLBindingProvider.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadXMLBindingProvider.java
Wed Oct 14 19:33:35 2009
@@ -21,13 +21,17 @@
 
 import java.io.InputStream;
 
+import javax.annotation.Resource;
+import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.ws.Provider;
 import javax.xml.ws.Service;
 import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.Document;
 
@@ -43,11 +47,19 @@
 @javax.xml.ws.BindingType(value = "http://cxf.apache.org/bindings/xformat")
 public class HWDOMSourcePayloadXMLBindingProvider implements
         Provider<DOMSource> {
-
+    @Resource 
+    WebServiceContext ctx;
+    
     public HWDOMSourcePayloadXMLBindingProvider() {
     }
 
     public DOMSource invoke(DOMSource request) {
+        
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
+        
         DocumentBuilderFactory factory;
         DocumentBuilder builder;
         Document document = null;

Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSAXSourceMessageProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSAXSourceMessageProvider.java?rev=825233&r1=825232&r2=825233&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSAXSourceMessageProvider.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSAXSourceMessageProvider.java
Wed Oct 14 19:33:35 2009
@@ -21,6 +21,7 @@
 
 import java.io.InputStream;
 
+import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPBody;
@@ -29,7 +30,9 @@
 import javax.xml.ws.Provider;
 import javax.xml.ws.Service;
 import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.Node;
 
@@ -45,6 +48,10 @@
     
     private static QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHi");
     private static QName greetMe = new QName("http://apache.org/hello_world_rpclit", "greetMe");
+    
+    @Resource 
+    WebServiceContext ctx;
+    
     private InputSource sayHiInputSource;
     private InputSource greetMeInputSource;
     private MessageFactory factory;
@@ -65,6 +72,11 @@
     }
 
     public SAXSource invoke(SAXSource request) {
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
+        
         SAXSource response = new SAXSource();
         try {
             SOAPMessage msg = factory.createMessage();

Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSAXSourcePayloadProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSAXSourcePayloadProvider.java?rev=825233&r1=825232&r2=825233&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSAXSourcePayloadProvider.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSAXSourcePayloadProvider.java
Wed Oct 14 19:33:35 2009
@@ -23,6 +23,7 @@
 import java.io.FileOutputStream;
 import java.io.InputStream;
 
+import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 import javax.xml.soap.MessageFactory;
 import javax.xml.stream.XMLStreamWriter;
@@ -33,7 +34,9 @@
 import javax.xml.ws.Provider;
 import javax.xml.ws.Service;
 import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
@@ -54,6 +57,11 @@
     
     private static QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHi");
     private static QName greetMe = new QName("http://apache.org/hello_world_rpclit", "greetMe");
+    
+    @Resource 
+    WebServiceContext ctx;
+
+    
     private MessageFactory factory;
     private InputSource sayHiInputSource;
     private InputSource greetMeInputSource;
@@ -76,6 +84,10 @@
     }
 
     public SAXSource invoke(SAXSource request) {
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
         SAXSource response = new SAXSource();
         try {
             

Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageDocProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageDocProvider.java?rev=825233&r1=825232&r2=825233&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageDocProvider.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageDocProvider.java
Wed Oct 14 19:33:35 2009
@@ -21,6 +21,7 @@
 
 import java.io.InputStream;
 
+import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPBody;
@@ -28,7 +29,9 @@
 import javax.xml.ws.Provider;
 import javax.xml.ws.Service;
 import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.Node;
 
@@ -42,6 +45,10 @@
 
     private static QName sayHi = new QName("http://apache.org/hello_world_soap_http", "sayHi");
     private static QName greetMe = new QName("http://apache.org/hello_world_soap_http", "greetMe");
+    
+    @Resource 
+    WebServiceContext ctx;
+    
     private SOAPMessage sayHiResponse;
     private SOAPMessage greetMeResponse;
     
@@ -61,6 +68,11 @@
     }
     
     public SOAPMessage invoke(SOAPMessage request) {
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
+        
         SOAPMessage response = null;        
         try {
             SOAPBody body = request.getSOAPBody();

Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java?rev=825233&r1=825232&r2=825233&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
Wed Oct 14 19:33:35 2009
@@ -21,6 +21,7 @@
 import java.io.InputStream;
 import java.util.Iterator;
 
+import javax.annotation.Resource;
 import javax.jws.HandlerChain;
 import javax.xml.namespace.QName;
 import javax.xml.soap.AttachmentPart;
@@ -30,7 +31,9 @@
 import javax.xml.ws.Provider;
 import javax.xml.ws.Service;
 import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.Node;
 
@@ -48,6 +51,11 @@
 
     private static QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHi");
     private static QName greetMe = new QName("http://apache.org/hello_world_rpclit", "greetMe");
+    
+    @Resource 
+    WebServiceContext ctx;
+
+    
     private SOAPMessage sayHiResponse;
     private SOAPMessage greetMeResponse;
     
@@ -67,6 +75,11 @@
     }
     
     public SOAPMessage invoke(SOAPMessage request) {
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
+        
         SOAPMessage response = null;        
         try {
             SOAPBody body = request.getSOAPBody();

Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java?rev=825233&r1=825232&r2=825233&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java
Wed Oct 14 19:33:35 2009
@@ -22,7 +22,9 @@
 import java.io.StringWriter;
 import java.io.Writer;
 
+import javax.annotation.Resource;
 import javax.jws.HandlerChain;
+import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Source;
@@ -35,7 +37,9 @@
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.ws.Provider;
 import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.XMLReader;
@@ -54,12 +58,19 @@
 @HandlerChain(file = "./handlers_invocation.xml", name = "TestHandlerChain")
 public class HWSourcePayloadProvider implements Provider<Source> {
     boolean doneStax;
-    
+    @Resource 
+    WebServiceContext ctx;
+
     public HWSourcePayloadProvider() {
     
     }
     
-    public Source invoke(Source request) {        
+    public Source invoke(Source request) {   
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
+        
         try {
             System.out.println(request.getClass().getName());
             String input = getSourceAsString(request);

Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWStreamSourceMessageProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWStreamSourceMessageProvider.java?rev=825233&r1=825232&r2=825233&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWStreamSourceMessageProvider.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWStreamSourceMessageProvider.java
Wed Oct 14 19:33:35 2009
@@ -21,6 +21,7 @@
 
 import java.io.InputStream;
 
+import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPBody;
@@ -29,7 +30,9 @@
 import javax.xml.ws.Provider;
 import javax.xml.ws.Service;
 import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.Node;
 
@@ -45,6 +48,9 @@
     
     private static QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHi");
     private static QName greetMe = new QName("http://apache.org/hello_world_rpclit", "greetMe");
+    @Resource 
+    WebServiceContext ctx;
+
     private InputStream sayHiInputStream;
     private InputStream greetMeInputStream;
     private MessageFactory factory;
@@ -62,6 +68,11 @@
     }
 
     public StreamSource invoke(StreamSource request) {
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
+        
         StreamSource response = new StreamSource();
         try {
             SOAPMessage msg = factory.createMessage();

Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWStreamSourcePayloadProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWStreamSourcePayloadProvider.java?rev=825233&r1=825232&r2=825233&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWStreamSourcePayloadProvider.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWStreamSourcePayloadProvider.java
Wed Oct 14 19:33:35 2009
@@ -23,6 +23,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 
+import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 import javax.xml.soap.MessageFactory;
 import javax.xml.transform.Transformer;
@@ -32,7 +33,9 @@
 import javax.xml.ws.Provider;
 import javax.xml.ws.Service;
 import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Document;
@@ -54,6 +57,9 @@
     
     private static QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHi");
     private static QName greetMe = new QName("http://apache.org/hello_world_rpclit", "greetMe");
+    @Resource 
+    WebServiceContext ctx;
+    
     private InputStream sayHiInputStream;
     private InputStream greetMeInputStream;
     private MessageFactory factory;
@@ -77,6 +83,11 @@
     }
 
     public StreamSource invoke(StreamSource request) {
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
+        
         StreamSource response = new StreamSource();
         try {
             DOMResult domResult = new DOMResult();



Mime
View raw message