They said the current Axis2 is based on Java 1.4 which doesn't have the enum 
type definition.
I was told that this will be fixed in the next release (I am not sure if that 
was an official answer or not).

For creating WSDL, look at the code (WSDLDataLocator.java) in Axis2 source.
Here is what I do.
Instead of inventing WSDL creator, create your own data locator "extended" from 
WSDLDataLocator.
In outputInlineForm, get the result (OMElemet) from the parent and make changes 
there.

 protected Data[] outputInlineForm(MessageContext msgContext, ServiceData[] 
dataList)
            throws DataRetrievalException {
        Data[] result = super.outputInlineForm(msgContext, dataList);
        
        if (null != result && null != result[0]) {
                OMElement wsdlElement = (OMElement)result[0].getData();
                this.generateCustomWSDL(wsdlElement); // call your own function
                result[0] = new Data(wsdlElement, null);                
        }
        
        return result;
    }


Then, add datalocator in service.xml

<service name="api">
                <description>Some API</description>
                
                <messageReceivers>
                        <messageReceiver
                                mep="http://www.w3.org/2004/08/wsdl/in-only";
                                
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
                        <messageReceiver 
mep="http://www.w3.org/2004/08/wsdl/in-out";
                                
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
                </messageReceivers>

                <parameter name="ServiceClass" locked="false">
                        YOUR_SERVICE_CLASS
                </parameter>
                
                <dataLocator>
                        <dialectLocator 
dialect="http://schemas.xmlsoap.org/wsdl/";
                                class="YOUR_DATA_LOCATOR_CLASS" />
                </dataLocator>
</service>

Hope this helps.

- Leon

Mathias P.W Nilsson wrote:
I don't quit get the response. I don't generate the wsdl myself. Axis2
servlet does that I suppose. In my method I should return int instead?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to