Please pose to JIRA? Either the schema is correct due to qualification issues and the errors are wrong, or (as you suggest) visa versa. Either way, we've got trouble.
On Sun, Dec 7, 2008 at 4:23 PM, Derek Adams <[EMAIL PROTECTED]> wrote: > Sorry for the formatting problems. Let me try that again: > > <wsdl:definitions xmlns="http://example.org/math/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > xmlns:y="http://example.org/math/" > xmlns:type="http://example.org/math/types/" > targetNamespace="http://example.org/math/"> > <wsdl:types> > <xs:schema xmlns="http://example.org/math/types/" > targetNamespace="http://example.org/math/types/"> > <xs:complexType name="MathInput"> > <xs:sequence> > <xs:element name="x" type="xs:double" /> > <xs:element name="z" type="xs:double" /> > </xs:sequence> > </xs:complexType> > <xs:complexType name="MathOutput"> > <xs:sequence> > <xs:element name="result" type="xs:double" /> > </xs:sequence> > </xs:complexType> > <xs:element name="Add" type="type:MathInput" /> > <xs:element name="AddResponse" type="type:MathOutput" /> > <xs:element name="Subtract" type="type:MathInput" /> > <xs:element name="SubtractResponse" type="type:MathOutput" /> > </xs:schema> > </wsdl:types> > <wsdl:message name="AddMessage"> > <wsdl:part name="parameters" element="type:Add" /> > </wsdl:message> > <wsdl:message name="AddResponseMessage"> > <wsdl:part name="parameters" element="type:AddResponse" /> > </wsdl:message> > <wsdl:message name="SubtractMessage"> > <wsdl:part name="parameters" element="type:Subtract" /> > </wsdl:message> > <wsdl:message name="SubtractResponseMessage"> > <wsdl:part name="parameters" element="type:SubtractResponse" /> > </wsdl:message> > <wsdl:portType name="MathInterface"> > <wsdl:operation name="Add"> > <wsdl:input message="y:AddMessage" /> > <wsdl:output message="y:AddResponseMessage" /> > </wsdl:operation> > <wsdl:operation name="Subtract"> > <wsdl:input message="y:SubtractMessage" /> > <wsdl:output message="y:SubtractResponseMessage" /> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="MathSoapHttpBinding" type="y:MathInterface"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http" /> > <wsdl:operation name="Add"> > <soap:operation soapAction="http://example.org/math/#Add" /> > <wsdl:input> > <soap:body use="literal" /> > </wsdl:input> > <wsdl:output> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="Subtract"> > <soap:operation soapAction="http://example.org/math/#Subtract" /> > <wsdl:input> > <soap:body use="literal" /> > </wsdl:input> > <wsdl:output> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="MathService"> > <wsdl:port name="MathEndpoint" binding="y:MathSoapHttpBinding"> > <soap:address location="http://localhost/math/math.asmx" /> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > If you run this through java2wsdl, notice that there are no namespaces on the > MathInput and MathOutput elements. > > Thanks, > Derek > > > > ________________________________ > From: Derek Adams <[EMAIL PROTECTED]> > To: [email protected] > Sent: Sunday, December 7, 2008 4:03:54 PM > Subject: Namespace problem in wsdl2java generated classes > > I am having a problem with the WSDL generated from JAX-WS classes that were > originally created from the CXF wsdl2java tool. Basically, I have am writing > tool that allows you to import WSDL to generate JAX-WS interaces, then allows > you to fill in the implementations and deploy to a server. I am using CXF > embedded in Mule, but Mule just defers to the CXF QueryHandler to generate > the WSDL when requested over the endpoint. Here is the WSDL I am using for > testing: > > <wsdl:definitionsxmlns="http://example.org/math/"xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"xmlns:y="http://example.org/math/"xmlns:type="http://example.org/math/types/"targetNamespace="http://example.org/math/"><wsdl:types><xs:schemaxmlns="http://example.org/math/types/"targetNamespace="http://example.org/math/types/"><xs:complexTypename="MathInput"><xs:sequence><xs:elementname="x"type="xs:double"/><xs:elementname="z"type="xs:double"/></xs:sequence></xs:complexType><xs:complexTypename="MathOutput"><xs:sequence><xs:elementname="result"type="xs:double"/></xs:sequence></xs:complexType><xs:elementname="Add"type="type:MathInput"/><xs:elementname="AddResponse"type="type:MathOutput"/><xs:elementname="Subtract"ty > pe="type:MathInput"/><xs:elementname="SubtractResponse"type="type:MathOutput"/></xs:schema></wsdl:types><wsdl:messagename="AddMessage"><wsdl:partname="parameters"element="type:Add"/></wsdl:message><wsdl:messagename="AddResponseMessage"><wsdl:partname="parameters"element="type:AddResponse"/></wsdl:message><wsdl:messagename="SubtractMessage"><wsdl:partname="parameters"element="type:Subtract"/></wsdl:message><wsdl:messagename="SubtractResponseMessage"><wsdl:partname="parameters"element="type:SubtractResponse"/></wsdl:message><wsdl:portTypename="MathInterface"><wsdl:operationname="Add"><wsdl:inputmessage="y:AddMessage"/><wsdl:outputmessage="y:AddResponseMessage"/></wsdl:operation><wsdl:operationname="Subtract"><wsdl:inputmessage="y:SubtractMessage"/><wsdl:outputmessage="y:SubtractResponseMessage"/></wsdl:operation></wsdl:portType><wsdl:bindingname="MathSoapHttpBinding"type="y:MathInterface"><soap:bindingstyle="document"transport="http://schemas.xmlsoap.org/ > soap/http"/><wsdl:operationname="Add"><soap:operationsoapAction="http://example.org/math/#Add"/><wsdl:input><soap:bodyuse="literal"/></wsdl:input><wsdl:output><soap:bodyuse="literal"/></wsdl:output></wsdl:operation><wsdl:operationname="Subtract"><soap:operationsoapAction="http://example.org/math/#Subtract"/><wsdl:input><soap:bodyuse="literal"/></wsdl:input><wsdl:output><soap:bodyuse="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:servicename="MathService"><wsdl:portname="MathEndpoint"binding="y:MathSoapHttpBinding"><soap:addresslocation="http://localhost/math/math.asmx"/></wsdl:port></ > > Everything generates without problems, but there are errors when deployed in > Mule. CXF complains about bad namespaces on deployment indicating that the > namespaces for schema objects are incorrect: > > 14:32:04,606 ERROR [STDERR] Dec 7, 2008 2:32:04 PM > org.apache.cxf.service.factor > y.ReflectionServiceFactoryBean fillInSchemaCrossreferences > SEVERE: Schema element {http://example.org/math/types/}SubtractResponse > referenc > es undefined type MathOutput for service > {http://example.org/math/}MathInterface > Service. > 14:32:04,606 ERROR [STDERR] Dec 7, 2008 2:32:04 PM > org.apache.cxf.service.factor > y.ReflectionServiceFactoryBean fillInSchemaCrossreferences > SEVERE: Schema element {http://example.org/math/types/}Subtract references > undef > ined type MathInput for service > {http://example.org/math/}MathInterfaceService. > 14:32:04,621 ERROR [STDERR] Dec 7, 2008 2:32:04 PM > org.apache.cxf.service.factor > y.ReflectionServiceFactoryBean fillInSchemaCrossreferences > SEVERE: Schema element {http://example.org/math/types/}AddResponse references > un > defined type MathOutput for service > {http://example.org/math/}MathInterfaceServi > ce. > 14:32:04,621 ERROR [STDERR] Dec 7, 2008 2:32:04 PM > org.apache.cxf.service.factor > y.ReflectionServiceFactoryBean fillInSchemaCrossreferences > SEVERE: Schema element {http://example.org/math/types/}Add references > undefined > type MathInput for service {http://example.org/math/}MathInterfaceService. > > When I try to load the WSDL via http://endpoint?wsdl in a tool like SoapUI, I > get errors similar to the ones on deployment. After looking at the annotated > code generated from wsdl2java, I noticed that there is no namespace > declaration on the schema complex types. The elements have the correct > namespace, but they reference the complex types that have no namespace > declarations. Because of this, the generated WSDL splits the elements and > complex types into separate schema sections with different target namespaces. > I am honestly not sure if this is a CXF issue or a CXF-embedded-in-Mule > issue. Has anyone else run into this? > > Thanks, > Derek</wsdl:service>wsdl:definitions> > > >
