Yes, This is already entered as a bug.
http://issues.apache.org/jira/browse/AXIS-2235 This seems pretty critical to me, since the generated WSDL is invalid and therefore unusable. On 11/9/05, Dovholuk, Clint <[EMAIL PROTECTED]> wrote: > > fyi, i've already filed a bug on this. i went looking for the link, but jira > is really slow... will post when jira responds... > > > ________________________________ > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 09, 2005 11:59 AM > To: [email protected] > Subject: Re: Encountered illegal extension element 'types' in the context of > a 'javax.wsdl.Definition'. Extension elements must be in a namespace other > than WSDL's.: > > > Please file a bug report. > > > On 11/9/05, Paul Barry <[EMAIL PROTECTED]> wrote: > > Still having this problem ,wondering if anyone can help me out. All > > the details are below, but basically I have created a very simple web > > service and it seems to work fine, but when I go to this url: > > > > http://localhost/axis/services/MyService?wsdl > > > > In the WSDL that is returned, the <types> element doesn't have the > > wsdl namespace that it needs to have. I should be <wsdl:types>. How > > do I get axis to generate a WSDL with <wsdl:types> instead of <types>. > > This is axis 1.2.1 with JDK 1.5. > > > > On 10/29/05, Paul Barry <[EMAIL PROTECTED]> wrote: > > > The WSDL is generated by axis. It comes from me going to: > > > > > > http://localhost/axis/services/MyService?wsdl > > > > > > How do I get axis to generate it with wsdl:types instead of just types? > > > > > > On 10/28/05, Anne Thomas Manes < [EMAIL PROTECTED]> wrote: > > > > You must namespace qualify the element: > > > > > > > > <wsdl:types> > > > > > > > > not > > > > > > > > <types> > > > > > > > > Anne > > > > > > > > > > > > On 10/27/05, Paul Barry <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > > > > > > > > > I am trying to run wsdl2java against my WSDL, but I am getting this > error: > > > > > > > > > > WSDLException (at /wsdl:definitions/types): faultCode=INVALID_WSDL: > > > > > Encountered illegal extension element 'types' in the context of a > > > > > 'javax.wsdl.Definition'. Extension elements must be in a namespace > > > > > other than WSDL's.: > > > > > at > > > > > com.ibm.wsdl.xml.WSDLReaderImpl.parseExtensibilityElement(Unknown > > > > Source) > > > > > at > com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions > > > > (Unknown Source) > > > > > at > com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown > > > > Source) > > > > > at > com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown > > > > Source) > > > > > at > com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown > > > > Source) > > > > > at > > > > > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516) > > > > > at > > > > > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495) > > > > > at > org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run > > > > (Parser.java:361) > > > > > at java.lang.Thread.run(Unknown Source) > > > > > > > > > > Any idea what causes this problem? I am using a very basic service > > > > > and the WSDL is generated by axis. Here is my WSDL: > > > > > > > > > > <?xml version=" 1.0" encoding="UTF-8"?> > > > > > <wsdl:definitions > > > > > xmlns:impl=" > http://localhost/axis/services/MyService" > > > > > xmlns:intf=" > http://localhost/axis/services/MyService" > > > > > xmlns:apachesoap=" http://xml.apache.org/xml-soap" > > > > > xmlns:wsdlsoap=" > http://schemas.xmlsoap.org/wsdl/soap/" > > > > > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > > > > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema " > > > > > xmlns:tns1="urn:MyService" > > > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > > > > > targetNamespace=" > > > > http://localhost/axis/services/MyService"> > > > > > <!--WSDL created by Apache Axis version: 1.2.1 > > > > > Built on Jun 14, 2005 (09:15:57 EDT)--> > > > > > <types> > > > > > <schema xmlns=" http://www.w3.org/2001/XMLSchema" > > > > > targetNamespace="urn:MyService"> > > > > > <import > > > > > namespace="http://schemas.xmlsoap.org/soap/encoding/"/ > > > > > > <complexType name="MyBean"> > > > > > <sequence> > > > > > <element name="name" nillable="true" type="xsd:string"/> > > > > > </sequence> > > > > > > > > > > </complexType> > > > > > </schema> > > > > > </types> > > > > > > > > > > <wsdl:message name="getMyBeanResponse"> > > > > > > > > > > <wsdl:part name="getMyBeanReturn" type="tns1:MyBean"/> > > > > > > > > > > </wsdl:message> > > > > > > > > > > <wsdl:message name="getMyBeanRequest"> > > > > > > > > > > </wsdl:message> > > > > > > > > > > <wsdl:portType name="MyService"> > > > > > > > > > > <wsdl:operation name="getMyBean"> > > > > > > > > > > <wsdl:input name="getMyBeanRequest" > > > > message="impl:getMyBeanRequest"/> > > > > > > > > > > <wsdl:output name="getMyBeanResponse" > > > > > message="impl:getMyBeanResponse"/> > > > > > > > > > > </wsdl:operation> > > > > > > > > > > </wsdl:portType> > > > > > > > > > > <wsdl:binding name="MyServiceSoapBinding" type="impl:MyService"> > > > > > > > > > > <wsdlsoap:binding style="rpc" > > > > > transport="http://schemas.xmlsoap.org/soap/http"/ > > > > > > > > > > > <wsdl:operation name="getMyBean"> > > > > > > > > > > <wsdlsoap:operation soapAction=""/> > > > > > > > > > > <wsdl:input name="getMyBeanRequest"> > > > > > > > > > > <wsdlsoap:body use="encoded" > > > > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ > > > > " > > > > > namespace="http://paulbarry.com"/> > > > > > > > > > > </wsdl:input> > > > > > > > > > > <wsdl:output name="getMyBeanResponse"> > > > > > > > > > > <wsdlsoap:body use="encoded" > > > > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ " > > > > > > namespace="http://localhost/axis/services/MyService"/ > > > > > > > > > > > </wsdl:output> > > > > > > > > > > </wsdl:operation> > > > > > > > > > > </wsdl:binding> > > > > > > > > > > <wsdl:service name="MyServiceService"> > > > > > > > > > > <wsdl:port name="MyService" > > > > binding="impl:MyServiceSoapBinding"> > > > > > > > > > > <wsdlsoap:address > > > > location=" > http://localhost/axis/services/MyService"/> > > > > > > > > > > </wsdl:port> > > > > > > > > > > </wsdl:service> > > > > > > > > > > </wsdl:definitions> > > > > > > > > > > The classes involved are very basic. I have this bean: > > > > > > > > > > package com.paulbarry; > > > > > > > > > > public class MyBean { > > > > > > > > > > private String name; > > > > > > > > > > public MyBean() {} > > > > > public MyBean(String name) { > > > > > this.name = name; > > > > > } > > > > > > > > > > public String getName() { > > > > > return name; > > > > > } > > > > > > > > > > public void setName(String name) { > > > > > this.name = name; > > > > > } > > > > > > > > > > > > > > > } > > > > > > > > > > And this service: > > > > > > > > > > package com.paulbarry; > > > > > > > > > > public class MyService { > > > > > > > > > > public MyBean getMyBean() { > > > > > return new MyBean("My Bean"); > > > > > } > > > > > > > > > > } > > > > > > > > > > I have this client, which works perfectly fine: > > > > > > > > > > package com.paulbarry; > > > > > > > > > > import javax.xml.namespace.QName; > > > > > > > > > > import org.apache.axis.client.Call; > > > > > import org.apache.axis.client.Service ; > > > > > import > > > > org.apache.axis.encoding.ser.BeanDeserializerFactory; > > > > > import > > > > org.apache.axis.encoding.ser.BeanSerializerFactory; > > > > > > > > > > public class MyClient { > > > > > > > > > > public static void main(String[] args) throws Exception { > > > > > > > > > > String endpoint = > > > > > " > http://localhost/axis/services/MyService"; > > > > > > > > > > Service service = new Service(); > > > > > Call call = (Call)service.createCall(); > > > > > > > > > > call.setTargetEndpointAddress( new java.net.URL(endpoint) ); > > > > > call.setOperationName(new QName("getMyBean") ); > > > > > > > > > > QName qn = new > QName("urn:MyService","MyBean"); > > > > > call.registerTypeMapping(MyBean.class, qn, > > > > > new BeanSerializerFactory(MyBean.class, qn), > > > > > new BeanDeserializerFactory(MyBean.class, qn)); > > > > > call.setReturnType(qn); > > > > > > > > > > MyBean bean = (MyBean)call.invoke(new Object[] {}); > > > > > > > > > > System.out.println(bean.getName()); > > > > > > > > > > } > > > > > > > > > > } > > > > > > > > > > And here is my deployment descriptor: > > > > > > > > > > <deployment xmlns=" > http://xml.apache.org/axis/wsdd/ " > > > > > > > > > > xmlns:java="http://xml.apache.org/axis/wsdd/providers/java > "> > > > > > > > > > > <service name="MyService" provider="java:RPC"> > > > > > <parameter name="className" value="com.paulbarry.MyService "/> > > > > > <parameter name="allowedMethods" value="*"/> > > > > > <beanMapping qname="myNS:MyBean" xmlns:myNS="urn:MyService" > > > > > languageSpecificType="java: com.paulbarry.MyBean"/> > > > > > </service> > > > > > > > > > > </deployment> > > > > > > > > > > > > > > > > > > > >
