You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2007/03/13 17:01:12 UTC
svn commit: r517744 -
/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java
Author: danj
Date: Tue Mar 13 09:01:11 2007
New Revision: 517744
URL: http://svn.apache.org/viewvc?view=rev&rev=517744
Log:
Added a default prefix for portType qnames that have none - this will allow us to put a valid qname and
prefix mapping for the 'interface' attribute of rmd:MetadataDescriptor.
Modified:
webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java
Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java?view=diff&rev=517744&r1=517743&r2=517744
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java Tue Mar 13 09:01:11 2007
@@ -79,6 +79,15 @@
_name = name;
_wsdlLocation = wsdlLocation;
_wsdlInterface = wsdlInterface;
+
+ //
+ // need to make sure we have some kind of prefix, otherwise we
+ // can't figure out the port type's namespace
+ //
+ String prefix = _wsdlInterface.getPrefix();
+
+ if (prefix == null || prefix.length() == 0)
+ _wsdlInterface = new QName(_wsdlInterface.getNamespaceURI(), _wsdlInterface.getLocalPart(), "muse-wsdl");
}
/**
@@ -429,7 +438,13 @@
Element root = XmlUtils.createElement(doc, WsrmdConstants.DESCRIPTOR_QNAME);
root.setAttribute(WsrmdConstants.NAME, getName());
- root.setAttribute(WsrmdConstants.INTERFACE, XmlUtils.toString(getInterface()));
+
+ //
+ // be sure to add the prefix mapping as well as the interface qname
+ //
+ QName portType = getInterface();
+ root.setAttribute(WsrmdConstants.INTERFACE, XmlUtils.toString(portType));
+ XmlUtils.setNamespaceAttribute(root, portType.getPrefix(), portType.getNamespaceURI());
//
// HACK: the namespace that is the first token of this attribute value
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org