Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53088

Node Xml <Entities> is not valid to updateAlmEntity Rest Service. (Testset)

      Error updating an entity type testset
      The rest service does not wait for the <Entities> node that is generated within the GeneralPutBulkRequest.getDataBytes method

      Error: 
      Response Error: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><QCRestException><Id>qccore.general-error</Id><Title>Bad Request</Title></QCRestException>
      Failure: Server returned HTTP response code: 400 for URL:
       
      Failure: java.io.IOException: Server returned HTTP response code: 400 for URL:
      http://........./qcbin/rest/domains/ISB_GSW/projects/HAR/test-sets/1404

       

          [JENKINS-53088] Node Xml <Entities> is not valid to updateAlmEntity Rest Service. (Testset)

          Jesús Benavente added a comment - You can look at this https://github.com/jenkinsci/hpe-application-automation-tools-plugin/pull/143

          Daniel Gront added a comment -

          roy_lu, is this step yours?

          Daniel Gront added a comment - roy_lu , is this step yours?

          Daniel Gront added a comment -

          benauca, I've left you a comment regarding the pull request, please fix it before I continue to review it.

          Daniel Gront added a comment - benauca , I've left you a comment regarding the pull request, please fix it before I continue to review it.

          Roy Lu added a comment -

          Hi benauca,

          Is the <Entities> some new format that we don't support now? What's the format? 

          Roy Lu added a comment - Hi benauca , Is the <Entities> some new format that we don't support now? What's the format? 

          Jesús Benavente added a comment - - edited

          Hi Roy.

          I´m sorry but I've got disconneted  long time

          the class UpdateAlmEntityRequest implements the perform method of the GeneralPutBulkRequest class, which calls the getDataBytes method tha include  the Entities node 

          StringBuilder builder = new StringBuilder("<Entities>");

           

           

          // code placeholder
            private byte[] getDataBytes() {
                  
                  StringBuilder builder = new StringBuilder("<Entities>");
                  for (Map<String, String> values : getFields()) {
                      builder.append("<Entity><Fields>");
                      for (String key : values.keySet()) {
                          builder.append(RestXmlUtils.fieldXml(key, values.get(key)));
                      }
                      builder.append("</Fields></Entity>");
                  }
                  
                  return builder.append("</Entities>").toString().getBytes();
                  
              }
          

           

          However, the api rest does not allow Entities node.

           

          Error: 
          Response Error: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><QCRestException><Id>qccore.general-error</Id><Title>Bad Request</Title></QCRestException>
          Failure: Server returned HTTP response code: 400 for URL: 
           
          Failure: java.io.IOException: Server returned HTTP response code: 400 for URL: 
          http://........./qcbin/rest/domains/ISB_GSW/projects/HAR/test-sets/1404  
          

           

           

          It should be. It´s ok for me.

           

          ..........
          //StringBuilder builder = new StringBuilder("<Entities>");
          StringBuilder builder = new StringBuilder("");
          
          

           

           

           

          Jesús Benavente added a comment - - edited Hi Roy. I´m sorry but I've got disconneted  long time the class UpdateAlmEntityRequest implements the perform method of the GeneralPutBulkRequest class, which calls the getDataBytes method tha include  the Entities node  StringBuilder builder = new StringBuilder("<Entities>");     // code placeholder private byte [] getDataBytes() { StringBuilder builder = new StringBuilder( "<Entities>" ); for (Map< String , String > values : getFields()) { builder.append( "<Entity><Fields>" ); for ( String key : values.keySet()) { builder.append(RestXmlUtils.fieldXml(key, values.get(key))); } builder.append( "</Fields></Entity>" ); } return builder.append( "</Entities>" ).toString().getBytes(); }   However, the api rest does not allow Entities node.   Error:  Response Error: <?xml version= "1.0" encoding= "UTF-8" standalone= "yes" ?><QCRestException><Id>qccore.general-error</Id><Title>Bad Request</Title></QCRestException> Failure: Server returned HTTP response code: 400 for URL:    Failure: java.io.IOException: Server returned HTTP response code: 400 for URL:  http: //........./qcbin/ rest /domains/ISB_GSW/projects/HAR/test-sets/1404      It should be. It´s ok for me.   .......... //StringBuilder builder = new StringBuilder( "<Entities>" ); StringBuilder builder = new StringBuilder("");      

          Roy Lu added a comment -

          Hi gront,

          I don't know why the PR was mentioned in the first comment. Seems this case is talking about a different thing.

          Roy Lu added a comment - Hi gront , I don't know why the PR was mentioned in the first comment. Seems this case is talking about a different thing.

          Roy Lu added a comment -

          Hi benauca,

          What build step are you using? Upload test result? Can you provide the console output of the build?

          Roy Lu added a comment - Hi benauca , What build step are you using? Upload test result? Can you provide the console output of the build?

          Roy Lu added a comment -

          I'm closing it for no response for a long time.

          Roy Lu added a comment - I'm closing it for no response for a long time.

            roy_lu Roy Lu
            benauca Jesús Benavente
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: