'equals ' and 'hashCode ' method is missing in
org.apache.axis2.jaxws.description.impl.FaultDescriptionImpl.class
------------------------------------------------------------------------------------------------------------------
Key: AXIS2-4822
URL: https://issues.apache.org/jira/browse/AXIS2-4822
Project: Axis2
Issue Type: Bug
Components: jaxws
Affects Versions: 1.5.1
Environment: websphere 6.1.23 unix
Reporter: Maryna Zilske
'equals ' and 'hashCode ' method is missing in
org.apache.axis2.jaxws.description.impl.FaultDescriptionImpl.class
The class org.apache.axis2.jaxws.description.impl.
OperationDescriptionImpl.class has an attribute 'faultDescriptions'. This
attribute is an ArrayList of
org.apache.axis2.jaxws.description.impl.FaultDescriptionImpl- objects.
The class
org.apache.axis2.jaxws.runtime.description.marshal.impl.MarshalServiceRuntimeDescriptionImpl
has an attribute 'faultBeanDescMap'. This attribute is a HashMap contended:
key value a org.apache.axis2.jaxws.description.impl.FaultDescriptionImpl
value object an instance of
org.apache.axis2.jaxws.runtime.description.marshal.impl.FaultBeanDescImpl.class
We have a productive runtime NullPointerEception in
org.apache.axis2.jaxws.marshaller.impl.alt MethodMarshallerUtils in the method
demarshalFaultResponse on line
QName tryName = new (faultBeansDesc.getFaultBeanNameSpase ...
because faultBeansDesc is null:
Caused by: javax.xml.ws.WebServiceException: java.lang.NullPointerException
at
org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:180)
at
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:79)
at
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:134)
at
org.apache.axis2.jaxws.marshaller.impl.alt.DocLitBareMethodMarshaller.demarshalFaultResponse(DocLitBareMethodMarshaller.java:372)
at
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.getFaultResponse(JAXWSProxyHandler.java:400)
at
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.createResponse(JAXWSProxyHandler.java:373)
at
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:294)
at
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:147)
at $Proxy30.ermittelnHilfsmittelVertraege(Unknown Source)
at sun.reflect.GeneratedMethodAccessor938.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:416)
at
org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:392)
... 40 more
Caused by: java.lang.NullPointerException
at
org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.demarshalFaultResponse(MethodMarshallerUtils.java:887)
at
org.apache.axis2.jaxws.marshaller.impl.alt.DocLitBareMethodMarshaller.demarshalFaultResponse(DocLitBareMethodMarshaller.java:366)
... 50 more
I switched the log level on axis2.jaxws and see:
[14.09.10 08:18:51:002 CEST] 0000001e DescriptionFa 1
org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl
createServiceDescription Cache Map =
{org.apache.axis2.jaxws.description.description...@b1873327=org.apache.axis2.jaxws.description.impl.servicedescriptionimpl@14881488
ServiceQName: {http://de/}HelloImplService
isWSDLSpecified: true; WSDL Location: file:./WEB-INF/wsdl/HelloImplService.wsdl
WSDL Definition available: true; Generated WSDL Definition available: false
Number of ports: 1
Port QNames: {http://de/}HelloImplPort;
Number of EndpointDescrptions: 1
org.apache.axis2.jaxws.description.impl.endpointdescriptioni...@203c203c
Name: HelloImpl; Endpoint Address:
http://127.0.0.1:9080/FaultTest/HelloImplService
ServiceQName: {http://de/}HelloImplService; PortQName:
{http://de/}HelloImplPort; TargetNamespace: http://de/
Service Mode: null; Binding Type: http://schemas.xmlsoap.org/wsdl/soap/http;
Client Binding Type: http://schemas.xmlsoap.org/wsdl/soap/http
Is provider-based: false; Is proxy-based: true; Is WSDL fully specified: true
AxisService: org.apache.axis2.description.axisserv...@5480548
EndpointInterfaceDescription:
org.apache.axis2.jaxws.description.impl.endpointinterfacedescriptioni...@26a026a
Name: HelloImpl; PortType: {http://de/}HelloImpl
SOAP Style: DOCUMENT; SOAP Use: LITERAL; SOAP Paramater Style: WRAPPED
Number of operations: 1
Operation:
org.apache.axis2.jaxws.description.impl.operationdescriptioni...@2d802d8
Name: sayHelloWorld; Operation Name: sayHelloWorld; Action:
Operation excluded: false; Is oneway: false; Is returning result: true; Is
result header: false; Is JAXWS Client Async method: false
SOAP Style: DOCUMENT; SOAP Use: LITERAL; SOAP Paramater Style: WRAPPED
Result name: return; Result part name: return; Result type: class
java.lang.String; Result actual type: class java.lang.String
Request Wrapper class: de.SayHelloWorld; Response Wrapper class:
de.SayHelloWorldResponse
Java declaring class name: de.HelloImpl
Java method name: sayHelloWorld
Java paramaters: [Ljava.lang.String;@44e844e8
Service Implementation method: null
Axis Operation: org.apache.axis2.description.outinaxisoperat...@3ece3ece
Number of Parameter Descriptions: 1
Parameter Description:
org.apache.axis2.jaxws.description.impl.parameterdescriptioni...@13b813b8
Name: arg0
Is header: false; Is holder: false
Mode: IN
Type: class java.lang.String; Actual type: class java.lang.String
Number of Fault Descriptions: 1
Fault Description:
org.apache.axis2.jaxws.description.impl.faultdescriptioni...@5f345f34
Exception class: de.WebServiceFaultException_Exception
Name: WebServiceFault
Namespace: WebServiceFault
FaultBean: de.WebServiceFaultException
FaultInfo Type Name : de.WebServiceFaultException
No Attachment Descriptions
RuntimeDescriptions:0
RuntimeDescriptions:1
MarshalServiceRuntime:JAXWS-MARSHAL
Packages = [de]
AnnotationDesc cached for:de.SayHelloWorld
@XMLRootElement exists = false
AnnotationDesc cached for:de.WebServiceFaultException
@XMLRootElement exists = false
AnnotationDesc cached for:java.lang.String
@XMLRootElement exists = false
AnnotationDesc cached for:de.SayHelloWorldResponse
@XMLRootElement exists = false
PropertyDescriptorPlus Map cached for:de.SayHelloWorldResponse
propertyName =return
xmlName =return
propertyType =java.lang.String
PropertyDescriptorPlus Map cached for:de.SayHelloWorld
propertyName =arg0
xmlName =arg0
propertyType =java.lang.String
RequestWrappers
Operation:sayHelloWorld RequestWrapper:de.SayHelloWorld ResponseWrappers
Operation:sayHelloWorld ResponseWrapper:de.SayHelloWorldResponse
FaultBeanDesc
FaultException:de.WebServiceFaultException_Exception
FaultBean Class Name :de.WebServiceFaultException
FaultBean Namespace :http://de/
FaultBean Local Name :WebServiceFault
}
The out- and in- messages are correct. If no
RuntimeDescriptions:1
MarshalServiceRuntime:JAXWS-MARSHAL
....
in log file is available, the program runs correct. So the failure is only on
runtime description fragment.
Actually code in MethodMarshallerUtils musts fail, because:
FaultDescription fd = operationDesc.getFaultDescriptions()[i];
// gives an instance of FaultDescriptionImpl from ArrayList
FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);
// search for instance in another HashMap and a key value for search hasn't
equals method,
// the next code trays to operate with NULL object:
QName tryQName = new QName(faultBeanDesc.getFaultBeanNamespace(), ...
Please, consider to correct this bug.
Our solution for production environment is to redefine the interface. There are
only request and response messages and no fault any more. It is not pretty.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]