throws GFacSchemaException {
ServiceMapDocument serviceMapDocument = ServiceMapDocument.Factory
.newInstance();
ServiceMapType serviceMapType = serviceMapDocument.addNewServiceMap();
ServiceType serviceType = serviceMapType.addNewService();
serviceType.setServiceDescription(serviceInfo.getServiceDescription());
QName serviceQName;
if (serviceInfo.getServiceName().startsWith("{")) {
serviceQName = QName.valueOf(serviceInfo.getServiceName().trim());
} else {
serviceQName = new QName(serviceInfo.getObjectNamespace(),
serviceInfo.getServiceName().trim());
}
ServiceName serviceName = serviceType.getServiceName();
if (serviceName == null) {
serviceName = serviceType.addNewServiceName();
;
}
serviceName.setStringValue(serviceQName.getLocalPart());
serviceName.setTargetNamespace(serviceInfo.getObjectNamespace());