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 aj...@apache.org on 2005/05/31 05:44:45 UTC
svn commit: r179186 - in /webservices/axis/trunk/java/modules:
core/src/org/apache/axis/clientapi/StubSupporter.java
wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
Author: ajith
Date: Mon May 30 20:44:42 2005
New Revision: 179186
URL: http://svn.apache.org/viewcvs?rev=179186&view=rev
Log:
Updated the client emmitter for the new change in endpoint
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/StubSupporter.java
webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/StubSupporter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/StubSupporter.java?rev=179186&r1=179185&r2=179186&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/StubSupporter.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/StubSupporter.java Mon May 30 20:44:42 2005
@@ -36,7 +36,7 @@
returnElement.addChild(fac.createText(returnElement,String.valueOf(((Float)value).floatValue())));
}else if (inputParamClass.equals(Double.class)){
returnElement.addChild(fac.createText(returnElement,String.valueOf(((Double)value).doubleValue())));
- //todo this seems to be a long list... needs to complete this
+ //todo this seems to be a long list... need to complete this
}else if (inputParamClass.equals(OMElement.class)){
returnElement.addChild((OMElement)value);
}else{
@@ -56,7 +56,7 @@
}else if (outputTypeClass.equals(Double.class)){
outputObj = new Double(elt.getText());
- //todo this seems to be a long list... needs to complete this
+ //todo this seems to be a long list... need to complete this
}else if (outputTypeClass.equals(OMElement.class)){
outputObj = elt;
Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java?rev=179186&r1=179185&r2=179186&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java Mon May 30 20:44:42 2005
@@ -8,6 +8,7 @@
import java.util.HashMap;
import java.util.Iterator;
+
import org.apache.axis.wsdl.codegen.CodeGenConfiguration;
import org.apache.axis.wsdl.codegen.CodeGenerationException;
import org.apache.axis.wsdl.codegen.extension.AxisBindingBuilder;
@@ -28,10 +29,14 @@
import org.apache.wsdl.WSDLOperation;
import org.apache.wsdl.WSDLService;
import org.apache.wsdl.WSDLTypes;
+import org.apache.wsdl.WSDLExtensibilityElement;
+import org.apache.wsdl.extensions.ExtensionConstants;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Text;
+
+
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -105,7 +110,7 @@
HashMap services = wom.getServices();
if (!services.isEmpty()) {
if (services.size()==1){
- axisService = (WSDLService)services.values().toArray()[0];
+ axisService = (WSDLService)services.values().toArray()[0];
}else{
throw new UnsupportedOperationException("Single service WSDL files only");
}
@@ -119,6 +124,7 @@
//write the test classes
writeTestClasses(axisBinding);
} catch (Exception e) {
+ e.printStackTrace();
throw new CodeGenerationException(e);
}
}
@@ -192,12 +198,12 @@
*/
protected void writeServiceXml(WSDLBinding axisBinding) throws Exception {
if (this.configuration.isGenerateDeployementDescriptor()){
- //Note - One can generate the service xml using the interface XML
- XmlDocument skeletonModel = createDOMDocuementForInterface(axisBinding);
- ClassWriter serviceXmlWriter = new ServiceXMLWriter(this.configuration.getOutputLocation(),
- this.configuration.getOutputLanguage()
- );
- writeClass(skeletonModel,serviceXmlWriter);
+ //Note - One can generate the service xml using the interface XML
+ XmlDocument skeletonModel = createDOMDocuementForInterface(axisBinding);
+ ClassWriter serviceXmlWriter = new ServiceXMLWriter(this.configuration.getOutputLocation(),
+ this.configuration.getOutputLanguage()
+ );
+ writeClass(skeletonModel,serviceXmlWriter);
}
}
@@ -222,7 +228,7 @@
* @throws Exception
*/
protected void writeBeans(WSDLTypes wsdlType) throws Exception {
- Collection collection= wsdlType.getExtensibilityElements();
+ Collection collection= wsdlType.getExtensibilityElements();
if (collection != null){
for (Iterator iterator = collection.iterator(); iterator.hasNext();) {
XmlDocument interfaceModel = createDOMDocuementForBean();
@@ -441,7 +447,15 @@
for (int i = 0; i < endpoints.length; i++) {
endpoint = (WSDLEndpoint)endpoints[i];
endpointElement = doc.createElement("endpoint");
- text = doc.createTextNode(endpoint.toString()); //todo How to get the end point address
+ org.apache.wsdl.extensions.SOAPAddress address = null;
+ Iterator iterator = endpoint.getExtensibilityElements().iterator();
+ while(iterator.hasNext()) {
+ WSDLExtensibilityElement element = (WSDLExtensibilityElement)iterator.next();
+ if (element.getType().equals(ExtensionConstants.SOAP_ADDRESS)){
+ address = (org.apache.wsdl.extensions.SOAPAddress)element;
+ }
+ }
+ text = doc.createTextNode(address.getLocationURI()); //todo How to get the end point address
endpointElement.appendChild(text);
rootElement.appendChild(endpointElement);
}