Changing WSDL = recreate axis java client?

Hello,
I’m providing a set of web services with IS; I had to modify on of them to include two additional response fields.

After that, java client (generated with axis) stops working reporting

org.xml.sax.SAXException: Invalid element in com.webMethods.www.__outputJobInfo - DESCRIPTION

where “DESCRIPTION” is the first additional field.

did anyone already face this problem? How would I solve it? I thought clients would be indipendent to web services output values, if that change only involve additional fields (i.e., not modify existing one).

It’s infeasible (to us) to advert everyone that uses our services or redistribute the java client to anyone using it.

Thanks in advance for your help.

Regards,
Sandro

Issue with web services clients blowing up if WSDL changes

1) An error occurs because a mapping does not exist between an entry in the WSDL document and your client class. Modifying the client class as follows will prevent this error from being thrown.

Here’s what I had to do to fix the issue:

1) Note: This is a one time step – no need to repeat - Create a class that extends org.apache.axis.encoding.ser.BeanDeserializer.
a) Create constructors that basically pass the parameters to the super class.
b) Override the following method as follows:
[FONT=Georgia]

 
[FONT=Georgia]            @Override[/font]
[FONT=Georgia]            public SOAPHandler onStartChild(String arg0, String arg1, String arg2, Attributes arg3, DeserializationContext arg4) throws SAXException {[/font]
[FONT=Georgia]                        // TODO Auto-generated method stub[/font]
[FONT=Georgia]                        try{[/font]
[FONT=Georgia]                                    return super.onStartChild(arg0, arg1, arg2, arg3, arg4);[/font]
[FONT=Georgia]                        }catch (SAXException e){[/font]
[FONT=Georgia]                                    return null;[/font]
[FONT=Georgia]                        }[/font]
[FONT=Georgia]            }[/font]

[/FONT]

2) Find the object that is being returned from the web service - (client class).
a) Override the following method as follows:
[FONT=Georgia]

 
[FONT=Georgia]    /**[/font]
[FONT=Georgia]     * Get Custom Deserializer[/font]
[FONT=Georgia]     */[/font]
[FONT=Georgia]    public static org.apache.axis.encoding.Deserializer getDeserializer([/font]
[FONT=Georgia]           java.lang.String mechType, [/font]
[FONT=Georgia]           java.lang.Class _javaType,  [/font]
[FONT=Georgia]           javax.xml.namespace.QName _xmlType) {[/font]
[FONT=Georgia]            [/font]
[FONT=Georgia]// class from step #1[/font]
[FONT=Georgia]BigYDeserializer d = new BigYDeserializer(_javaType, _xmlType, typeDesc);[/font]
[FONT=Georgia]            d.setSilenceOnStartChildExceptions(true);[/font]
[FONT=Georgia]            return d;         [/font]
[FONT=Georgia] [/font]
[FONT=Georgia]        //new  org.apache.axis.encoding.ser.BeanDeserializer([/font]
[FONT=Georgia]          //  _javaType, _xmlType, typeDesc);[/font]
[FONT=Georgia]    }[/font]

[/FONT]