You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ke...@apache.org on 2007/04/03 12:04:42 UTC

svn commit: r525124 - in /webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2: description/AxisService.java transport/http/HTTPWorker.java

Author: keithc
Date: Tue Apr  3 03:04:36 2007
New Revision: 525124

URL: http://svn.apache.org/viewvc?view=rev&rev=525124
Log:
during codegenaration using WSDL2, the wsdl was not written correctly. Fixing that.
In HTTPWorker we ingnored contentType of get request, fixing that too.

Modified:
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=525124&r1=525123&r2=525124
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService.java Tue Apr  3 03:04:36 2007
@@ -1019,29 +1019,8 @@
 
     //WSDL 2.0
     public void printWSDL2(OutputStream out) throws AxisFault {
-        if (isUseUserWSDL()) {
-            Parameter wsld4jdefinition = getParameter(WSDLConstants.WSDL_4_J_DEFINITION);
-            if (wsld4jdefinition != null) {
-                try {
-                    String error = "<error>" +
-                            "<description>Unable to showtwo will WSDL for this service</description>" +
-                            "<reason>WSDL 2.0 document is to be shown. But we do not support WSDL 2.0" +
-                            "serialization yet.</reason>" +
-                            "</error>";
-                    out.write(error.getBytes());
-                    out.flush();
-                    out.close();
-                } catch (IOException e) {
-                    throw new AxisFault(e);
-                }
-            } else {
-                printWSDLError(out);
-            }
-        } else {
-            setWsdlFound(true);
-            //pick the endpointName and take it as the epr for the WSDL
-            getWSDL2(out, new String[]{this.endpointName});
-        }
+        // Woden has not implemented the serializer yet, so all we can do it serialize the axisService
+        getWSDL2(out, new String[]{this.endpointName});
     }
 
     public void printWSDL2(OutputStream out,

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java?view=diff&rev=525124&r1=525123&r2=525124
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java Tue Apr  3 03:04:36 2007
@@ -194,8 +194,17 @@
 
             outbuffer = copyCommonProperties(msgContext, request);
 
+            String contentType = null;
+            Header[] headers = request.getHeaders(HTTPConstants.HEADER_CONTENT_TYPE);
+            if (headers != null && headers.length > 0) {
+                contentType = headers[0].getValue();
+                int index = contentType.indexOf(';');
+                if (index > 0) {
+                    contentType = contentType.substring(0, index);
+                }
+            }
             // deal with GET request
-            pi = RESTUtil.processURLRequest(msgContext, outbuffer.getOutputStream(), null);
+            pi = RESTUtil.processURLRequest(msgContext, outbuffer.getOutputStream(), contentType);
 
         } else if (method.equals(HTTPConstants.HEADER_POST)) {
             // deal with POST request



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org