• Rajesh kumar 570
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

In the following SF class code:

 

//2. make webservice call to create Rally Attachment
req.setEndpoint(RallyURL+':443/slm/webservice/1.26/attachmentcontent/create');
req.setMethod('POST');

req.setHeader('Authorization', authorizationHeader);
req.setHeader('Content-Type','text/xml');

String body;
body = '{"Content":"'+EncodingUtil.base64Encode(att.Body)+'"}';

req.setBody(body);

//send the request
res = http.send(req);
System.debug('***res1: ' + res.getBody());

 

 

I am getting the following error on response:

 

09:49:09.411 (1411487000)|USER_DEBUG|[79]|DEBUG|***res1: <?xml version="1.0" encoding="UTF-8"?>
<CreateResult rallyAPIMajor="1" rallyAPIMinor="26">
<Errors>
<OperationResultError>Cannot parse input stream as XML document: Error on line 1: Content is not allowed in prolog.</OperationResultError>
</Errors>
<Warnings />
</CreateResult>


Can you please assist me?

Hello,
 
we are using Axis 1.4 to parse the wsdl but got the following exception:
 
Error on line 1 of document  : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
 
The wsdl we are using was generated from sfdc and without any modification. We looked up the Internet, but got no good resolutions. Would you please give us any clue?