You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ba...@apache.org on 2007/01/27 22:11:33 UTC
svn commit: r500621 -
/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java
Author: barrettj
Date: Sat Jan 27 13:11:32 2007
New Revision: 500621
URL: http://svn.apache.org/viewvc?view=rev&rev=500621
Log:
WSDL Description property on JAX-WS MessageContext should be a URI per the JAXWS spec, page 111, Table 9.2: Standard MessageContext properties
Modified:
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java?view=diff&rev=500621&r1=500620&r2=500621
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java Sat Jan 27 13:11:32 2007
@@ -18,6 +18,9 @@
*/
package org.apache.axis2.jaxws.context.utils;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
import java.util.Map;
import javax.xml.ws.handler.MessageContext.Scope;
@@ -29,8 +32,11 @@
import org.apache.axis2.jaxws.description.ServiceDescriptionWSDL;
import org.apache.axis2.jaxws.util.WSDLWrapper;
import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
public class ContextUitls {
+ private static final Log log = LogFactory.getLog(ContextUitls.class);
/**
* Adds the appropriate properties to the MessageContext that the user will see
@@ -48,9 +54,17 @@
// Set the WSDL properties
ServiceDescription sd = jaxwsMessageContext.getServiceDescription();
- WSDLWrapper wsdlWrapper = ((ServiceDescriptionWSDL) sd).getWSDLWrapper();
- if (wsdlWrapper!=null){
- soapMessageContext.put(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, wsdlWrapper.getDefinition());
+ URL wsdlLocation = ((ServiceDescriptionWSDL) sd).getWSDLLocation();
+ if (wsdlLocation != null && !"".equals(wsdlLocation)){
+ URI wsdlLocationURI = null;
+ try {
+ wsdlLocationURI = wsdlLocation.toURI();
+ }
+ catch (URISyntaxException ex) {
+ // TODO: NLS/RAS
+ log.warn("Unable to convert WSDL location URL to URI. URL: " + wsdlLocation.toString() + "; Service: " + sd.getServiceQName() , ex);
+ }
+ soapMessageContext.put(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, wsdlLocationURI);
soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, Scope.APPLICATION);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org