You need to set fullpath file name, axis doesn't use relative path for this
case.
there are such code snippet in axis source codes,

WSDDService.java
 public WSDDService(Element e){
        ...
        Element wsdlElem = getChildElement(e, ELEM_WSDD_WSDLFILE);
        if (wsdlElem != null) {
            String fileName = XMLUtils.getChildCharacterData(wsdlElem);
            desc.setWSDLFile(fileName);
        }
        ...
}

SOAPService.java
    public void generateWSDL(MessageContext msgContext) throws AxisFault {
        if (serviceDescription == null ||
                serviceDescription.getWSDLFile() == null) {
            super.generateWSDL(msgContext);
            return;
        }

        // Got a WSDL file in the service description, so try and read it
        try {
            Document doc = XMLUtils.newDocument(
                    new FileInputStream(serviceDescription.getWSDLFile()));
            msgContext.setProperty("WSDL", doc);
        } catch (Exception e) {
            throw AxisFault.makeFault(e);
        }
    }

This is better fixed by Axis development group . :-)

Weicheng

----- Original Message -----
From: "Kevin Jones" <[EMAIL PROTECTED]>
To: "Axis User" <[EMAIL PROTECTED]>
Sent: Saturday, December 21, 2002 8:33 AM
Subject: Re: Returning my own WSDL from ?wsdl


> This works, but only for a given value of works!
>
> I want the WSDL to be part of my web app, so I've added
>
> <wsdlFile>MathService.wsdl</wsdlFile>
>
> to my wsdd file.
>
> I've put the MathService.wsdl file in every directory in the webapp but
> I get the 'Unable to find WSDL file' fault.
>
> So how do I reference the wsdl that's part of the application?
>
> Kevin Jones
>
> On Fri, 2002-12-20 at 19:38, Weicheng Peng wrote:
> > try this
> > just add   <wsdlFile>c:/xmloutput.wsdl</wsdlFile> into service in wsdd.
> >
> >  <service name="xmloutput" provider="java:RPC">
> >   <operation name="xmloutput" qname="xmloutput"
> > returnQName="xmloutputResponse" returnType="ns1:XmloutputResponse"
> > xmlns:ns1="xmloutput">
> >    <parameter name="macroname" type="xsd:string"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
> >    <parameter name="item1" type="xsd:double"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
> >   </operation>
> >   <parameter name="allowedMethods" value="xmloutput"/>
> >   <parameter name="wsdlPortType" value="xmloutputPortType"/>
> >   <parameter name="className"
value="xmloutput.XmloutputBindingTypeImpl"/>
> >   <parameter name="wsdlServicePort" value="xmloutput"/>
> >   <parameter name="wsdlTargetNamespace" value="xmloutput"/>
> >   <parameter name="wsdlServiceElement" value="xmloutput"/>
> >   <typeMapping
> > deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> > qname="ns2:ListItemType"
> > serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> > type="java:xmloutput.ListItemType" xmlns:ns2="xmloutput"/>
> >   <typeMapping
> > deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
qname="ns3:List"
> > serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> > type="java:xmloutput.ListItemType[]" xmlns:ns3="xmloutput"/>
> >   <typeMapping
> > deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
qname="ns4:Item1"
> > serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> > type="java:double[]" xmlns:ns4="xmloutput"/>
> >   <typeMapping
> > deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> > qname="ns5:XmloutputEnd"
> > serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> > type="java:xmloutput.XmloutputEnd" xmlns:ns5="xmloutput"/>
> >   <typeMapping
> > deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> > qname="ns6:XmloutputResponse"
> > serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> > type="java:xmloutput.XmloutputResponse" xmlns:ns6="xmloutput"/>
> >   <wsdlFile>c:/xmloutput.wsdl</wsdlFile>
> >  </service>
> >
> > Weiceheng
> >
> > ----- Original Message -----
> > From: "Kevin Jones" <[EMAIL PROTECTED]>
> > To: "Axis User" <[EMAIL PROTECTED]>
> > Sent: Friday, December 20, 2002 9:16 AM
> > Subject: Returning my own WSDL from ?wsdl
> >
> >
> > > After I've created and deployed a web service is there ant way to get
> > > Axis to turn off automatic WSDL generation when it sees the ?wsdl
> > > parameter and instead get it to return wsdl that i deploy with the
> > > service?
> > >
> > > Thanks,
> > >
> > > Kevin Jones
> >

Reply via email to