Well, there are errors in the originally generated WSDL-- The type definitions are defined as SOAP Encoding types (tns2 namespace) rather than XSD types (default namespace), and I suspect that .NET would barf on these types.
I can't tell you why RC3 is generating the funky > values for the attribute names. These characters are definitely illegal in an NCName type. Please file bug reports for both problems. Regards, Anne On Sat, 19 Feb 2005 09:15:46 -0600, Hollywood <[EMAIL PROTECTED]> wrote: > Hello, > > I'm generating a fairly simple web service in Axis 1.2RC2 (I've tried RC3 > too) running under Tomcat 5.0X and Sun Java JRE1.5 which looks as follows: > > public interface SAPSync > { > public String syncType1(String sData); > public String syncType2(String sData); > } > > I apply the Java2WSDL tool as follows: > > java org.apache.axis.wsdl.Java2WSDL -X"./build" -o > SAPSync.wsdl -l"http://localhost:8080/axis/services/SAPSync" -n"http://www.b > og.com/wsdl" -p"com.bog.sync.ws" "http://www.bog.com/wsdl" -yWRAPPED > com.bog.sync.ws.SAPSync > > And get the following: > > <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions targetNamespace="http://www.bog.com/wsdl" > xmlns:apachesoap="http://xml.apache.org/xml-soap" > xmlns:impl="http://www.bog.com/wsdl" xmlns:intf="http://www.bog.com/wsdl" > xmlns:tns2="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <!--WSDL created by Apache Axis version: 1.2RC3 > Built on Feb 17, 2005 (12:11:12 PST)--> > <wsdl:types> > <schema elementFormDefault="qualified" > targetNamespace="http://www.bog.com/wsdl" > xmlns="http://www.w3.org/2001/XMLSchema"> > <element name="syncType1"> > <complexType> > <sequence> > <element name="in0" type="tns2:string"/> > </sequence> > </complexType> > </element> > <element name="syncType1Response"> > <complexType> > <sequence> > <element name="syncType1Return" type="tns2:string"/> > </sequence> > </complexType> > </element> > <element name="syncType2"> > <complexType> > <sequence> > <element name="in0" type="tns2:string"/> > </sequence> > </complexType> > </element> > <element name="syncType2Response"> > <complexType> > <sequence> > <element name="syncType2Return" type="tns2:string"/> > </sequence> > </complexType> > </element> > </schema> > </wsdl:types> > <wsdl:message name="syncType2Response"> > <wsdl:part element="impl:syncType2Response" name="parameters"/> > </wsdl:message> > <wsdl:message name="syncType2Request"> > <wsdl:part element="impl:syncType2" name="parameters"/> > </wsdl:message> > <wsdl:message name="syncType1Response"> > <wsdl:part element="impl:syncType1Response" name="parameters"/> > </wsdl:message> > <wsdl:message name="syncType1Request"> > <wsdl:part element="impl:syncType1" name="parameters"/> > </wsdl:message> > <wsdl:portType name="SAPSync"> > <wsdl:operation name="syncType1"> > <wsdl:input message="impl:syncType1Request" > name="syncType1Request"/> > <wsdl:output message="impl:syncType1Response" > name="syncType1Response"/> > </wsdl:operation> > <wsdl:operation name="syncType2"> > <wsdl:input message="impl:syncType2Request" > name="syncType2Request"/> > <wsdl:output message="impl:syncType2Response" > name="syncType2Response"/> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="SAPSyncSoapBinding" type="impl:SAPSync"> > <wsdlsoap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="syncType1"> > <wsdlsoap:operation soapAction=""/> > <wsdl:input name="syncType1Request"> > <wsdlsoap:body use="literal"/> > </wsdl:input> > <wsdl:output name="syncType1Response"> > <wsdlsoap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="syncType2"> > <wsdlsoap:operation soapAction=""/> > <wsdl:input name="syncType2Request"> > <wsdlsoap:body use="literal"/> > </wsdl:input> > <wsdl:output name="syncType2Response"> > <wsdlsoap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="SAPSyncService"> > <wsdl:port binding="impl:SAPSyncSoapBinding" name="SAPSync"> > <wsdlsoap:address > location="http://localhost:8080/axis/services/SAPSync"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > Which looks to be fine. > > Then I called the WSDL2Java like: > rmdir /S .\src\service\com > > java org.apache.axis.wsdl.WSDL2Java -o "./src/service" -d Session -s -S > true -N"http://www.bog.com/wsdl" com.bog.sync.ws SAPSync.wsdl > > Compile and deploy with the admin tool: > java org.apache.axis.client.AdminClient deploy.wsdd > > And when I reboot Tomcat, I get the following autogenerated wsdl: > <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions targetNamespace="http://www.bog.com/wsdl" > xmlns:apachesoap="http://xml.apache.org/xml-soap" > xmlns:impl="http://www.bog.com/wsdl" xmlns:intf="http://www.bog.com/wsdl" > xmlns:tns1="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <!--WSDL created by Apache Axis version: 1.2RC3 > Built on Feb 17, 2005 (12:11:12 PST)--> > <wsdl:types> > <schema elementFormDefault="qualified" > targetNamespace="http://www.bog.com/wsdl" > xmlns="http://www.w3.org/2001/XMLSchema"> > <element name="syncType1"> > <complexType> > <sequence> > <element name=">syncType1>in0" type="tns1:string"/> > </sequence> > </complexType> > </element> > <element name="syncType1Response"> > <complexType> > <sequence> > <element name="syncType1Return" type="tns1:string"/> > </sequence> > </complexType> > </element> > <element name="syncType2"> > <complexType> > <sequence> > <element name=">syncType2>in0" type="tns1:string"/> > </sequence> > </complexType> > </element> > <element name="syncType2Response"> > <complexType> > <sequence> > <element name="syncType2Return" type="tns1:string"/> > </sequence> > </complexType> > </element> > </schema> > </wsdl:types> > <wsdl:message name="syncType2Response"> > <wsdl:part element="impl:syncType2Response" name="parameters"/> > </wsdl:message> > <wsdl:message name="syncType2Request"> > <wsdl:part element="impl:syncType2" name="parameters"/> > </wsdl:message> > <wsdl:message name="syncType1Response"> > <wsdl:part element="impl:syncType1Response" name="parameters"/> > </wsdl:message> > <wsdl:message name="syncType1Request"> > <wsdl:part element="impl:syncType1" name="parameters"/> > </wsdl:message> > <wsdl:portType name="SAPSync"> > <wsdl:operation name="syncType1"> > <wsdl:input message="impl:syncType1Request" > name="syncType1Request"/> > <wsdl:output message="impl:syncType1Response" > name="syncType1Response"/> > </wsdl:operation> > <wsdl:operation name="syncType2"> > <wsdl:input message="impl:syncType2Request" > name="syncType2Request"/> > <wsdl:output message="impl:syncType2Response" > name="syncType2Response"/> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="SAPSyncSoapBinding" type="impl:SAPSync"> > <wsdlsoap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="syncType1"> > <wsdlsoap:operation soapAction=""/> > <wsdl:input name="syncType1Request"> > <wsdlsoap:body use="literal"/> > </wsdl:input> > <wsdl:output name="syncType1Response"> > <wsdlsoap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="syncType2"> > <wsdlsoap:operation soapAction=""/> > <wsdl:input name="syncType2Request"> > <wsdlsoap:body use="literal"/> > </wsdl:input> > <wsdl:output name="syncType2Response"> > <wsdlsoap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="SAPSyncService"> > <wsdl:port binding="impl:SAPSyncSoapBinding" name="SAPSync"> > <wsdlsoap:address > location="http://localhost:8080/axis/services/SAPSync"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > As you can see, when Axis autogenerates the WSDL while running it puts > > in the element name. A test Java client doesn't seem to mind, but this is > definetly completely incorrect according to MS.NET (.NET does not allow > >/</et al. in an attribute name!). > > How do I go about correcting the issue? > >