The <wsdl:definitions> statement should contain a bunch of namespace
declarations, including wsdl, wsdlsoap, xsd, impl, and tns2, at the very
least.

I suggest you use a later build. This bug was fixed a long time ago.

Anne

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 25, 2004 10:13 AM
To: [EMAIL PROTECTED]
Subject: Re: Axis generates an undefined namespace in the generated WSDL?

Could someone at least tell me if it's a stupid question?
I've looked all through the mailing list archives, but although I find 
examples of "tns1" and "tns2" they too are never properly defined in the 
namespace.
How are they supposed to be resolved?
In case it helps, here is my entire generated wsdl. It will illustrate 
better how the Axis wsdl has a missing namespace.

    <wsdl:definitions targetNamespace="urn:email.services">
    <!--WSDL created by Apache Axis version: 1.2alpha
Built on Dec 01, 2003 (04:33:24 EST)-->

    <wsdl:types>

    <schema targetNamespace="urn:email.services">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

    <complexType name="EmailResult">

    <sequence>
<element name="Status" nillable="true" type="tns2:string"/>
</sequence>
</complexType>
</schema>
</wsdl:types>

    <wsdl:message name="SendRequest">
<wsdl:part name="To" type="xsd:string"/>
<wsdl:part name="From" type="xsd:string"/>
<wsdl:part name="Cc" type="xsd:string"/>
<wsdl:part name="Bcc" type="xsd:string"/>
<wsdl:part name="Subject" type="xsd:string"/>
<wsdl:part name="Body" type="xsd:string"/>
<wsdl:part name="Attachment" type="xsd:string"/>
</wsdl:message>

    <wsdl:message name="SendResponse">
<wsdl:part name="Result" type="impl:EmailResult"/>
</wsdl:message>

    <wsdl:portType name="Email">

    <wsdl:operation name="send" parameterOrder="To From Cc Bcc Subject 
Body Attachment">
<wsdl:input message="impl:SendRequest" name="SendRequest"/>
<wsdl:output message="impl:SendResponse" name="SendResponse"/>
</wsdl:operation>
</wsdl:portType>

    <wsdl:binding name="EmailSoapBinding" type="impl:Email">
<wsdlsoap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>

    <wsdl:operation name="send">
<wsdlsoap:operation soapAction=""/>

    <wsdl:input name="SendRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:email.services/binding" use="encoded"/>
</wsdl:input>

    <wsdl:output name="SendResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:email.services" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>

    <wsdl:service name="EmailService">

    <wsdl:port binding="impl:EmailSoapBinding" name="Email">
<wsdlsoap:address location="http://localhost:8080/email/services/Email"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

> Hi all,
>
> I use wsdl2java to create my stubs, but the generated wsdl for my web 
> service contains an undefined namespace "tns1", which obviously blows 
> up my web service client software.
> Does anyone know what I'm doing wrong, or if this is a known issue in 
> Axis?
>
> I'd really appreciate any information to sort this problem out.
>
> Here is the Axis generated wsdl fragment :
> ...
> <wsdl:types>
>    <schema targetNamespace="urn:email.services">
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>    <complexType name="EmailResult">
>    <sequence>
> <element name="Status" nillable="true" type="tns1:string"/>
> </sequence>
> </complexType>
> </schema>
> ...
>
>
> Here is the original wsdl fragment :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions
>    targetNamespace="urn:email.services"
>        xmlns         = "http://schemas.xmlsoap.org/wsdl/";
>        xmlns:xsd     = "http://www.w3.org/2001/XMLSchema";
>        xmlns:soap    = "http://schemas.xmlsoap.org/wsdl/soap/";
>        xmlns:tns     = "urn:email.services">
>
>    <types>
>        <xsd:schema>
>        <xsd:complexType name="EmailResult">
>                    <xsd:all>
>                        <xsd:element name="Status" type="xsd:string"/>
>                </xsd:all>
>        </xsd:complexType>
>        </xsd:schema>
>    </types>
> ...
>
>
>
> Many thanks
> wh
>
>

Reply via email to