axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r168302 - /webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/wsdl4j/WSDLPump.java
Date Thu, 05 May 2005 09:36:13 GMT
Author: chathura
Date: Thu May  5 02:36:12 2005
New Revision: 168302

URL: http://svn.apache.org/viewcvs?rev=168302&view=rev
Log:
wsdl4j to wom building: Fixed the MessageRerefence element to be taken either the QName or
the Type.

Modified:
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/wsdl4j/WSDLPump.java

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/wsdl4j/WSDLPump.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/wsdl4j/WSDLPump.java?rev=168302&r1=168301&r2=168302&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/wsdl4j/WSDLPump.java
(original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/wsdl4j/WSDLPump.java
Thu May  5 02:36:12 2005
@@ -277,6 +277,9 @@
 		wsdlOperation.setName(new QName(nameSpaceOfTheOperation,
 				wsdl4jOperation.getName()));
 
+		//This code make no attempt to make use of the special xs:Token
+		//defined in the WSDL 2.0. eg like #any, #none
+	
 		//OperationType wsdl4jOperation.getStyle()
 
 		// Create the Input Message and add
@@ -290,13 +293,17 @@
 		// the Types.
 		//TODO
 
-		wsdlInputMessage.setMessageLabel(wsdl4jInputMessage.getName());
-		if(wsdl4jInputMessage.getMessage().getParts().size()>1)
-			throw new WSDLProcessingException("Multipart Parsing not Supported");
-		Iterator inputIterator = wsdl4jInputMessage.getMessage().getParts().values().iterator();
-		if(inputIterator.hasNext()){
-			QName typeName = ((Part)inputIterator.next()).getTypeName();
-			wsdlInputMessage.setElement(typeName);
+		if(null != wsdl4jInputMessage.getMessage().getQName()){
+			wsdlInputMessage.setElement(wsdl4jInputMessage.getMessage().getQName());
+		}else{
+			if(wsdl4jInputMessage.getMessage().getParts().size()>1)
+				throw new WSDLProcessingException("Multipart Parsing not Supported");
+			Iterator inputIterator = wsdl4jInputMessage.getMessage().getParts().values().iterator();
+			while(inputIterator.hasNext()){
+				Part part = ((Part)inputIterator.next());
+				QName typeName = part.getTypeName();
+				wsdlInputMessage.setElement(typeName);
+			}
 		}
 		
 		wsdlOperation.setInputMessage(wsdlInputMessage);
@@ -306,17 +313,19 @@
 		
 		//Create an output message and add
 		Output wsdl4jOutputMessage = wsdl4jOperation.getOutput();
-		MessageReference wsdlOutputMessage = this.wsdlComponenetFactory
-				.createMessageReference();
-		wsdlOutputMessage
-				.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
+		MessageReference wsdlOutputMessage = this.wsdlComponenetFactory.createMessageReference();
+		wsdlOutputMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
 		
-		if(wsdl4jOutputMessage.getMessage().getParts().size()>1)
-			throw new WSDLProcessingException("Multipart Parsing not Supported");
-		Iterator outputIterator = wsdl4jOutputMessage.getMessage().getParts().values().iterator();
-		if(outputIterator.hasNext()){
-			QName typeName = ((Part)outputIterator.next()).getTypeName();
-			wsdlOutputMessage.setElement(typeName);
+		if(null != wsdl4jOutputMessage.getMessage().getQName() ){
+			wsdlOutputMessage.setElement(wsdl4jOutputMessage.getMessage().getQName());
+		}else{
+			if(wsdl4jOutputMessage.getMessage().getParts().size()>1)
+				throw new WSDLProcessingException("Multipart Parsing not Supported");
+			Iterator outputIterator = wsdl4jOutputMessage.getMessage().getParts().values().iterator();
+			if(outputIterator.hasNext()){
+				QName typeName = ((Part)outputIterator.next()).getTypeName();
+				wsdlOutputMessage.setElement(typeName);
+			}
 		}
 		
 		wsdlOperation.setOutputMessage(wsdlOutputMessage);



Mime
View raw message