This is the WSDL that the Version service generates (an apache service that is installed by default). The getVersion() method takes no parameters and returns a string. According to the WSDL though it does take a parameter (<wsdl:message name="getVersionMessage"><wsdl:part element="ns0:getVersion" name="part1" /></wsdl:message>).
When you try to use it from .NET, it generates the stubs with the extra parameter. No matter what you send then, axis returns an error. The same service under Axis 1.4 produces valid WSDL that works fine from .NET The WSDL was generated from : http://localhost:8080/axis/services/version?wsdl <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:axis2="http://ws.apache.org/axis2" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://axisversion.sample/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://ws.apache.org/axis2"><wsdl:types><xs:schema xmlns:ns="http://axisversion.sample/xsd" targetNamespace="http://axisversion.sample/xsd" elementFormDefault="unqualified" attributeFormDefault="unqualified"> <xs:element name="getVersion"> <xs:complexType /> </xs:element> <xs:element name="getVersionResponse"> <xs:complexType> <xs:sequence> <xs:element type="xs:string" name="return" /> </xs:sequence> </xs:complexType> </xs:element> </xs:schema></wsdl:types><wsdl:message name="getVersionMessage"><wsdl:part element="ns0:getVersion" name="part1" /></wsdl:message><wsdl:message name="getVersionResponse"><wsdl:part element="ns0:getVersionResponse" name="part1" /></wsdl:message><wsdl:portType name="versionPortType"><wsdl:operation name="getVersion"><wsdl:input message="axis2:getVersionMessage" /><wsdl:output message="axis2:getVersionResponse" /></wsdl:operation></wsdl:portType><wsdl:binding type="axis2:versionPortType" name="versionSOAP11Binding"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /><wsdl:operation name="getVersion"><soap:operation style="document" soapAction="urn:getVersion" /><wsdl:input><soap:body namespace="http://ws.apache.org/axis2" use="literal" /></wsdl:input><wsdl:output><soap:body namespace="http://ws.apache.org/axis2" use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding type="axis2:versionPortType" name="versionSOAP12Binding"><soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /><wsdl:operation name="getVersion"><soap12:operation style="document" soapAction="urn:getVersion" /><wsdl:input><soap12:body namespace="http://ws.apache.org/axis2" use="literal" /></wsdl:input><wsdl:output><soap12:body namespace="http://ws.apache.org/axis2" use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding type="axis2:versionPortType" name="versionHttpBinding"><http:binding verb="POST" /><wsdl:operation name="getVersion"><http:operation location="getVersion" /><wsdl:input><mime:content type="text/xml" /></wsdl:input><wsdl:output><mime:content type="text/xml" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="version"><wsdl:port binding="axis2:versionSOAP11Binding" name="versionSOAP11port0"><soap:address location="http://localhost:8080/axis2/services/version" /></wsdl:port><wsdl:port binding="axis2:versionSOAP12Binding" name="versionSOAP12port0"><soap12:address location="http://localhost:8080/axis2/services/version" /></wsdl:port><wsdl:port binding="axis2:versionHttpBinding" name="versionHttpport0"><http:address location="http://localhost:8080/axis2/rest/version" /></wsdl:port></wsdl:service></wsdl:definitions> ---------- Original Message ---------------------------------- From: "Ajith Ranabahu" <[EMAIL PROTECTED]> Reply-To: [email protected] Date: Sun, 18 Jun 2006 11:57:02 +0530 >Hi, >Can you post the full WSDL that was generated please ? I suppose you >used Java2WSDL ? > >Ajith > >On 6/18/06, John Pletka <[EMAIL PROTECTED]> wrote: >> Perhaps I am doing something wrong, but the WSDL that Axis2 v1.0 is >> generating is unusable because it adds message parts that are not in the >> class. The same class in Axis 1.4 generates it clean. >> >> For example, for the sample class: >> public class TestAxis { >> public String getDate(){ >> return new java.util.Date().toString(); >> } >> } >> Axis2 generates >> <wsdl:message name="getDateMessage"> >> <wsdl:part element="ns0:getDate" name="part1" /> >> /wsdl:message> >> <wsdl:message name="getDateResponse"> >> <wsdl:part element="ns0:getDateResponse" name="part1" /> >> </wsdl:message> >> >> Looking at the original code, there should not be any message for the >> getDateMessage input. Basically it seems to assume that everything is >> coming in as an OEMessage data type. >> >> This makes integration with non-axis2 clients next to impossible. For >> example if Visual Studio .NET 2003 points to that WSDL file, the stubs it >> generates require an input parameter (which the method should not require), >> and since it is an axis2 internal data type, nothing you put in there is >> accepted by the axis2 engine. >> >> Axis1.4 generates clean wsdl from the same source that is easily called from >> .NET. >> >> Is there something I'm missing here? >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > >-- >Ajith Ranabahu > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
