0

below soap request how we can pass the Destinationurl,Fields,FieldInformation values like type,Internalname

<soap:Body>
<CopyIntoItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
  <SourceUrl>string</SourceUrl>
  <DestinationUrls>
    <string>string</string>
    <string>string</string>
  </DestinationUrls>
  <Fields>
    <FieldInformation Type="Invalid or Integer or Text or Note or DateTime or Counter       or Choice or Lookup or Boolean or Number or Currency or URL or Computed or Threading or Guid or MultiChoice or GridChoice or Calculated or File or Attachments or User or Recurrence or CrossProjectLink or ModStat or AllDayEvent or Error" DisplayName="string" InternalName="string" Id="guid" Value="string" />
    <FieldInformation Type="Invalid or Integer or Text or Note or DateTime or Counter or Choice or Lookup or Boolean or Number or Currency or URL or Computed or Threading or Guid or MultiChoice or GridChoice or Calculated or File or Attachments or User or Recurrence or CrossProjectLink or ModStat or AllDayEvent or Error" DisplayName="string" InternalName="string" Id="guid" Value="string" />
  </Fields>
  <Stream>base64Binary</Stream>
</CopyIntoItems>
</soap:Body>
4

1 回答 1

0

尝试这个。

       URL url = new URL(Url);
       URLConnection connection = url.openConnection();
       HttpURLConnection httpConn = (HttpURLConnection) connection;
       String SOAPAction = "";

将您的肥皂请求转换为字符串。

       byte[] b =s_body.getBytes();//make your soap request string as array byte.

       // Set the appropriate HTTP parameters.
       httpConn.setRequestProperty( "Content-Length", String.valueOf( b.length ) );
       httpConn.setRequestProperty("Content-Type","text/xml; charset=utf-8");
       httpConn.setRequestProperty("SOAPAction",SOAPAction);
       httpConn.setRequestMethod("POST");

       httpConn.setDoOutput(true);
       httpConn.setDoInput(true);


       // Everything's set up; send the XML that was read in to b.
      OutputStream o = httpConn.getOutputStream();
       o.write(b);
       o.close(); 
于 2013-11-05T13:06:38.997 回答