Changing WSDL = recreate axis java client?

Discussion in 'Java' started by BrandonBlais@gmail.com, Aug 28, 2007.

  1. Guest

    Hi all,

    This is in response to the posting I've seen regarding AXIS and web
    services client libaries blowing up when a WSDL document changes.

    Basically the 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) 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:
    @Override
    public SOAPHandler onStartChild(String arg0, String arg1, String
    arg2, Attributes arg3, DeserializationContext arg4) throws
    SAXException {
    // TODO Auto-generated method stub
    try{
    return super.onStartChild(arg0, arg1, arg2, arg3, arg4);
    }catch (SAXException e){
    return null;
    }
    }
    2) Find the object that is being returned from the web service -
    (client class).
    a) Override the following method as follows:
    /**
    * Get Custom Deserializer
    */
    public static org.apache.axis.encoding.Deserializer
    getDeserializer(
    java.lang.String mechType,
    java.lang.Class _javaType,
    javax.xml.namespace.QName _xmlType) {
    return new BigYDeserializer(_javaType, _xmlType, typeDesc);

    //new org.apache.axis.encoding.ser.BeanDeserializer(
    // _javaType, _xmlType, typeDesc);
    }
    , Aug 28, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joey Vendetta
    Replies:
    0
    Views:
    3,448
    Joey Vendetta
    Apr 1, 2004
  2. Replies:
    0
    Views:
    921
  3. Replies:
    0
    Views:
    415
  4. matrixhasu
    Replies:
    3
    Views:
    1,557
  5. mohd.muzeeb
    Replies:
    0
    Views:
    455
    mohd.muzeeb
    Feb 21, 2011
Loading...

Share This Page