Author: jleroux
Date: Mon Apr 4 19:48:54 2011 New Revision: 1088762 URL: http://svn.apache.org/viewvc?rev=1088762&view=rev Log: To be compliant with clients generated with Apache CFX which uses JAX-WS and follow WS-I Basic Profile: http://en.wikipedia.org/wiki/WS-I_Basic_Profile, allows to define an empty targetNameSpace by commenting out the TargetNamespace property in service.properties. See http://mail-archives.apache.org/mod_mbox/cxf-users/200901.mbox/%3C200901231332.03818.dkulp@...%3E for details Keeps the "http://ofbiz.apache.org/service") tns, used only in wsdl:definitions, can be hardcoded Modified: ofbiz/trunk/framework/service/config/service.properties ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java Modified: ofbiz/trunk/framework/service/config/service.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/config/service.properties?rev=1088762&r1=1088761&r2=1088762&view=diff ============================================================================== --- ofbiz/trunk/framework/service/config/service.properties (original) +++ ofbiz/trunk/framework/service/config/service.properties Mon Apr 4 19:48:54 2011 @@ -23,3 +23,5 @@ servicedispatcher.servicedebugmode=true remotedispatcher.exportall=false # complete answer from SOAP WSDL or only brief message "Problem processing the service" for security reason secureSoapAnswer=true +# TargetNamespace for SOAP WSDL +#TargetNamespace=http://ofbiz.apache.org/service/ Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java?rev=1088762&r1=1088761&r2=1088762&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java Mon Apr 4 19:48:54 2011 @@ -93,7 +93,10 @@ public class ModelService extends Abstra public static final String module = ModelService.class.getName(); public static final String XSD = "http://www.w3.org/2001/XMLSchema"; - public static final String TNS = "http://ofbiz.apache.org/service/"; + // The line below allows to define an empty targetNameSpace by commenting out the TargetNamespace property in service.properties + // To be compliant with CFX which uses JAX-WS and follow WS-I Basic Profile: http://en.wikipedia.org/wiki/WS-I_Basic_Profile + // see http://mail-archives.apache.org/mod_mbox/cxf-users/200901.mbox/%3C200901231332.03818.dkulp@...%3E for details + public static final String TNS = UtilProperties.getPropertyValue("service.properties", "TargetNamespace", ""); public static final String OUT_PARAM = "OUT"; public static final String IN_PARAM = "IN"; @@ -1189,7 +1192,7 @@ public class ModelService extends Abstra Definition def = factory.newDefinition(); def.setTargetNamespace(TNS); def.addNamespace("xsd", XSD); - def.addNamespace("tns", TNS); + def.addNamespace("tns", "http://ofbiz.apache.org/service"); // This name space, used only in wsdl:definitions can be hardcoded def.addNamespace("soap", "http://schemas.xmlsoap.org/wsdl/soap/"); this.getWSDL(def, locationURI); return factory.newWSDLWriter().getDocument(def); |
Free forum by Nabble | Edit this page |