Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Changing WSDL = recreate axis java client?

Reply
Thread Tools

Changing WSDL = recreate axis java client?

 
 
BrandonBlais@gmail.com
Guest
Posts: n/a
 
      08-28-2007
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);
}

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing WSDL = recreate axis java client? matrixhasu Java 3 05-01-2012 05:14 AM
How do you transparently implement the same web service (WSDL) with java axis and .NET ? tomjbr.10216233@bloglines.com ASP .Net Web Services 13 05-12-2005 10:19 AM
How do you transparently implement the same web service (WSDL) with java axis and .NET ? tomjbr.10216233@bloglines.com Java 0 05-10-2005 12:26 AM
AXIS jars org.apache.axis.wsi.* and org.apache.axis.transport.jms.* unkwb@web.de Java 0 02-23-2005 04:02 PM
axis.jar does not contain org.apache.axis.client.ServiceClient? Joey Vendetta Java 0 04-01-2004 05:51 PM



Advertisments