*/
private void writeService(WSDLDescription wsdlDescription) throws IOException, XMLStreamException {
Map serviceMap = wsdlDescription.getServices();
if (serviceMap != null && !serviceMap.isEmpty()) {
Iterator serviceIterator = serviceMap.values().iterator();
WSDLService service;
while (serviceIterator.hasNext()) {
service = (WSDLService) serviceIterator.next();
writer.writeStartElement(defaultWSDLPrefix, "service", WSDL1_1_NAMESPACE_URI);
writer.writeAttribute("name", service.getName().getLocalPart());
handleExtensibiltyElements(service.getExtensibilityElements());
//wrtie the porttypes
Map endPointMap = service.getEndpoints();
if (endPointMap != null && !endPointMap.isEmpty()) {
Iterator it = endPointMap.values().iterator();
while (it.hasNext()) {
writePort((WSDLEndpoint) it.next());
}