Scenario :
The exception - NoSuchMethodException occurs if the setter or the getter method does not present in classes created during the WSDL skeleton or the client generation.
public class ElectronicAddressRequest {
protected List<ElectronicAddressSO> electronicAddress;
public List<ElectronicAddressSO> getElectronicAddress() {
if (electronicAddress == null) {
electronicAddress = new ArrayList<ElectronicAddressSO>();
}
return this.electronicAddress;
}
Here is what the ElectronicAddressSO class looks like below :
public class ElectronicAddressSO {
protected String electronicAddress;
protected String electronicAddressType;
public String getElectronicAddress() {
return electronicAddress;
}
public void setElectronicAddress(String value) {
this.electronicAddress = value;
}
public String getElectronicAddressType() {
return electronicAddressType;
}
public void setElectronicAddressType(String value) {
this.electronicAddressType = value;
}
}
In the above code, the setter method is not created for the ElectronicAddressRequest if you use the wsdl2j tool to create the skeleton.
Error :
When you try to run the application you will get the error below.
weblogic.wsee.jaxws.framework.policy.advertisementimpl.AdvertisementHelperImpl registerExtension
WARNING: Registering oracle.j2ee.ws.wsdl.extensions.addressing.AddressingExtensionRegistry extension failed; java.lang.NoSuchMethodException: oracle.j2ee.ws.wsdl.extensions.addressing.AddressingExtensionRegistry.registerSerializersAndTypes(com.ibm.wsdl.extensions.PopulatedExtensionRegistry)
Mar 11, 2015 12:22:12 PM weblogic.wsee.jaxws.spi.WLSServiceDelegate addWsdlDefinitionFeature
SEVERE: Failed to create WsdlDefinitionFeature for wsdl location: http://rmv-eap-spr-d11.ddc.dot.state.ma.us:57453/MARMV_MainFrame_Provider/LicenseUpdateService?wsdl, error: com.sun.xml.ws.wsdl.parser.InaccessibleWSDLException, message: 2 counts of InaccessibleWSDLException.
Solution :
In order to handle this error, add the method below in the ElectronicAddressRequest class :
public void setElectronicAddress(ElectronicAddressSO oElectronicAddressSO) {
if (null != electronicAddress) {
electronicAddress.add(oElectronicAddressSO);
} else {
List<ElectronicAddressSO> listContactInformation = new ArrayList<ElectronicAddressSO>();
listContactInformation.add(oElectronicAddressSO);
this.electronicAddress = listContactInformation;
}
}
DronaBlog
Subscribe to:
Post Comments (Atom)
Understanding Survivorship in Informatica IDMC - Customer 360 SaaS
In Informatica IDMC - Customer 360 SaaS, survivorship is a critical concept that determines which data from multiple sources should be ret...
-
Are you working on a project where the oracle database is being used for implementation? Are you also facing an ORA-00604 and looking for f...
-
Are you looking for how to fix the error - "ORA-12801: error signaled in parallel query server P00D" in Oracle? Are you also inte...
-
Purpose of the CleansePut API: The CleansePut API is used to insert or update a record into a base or dependent child base object ...
I use the jdk tool wsimport generate webService client code, and when I run the first line " MyService server = new MyService();" I had the same problem! But I do not understand what are ElectronicAddressRequest class and ElectronicAddressSO class mean...
ReplyDeleteThese are classes generated by wsimport tool as per custom definition
Delete