axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Bryant (JIRA)" <>
Subject [jira] Created: (AXIS2-4579) NullPointerException in WSDL11ToAxisServiceBuilder when importing an output only operation
Date Thu, 10 Dec 2009 02:35:18 GMT
NullPointerException in WSDL11ToAxisServiceBuilder when importing an output only operation

                 Key: AXIS2-4579
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.5
            Reporter: Dave Bryant

A null pointer exception occurs in WSDL11ToAxisServiceBuilder when importing the WSDL below.
 It includes a notification style operation (i.e. output only), and the null pointer occurs
when the service builder attempts to copy across the extension elements.  The problem is that
it tries to copy the extension elements from the input message rather than the output message
- as the input is null, a null pointer occurs.  If the input message was not null this is
still a bug as it is copying the extension elements from the wrong place.

The bug is on line 1343 (revision 822304 from

1334 	 // Create an output message and add
1335 	Output wsdl4jOutputMessage = wsdl4jOperation.getOutput();
1336 	if (null != wsdl4jOutputMessage) {
1337 	AxisMessage outMessage = axisOperation
1338 	.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
1339 	Message message = wsdl4jOutputMessage.getMessage();
1340 	if (null != message) {
1342 	outMessage.setName(message.getQName().getLocalPart());
1343 	copyExtensionAttributes(wsdl4jInputMessage.getExtensionAttributes(),
1346 	// wsdl:portType -> wsdl:operation -> wsdl:output
1347 	} 

The following WSDL triggers the problem:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="" xmlns:soapenc=""
	xmlns="" xmlns:wsdl="" xmlns:http=""
	xmlns:xs="" xmlns:soap=""

	<wsdl:message name="operationResponse">
		<wsdl:part name="parameters" element="operationResponse" />

	<wsdl:portType name="examplePortType">
		<wsdl:operation name="operation">
			<wsdl:output message="operationResponse" />

	<wsdl:binding name="binding" type="examplePortType">
		<soap:binding style="document" transport="" />
		<wsdl:operation name="operation">
			<soap:operation soapAction="urn:operation" style="document" />
				<soap:body use="literal" />

	<wsdl:service name="service">
		<wsdl:port name="endpoint" binding="binding">
			<soap:address location="" />

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message