code: public void normalizeDatastreams(DigitalObject obj,
              int transContext,
              String characterEncoding)            throws UnsupportedEncodingException {
          if (transContext == AS_IS) {
              return;
          }
          if (obj.hasContentModel( Models.SERVICE_DEPLOYMENT_3_0)) {
              Iterator<String> datastreams = obj.datastreamIdIterator();
              while (datastreams.hasNext()) {
                  String dsid = datastreams.next();
  
                  if (dsid.equals("WSDL") || dsid.equals("SERVICE-PROFILE")) {
                      for (Datastream d : obj.datastreams(dsid)) {
                          if (!(d instanceof DatastreamXMLMetadata)) {
                              logger.warn(obj.getPid()
                                      + " : Refusing to normalize URLs in datastream "
                                      + dsid + " because it is not inline XML");
                              continue;
                          }
  
                          DatastreamXMLMetadata xd = (DatastreamXMLMetadata) d;
                          if (logger.isDebugEnabled())
                              logger.debug("{} : normalising URLs in {}",
                                      obj.getPid(), dsid);
                          String origContent = new String(xd.xmlContent, "UTF-8");
                          String normal = normalizeInlineXML(origContent,
                                          transContext);
                          if (!normal.equals(origContent) || !"UTF-8".equalsIgnoreCase(characterEncoding)){
                              xd.xmlContent = normal.getBytes(characterEncoding);
                          }
                          xd.DSSize = xd.xmlContent.length;
                      }
                  }
              }
          }
      }
docs: /*
  Certain serviceDeployment datastreams require special processing to
  fix/complete URLs and do variable substitution (such as replacing
  'local.fedora.server' with fedora's baseURL)