You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Aleš Staňko <st...@seznam.cz> on 2013/10/10 11:05:06 UTC
Axis2 - Change of package of exception change its name in WSDL and throws ADBException
Hi
We upgrade from Axis2 version 1.5.4. to newest 1.6.2. I use java.
In old java codes , we used for methods to throw old org.apache.soap.
SOAPException(http://org.apache.soap.SOAPException) it was newly changed to
javax.xml.soap.SOAPException(http://javax.xml.soap.SOAPException).
But newly created WSDL is a bit different and there is new exception
"Service name + SOAPException" : TRServiceSOAPException.
Why it generated this "Service name + SOAPException".
I also generated stubs and write some jUnit test code, but when method throw
some exception, I got:
org.apache.axis2.databinding.ADBException
(http://org.apache.axis2.databinding.ADBException): Can not invoke the
getTypeObject method in the extension mapper class
How to fix it? Or how to generate java classes?
If I use for generating stubs wsdl2java.bat -uri http://%SOAP_ADDRESS%/axis
2/services/TRService?wsdl -o %CURRENT_DIR%/ --noBuildXML -or
Big problem for me is for me now that ADBException.
Old generated WSDL:
<wsdl:types>
<xs:schema xmlns:ax254="http://service.soapaxis.mh.ericsson.com
(http://service.soapaxis.mh.ericsson.com)" attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://soap.apache.org/xsd
(http://soap.apache.org/xsd)">
<xs:import namespace="http://service.soapaxis.mh.ericsson.com"/
(http://service.soapaxis.mh.ericsson.com%22/)>
<xs:complexType name="SOAPException">
<xs:complexContent>
<xs:extension base="ax254:Exception">
<xs:sequence>
<xs:element minOccurs="0" name="faultCode"
nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="message"
nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="rootException"
nillable="true" type="xs:anyType"/>
<xs:element minOccurs="0" name="targetException"
nillable="true" type="xs:anyType"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
Newly generated WSDL:
<wsdl:types>
<xs:schema xmlns:ax22="http://data.tr.soapaxis.mh.ericsson.com/xsd
(http://data.tr.soapaxis.mh.ericsson.com/xsd)" attributeFormDefault=
"qualified" elementFormDefault="qualified" targetNamespace="http://service.
soapaxis.mh.ericsson.com(http://service.soapaxis.mh.ericsson.com)">
<xs:import namespace="http://data.tr.soapaxis.mh.ericsson.com/
xsd"/(http://data.tr.soapaxis.mh.ericsson.com/xsd%22/)>
<xs:element name="TRServiceSOAPException">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="SOAPException"
nillable="true" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Thanks for help
Ales