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 ae...@apache.org on 2007/03/13 19:08:20 UTC
svn commit: r517796 -
/webservices/muse/trunk/modules/muse-tools/src/org/apache/muse/tools/generator/util/AbstractCommandLineApp.java
Author: aeberbac
Date: Tue Mar 13 11:08:19 2007
New Revision: 517796
URL: http://svn.apache.org/viewvc?view=rev&rev=517796
Log:
removed imports and fixed some redudant code that got the first portType
Modified:
webservices/muse/trunk/modules/muse-tools/src/org/apache/muse/tools/generator/util/AbstractCommandLineApp.java
Modified: webservices/muse/trunk/modules/muse-tools/src/org/apache/muse/tools/generator/util/AbstractCommandLineApp.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-tools/src/org/apache/muse/tools/generator/util/AbstractCommandLineApp.java?view=diff&rev=517796&r1=517795&r2=517796
==============================================================================
--- webservices/muse/trunk/modules/muse-tools/src/org/apache/muse/tools/generator/util/AbstractCommandLineApp.java (original)
+++ webservices/muse/trunk/modules/muse-tools/src/org/apache/muse/tools/generator/util/AbstractCommandLineApp.java Tue Mar 13 11:08:19 2007
@@ -33,7 +33,6 @@
import org.apache.muse.util.FileUtils;
import org.apache.muse.util.messages.Messages;
import org.apache.muse.util.messages.MessagesFactory;
-import org.apache.muse.util.xml.XmlUtils;
import org.apache.muse.ws.resource.metadata.MetadataDescriptor;
import org.apache.muse.ws.resource.metadata.WsrmdConstants;
import org.apache.muse.ws.resource.metadata.impl.SimpleMetadataDescriptor;
@@ -185,13 +184,13 @@
public static MetadataDescriptor getMetadataDescriptor(String wsdlPath, Environment env, Document wsdlDocument) throws FileNotFoundException {
MetadataDescriptor metadata = null;
- Element[] portTypes = XmlUtils.findInSubTree(wsdlDocument.getDocumentElement(), WsdlUtils.PORT_TYPE_QNAME);
- if(portTypes.length > 0) {
+ Element portType = WsdlUtils.getFirstPortType(wsdlDocument);
+ if(portType != null) {
QName descQname = WsrmdConstants.DESCRIPTOR_ATTR_QNAME;
- String descName = portTypes[0].getAttributeNS(descQname.getNamespaceURI(), descQname.getLocalPart());
+ String descName = portType.getAttributeNS(descQname.getNamespaceURI(), descQname.getLocalPart());
QName locationQname = WsrmdConstants.DESCRIPTOR_LOCATION_ATTR_QNAME;
- String locationName = portTypes[0].getAttributeNS(locationQname.getNamespaceURI(), locationQname.getLocalPart());
+ String locationName = portType.getAttributeNS(locationQname.getNamespaceURI(), locationQname.getLocalPart());
if(descName.length() != 0 && locationName.length() != 0) {
String relativePath = env.createRelativePath(wsdlPath, locationName);
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org