Error [... is not a literal node]: Modyfing artifact properties when artifact has "link to"
request = createRequest(request, context);
IWebProxy proxy = WebRequest.DefaultWebProxy;
// Uri proxyUri = proxy.GetProxy(request.RequestUri);
bool isBypassed = proxy.IsBypassed(request.RequestUri);
if (!isBypassed)
proxy.Credentials = context.ProxyCredential;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
var reader = new StreamReader(response.GetResponseStream());
var etag = response.Headers.Get("ETag");
var Replace = reader.ReadToEnd();
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:acp="http://jazz.net/ns/acp#"
xmlns:public_rm_10="http://www.ibm.com/xmlns/rm/public/1.0/"
xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/"
xmlns:jazz_rm="http://jazz.net/ns/rm#"
xmlns:rm_property="https://jazz.XXX.com/rm/types/"
xmlns:acc="http://open-services.net/ns/core/acc#"
xmlns:process="http://jazz.net/ns/process#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:nav="http://jazz.net/ns/rm/navigation#"
xmlns:oslc_config="http://open-services.net/ns/config#"
xmlns:oslc_rm="http://open-services.net/ns/rm#"
xmlns:dng_task="http://jazz.net/ns/rm/dng/task#"
xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/"
xmlns:oslc_auto="http://open-services.net/ns/auto#" >
<rdf:Description rdf:nodeID="A0">
<rdf:subject rdf:resource="https://jazz.XXX.com/rm/resources/MD_lqu3QY14EeucUNeS-GXy8w"/>
<rdf:predicate rdf:resource="https://jazz.XXX.com/rm/types/LT_4_CfI_XnEeumDc79C12NdA"/>
<rdf:object rdf:resource="https://jazz.XXX.com/rm/resources/TX_CVfu-lDmEeuWbbdnw2HZow"/>
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
<dcterms:title>1228377</dcterms:title>
</rdf:Description>
<rdf:Description rdf:about="https://jazz.XXX.com/rm/resources/MD_lqu3QY14EeucUNeS-GXy8w">
<oslc_config:component rdf:resource="https://jazz.XXX.com/rm/cm/component/V1TCoPQ4Eequ_bWtpv6_DQ"/>
<dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2021-03-25T14:44:22.836Z</dcterms:created>
<rm_property:AD_cWfn1m-UEeuSlb86Gyd1dg rdf:resource="https://jazz.XXX.com/rm/types/AT_XItUWW-UEeuSlb86Gyd1dg#_dvQgOb1pGAq2_cUQUlcMmg"/>
<dcterms:contributor rdf:resource="https://jazz.XXX.com/jts/users/thophi"/>
<process:projectArea rdf:resource="https://jazz.XXX.com/rm/process/project-areas/_VmiN4PQ4Eequ_bWtpv6_DQ"/>
<rm_property:AD_vUgxAG-UEeuSlb86Gyd1dg rdf:datatype="http://www.w3.org/2001/XMLSchema#string">XX_4235676</rm_property:AD_vUgxAG-UEeuSlb86Gyd1dg>
<dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">1283914</dcterms:identifier>
<rm_property:AD_ffc7oJ3dEeuPP9F2fpUvLw rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Antenne Position</rm_property:AD_ffc7oJ3dEeuPP9F2fpUvLw>
<oslc:instanceShape rdf:resource="https://jazz.XXX.com/rm/types/OT_kXZjO2-UEeuSlb86Gyd1dg"/>
<rdf:type rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
<acp:accessControl rdf:resource="https://jazz.XXX.com/rm/accessControl/_VmiN4PQ4Eequ_bWtpv6_DQ"/>
<rm_property:AD_IR_i041QEeucUNeS-GXy8w rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2021-02-26</rm_property:AD_IR_i041QEeucUNeS-GXy8w>
<dcterms:description rdf:parseType="Literal"></dcterms:description>
<nav:parent rdf:resource="https://jazz.XXX.com/rm/folders/FR_7b-SEm-UEeuSlb86Gyd1dg"/>
<dcterms:title rdf:parseType="Literal">Req4</dcterms:title>
<dcterms:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2021-08-06T10:26:42.826Z</dcterms:modified>
<rdf:type rdf:resource="http://jazz.net/ns/rm#Module"/>
<dcterms:creator rdf:resource="https://jazz.XXX.com/jts/users/thophi"/>
<oslc:serviceProvider rdf:resource="https://jazz.XXX.com/rm/oslc_rm/_VmiN4PQ4Eequ_bWtpv6_DQ/services.xml"/>
<rm_property:AD_I12-IIM6EeuSlb86Gyd1dg rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Freigegeben</rm_property:AD_I12-IIM6EeuSlb86Gyd1dg>
<rm_property:LT_4_CfI_XnEeumDc79C12NdA rdf:resource="https://jazz.XXX.com/rm/resources/TX_CVfu-lDmEeuWbbdnw2HZow"/>
<rm_property:AD_3SNIoIi0EeucUNeS-GXy8w rdf:datatype="http://www.w3.org/2001/XMLSchema#string"></rm_property:AD_3SNIoIi0EeucUNeS-GXy8w>
</rdf:Description>
</rdf:RDF>
request.Headers.Add("If-Match", etag);
request = createRequest(request, context);
request.Method = "PUT";
using (var requestStream = request.GetRequestStream())
{
using (var streamWriter = new StreamWriter(requestStream))
{ streamWriter.Write(Replace); }
}
var response_ = request.GetResponse();
var responseStream = response_.GetResponseStream();
var streamReader = new StreamReader(responseStream);
var data = streamReader.ReadToEnd();
--> System.Net.WebException: 'The remote server has returned an error: (400) Invalid request.'
Accepted answer
Host: jazz.ibm.com:9443
Accept-Encoding: gzip, deflate, br
Accept: application/rdf+xml
Connection: keep-alive
X-Requested-With: XMLHttpRequest
Referer: https://jazz.ibm.com:9443/rm/web
OSLC-Core-Version: 2.0
Configuration-Context: https://jazz.ibm.com:9443/rm/cm/stream/_B5n79td8EeqV5_5cfWW9rw
vvc.configuration: https://jazz.ibm.com:9443/rm/cm/stream/_B5n79td8EeqV5_5cfWW9rw
Cache-Control: no-store, max-age=0
Cookie: JAZZ_AUTH_TOKEN=""; jfs-oauth-access_token-secret0=""; JSESSIONID=""; LtpaToken2=""
Host: jazz.ibm.com:9443
Accept-Encoding: gzip, deflate, br
Accept: application/xml
Connection: keep-alive
X-Requested-With: XMLHttpRequest
Referer: https://jazz.ibm.com:9443/rm/web
OSLC-Core-Version: 2.0
Configuration-Context: https://jazz.ibm.com:9443/rm/cm/stream/_B5n79td8EeqV5_5cfWW9rw
Content-Type: application/rdf+xml
vvc.configuration: https://jazz.ibm.com:9443/rm/cm/stream/_B5n79td8EeqV5_5cfWW9rw
If-Match: "%220%22&_XKN8YI9LEeyEDflBVqwSHg"
Cookie: JAZZ_AUTH_TOKEN=""; jfs-oauth-access_token-secret0=""; JSESSIONID=""; LtpaToken2=""