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

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

    Details

    • Similar Issues:

      Description

      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

       

        Attachments

          Activity

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

          Roy Lu, is this step yours?

          Show
          gront Daniel Gront added a comment - Roy Lu , is this step yours?
          Hide
          gront Daniel Gront added a comment -

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

          Show
          gront Daniel Gront added a comment - Jesús Benavente , I've left you a comment regarding the pull request, please fix it before I continue to review it.
          Hide
          roy_lu Roy Lu added a comment -

          Hi Jesús Benavente,

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

          Show
          roy_lu Roy Lu added a comment - Hi Jesús Benavente , Is the <Entities> some new format that we don't support now? What's the format? 
          Hide
          benauca 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("");
          
          

           

           

           

          Show
          benauca 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("");      
          Hide
          roy_lu Roy Lu added a comment -

          Hi Daniel Gront,

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

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

          Hi Jesús Benavente,

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

          Show
          roy_lu Roy Lu added a comment - Hi Jesús Benavente , What build step are you using? Upload test result? Can you provide the console output of the build?
          Hide
          roy_lu Roy Lu added a comment -

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

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: