[jboss-svn-commits] JBL Code SVN: r18053 - in labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src: test/java/org/jboss/soa/esb/actions/soap and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jan 23 07:07:08 EST 2008


Author: tfennelly
Date: 2008-01-23 07:07:08 -0500 (Wed, 23 Jan 2008)
New Revision: 18053

Modified:
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl
Log:
XML preamble on wsdls: http://jira.jboss.com/jira/browse/JBESB-1509

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2008-01-23 11:45:10 UTC (rev 18052)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2008-01-23 12:07:08 UTC (rev 18053)
@@ -163,7 +163,12 @@
         execContext.setAttribute(WsdlTransformer.TARGET_PROTOCOL, targetProtocol);
         transformer.filter(new StreamSource(new StringReader(wsdl)), new StreamResult(writer), execContext);
 
-        return writer.toString();
+        wsdl = writer.toString().trim();
+        if(!wsdl.startsWith("<?xml")) {
+            wsdl = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + wsdl;
+        }
+
+        return wsdl;
     }
 
     protected void initializeTransform() throws ConfigurationException {

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl	2008-01-23 11:45:10 UTC (rev 18052)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl	2008-01-23 12:07:08 UTC (rev 18053)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <definitions name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <import location="http://127.0.0.1:8080/contract/contract.jsp?wsdl&amp;resource=MTOMEndpoint_PortType61314.wsdl&amp;serviceCat=myServiceCat&amp;serviceName=myServiceName&amp;protocol=socket" namespace="http://org.jboss.ws/xop/doclit"/>
     <types/>




More information about the jboss-svn-commits mailing list