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 Brecht Yperman <Br...@invenso.com> on 2006/11/10 13:50:32 UTC
[Axis2] NullPointerException WSDL11ToAxisServiceBuilder
Hi,
I get a NullPointerException in the WSDL11ToAxisServiceBuilder.
This is due to the fact that the documentation element is empty, firstChild is null.
=CODE=
// copy the documentation element content to the description
Element documentationElement = wsdl4jDefinition.getDocumentationElement();
if (documentationElement != null) {
Node firstChild = documentationElement.getFirstChild();
String serviceDes;
if (firstChild.getNodeType() == Node.TEXT_NODE) {
serviceDes = firstChild.getNodeValue();
} else {
serviceDes = DOM2Writer.nodeToString(firstChild);
}
axisService.setServiceDescription(serviceDes);
}
=CODE=
For this wsdl-fragment
=WSDL=
<definitions xmlns:tns="http://www.vanos.be/webservices/iseries/isbeurscentrum" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import0="vanos:iseries:beurscentra" name="isbeurscentrum" targetNamespace="http://www.vanos.be/webservices/iseries/isbeurscentrum" xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
<types>
[...]
=WSDL=
A bug, or is an empty documentation element invalid?
Thanks,
Brecht
Invenso is Ready! Are you? Visit us in the application village area!
Invenso - The "Integration Software" specialists.
____________________________________________
Brecht Yperman
Development Team
Direct: +32 (0)3 780 30 05
Email: brecht.yperman@invenso.com
INVENSO bvba
Industriepark-West 75
9100 Sint-Niklaas
Belgium - Europe
Phone: +32 (0)3 780 30 02
Fax: +32 (0)3 780 30 03
Email: info@invenso.com
Website: www.invenso.com
VAT BE 0477.834.668
RPR Sint-Niklaas
"E-mail disclaimer: This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof."
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] NullPointerException WSDL11ToAxisServiceBuilder
Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Brecht ;
Its bug please report a jira.
Thanks
Deepal
>Hi,
>
>I get a NullPointerException in the WSDL11ToAxisServiceBuilder.
>
>This is due to the fact that the documentation element is empty, firstChild is null.
>
>=CODE=
>// copy the documentation element content to the description
>Element documentationElement = wsdl4jDefinition.getDocumentationElement();
>if (documentationElement != null) {
> Node firstChild = documentationElement.getFirstChild();
> String serviceDes;
> if (firstChild.getNodeType() == Node.TEXT_NODE) {
> serviceDes = firstChild.getNodeValue();
> } else {
> serviceDes = DOM2Writer.nodeToString(firstChild);
> }
> axisService.setServiceDescription(serviceDes);
>}
>=CODE=
>
>For this wsdl-fragment
>
>=WSDL=
><definitions xmlns:tns="http://www.vanos.be/webservices/iseries/isbeurscentrum" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import0="vanos:iseries:beurscentra" name="isbeurscentrum" targetNamespace="http://www.vanos.be/webservices/iseries/isbeurscentrum" xmlns="http://schemas.xmlsoap.org/wsdl/">
> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
> <types>
>[...]
>=WSDL=
>
>A bug, or is an empty documentation element invalid?
>
>Thanks,
>Brecht
>
>Invenso is Ready! Are you? Visit us in the application village area!
>
>
>Invenso - The "Integration Software" specialists.
>____________________________________________
>Brecht Yperman
>Development Team
>
>Direct: +32 (0)3 780 30 05
>Email: brecht.yperman@invenso.com
>INVENSO bvba
>Industriepark-West 75
>9100 Sint-Niklaas
>Belgium - Europe
>
>Phone: +32 (0)3 780 30 02
>Fax: +32 (0)3 780 30 03
>Email: info@invenso.com
>Website: www.invenso.com
>VAT BE 0477.834.668
>RPR Sint-Niklaas
>"E-mail disclaimer: This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof."
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
>
--
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org