How to get Attachment file sizes in SharePoint 2007 in a SOAP request - sharepoint

I have a custom list on a sharepoint server. Each list item contains multiple file attachments . I am connecting to server with a SOAP-envelope request with this:
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>{A6888F11-0C37-4411-BC6D-1C9BA869B250}</listName>
<queryOptions>
<QueryOptions>
<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>
<ViewAttributes Scope="RecursiveAll"/>
<DateInUtc>TRUE</DateInUtc>
<IndividualProperties>TRUE</IndividualProperties>
<IncludeAttachmentUrls>TRUE</IncludeAttachmentUrls>
</QueryOptions>
</queryOptions>
</GetListItems>
</soap12:Body>
</soap12:Envelope>
The response is good, and I see a list of the URLs for each attachment. However, I am trying to also get the file size of each one in this request. What do I need to add in order to obtain this information?

Related

SSRS data services Sharepoint 2013 xml

in SSRS 2016 I write the following XML data Source:
https://<site>/_vti_bin/usergroup.asmx
and afterwards the following DataSet:
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupCollectionFromUser
</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/directory"
Name="GetGroupCollectionFromUser">
<Parameters>
<Parameter Name="userLoginName">
<DefaultValue>user</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">*</ElementPath>
</Query>
being user a dataSetParameter=User!UserID
launching the query in the query designer I get the following error. Help is really appreciated:
===================================
An error occurred while executing the query.
Failed to execute web request for the specified URL.
Soap Fault:
Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown. (Microsoft SQL Server Report Builder)
===================================
Failed to execute web request for the specified URL.
The remote server returned an error: (500) Internal Server Error.
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Exception of type
'Microsoft.SharePoint.SoapServer.SoapServerException' was
thrown.
</faultstring><detail><errorstring
xmlns="http://schemas.microsoft.com/sharepoint/soap/">The parameter
loginName cannot be empty or bigger than 251 characters.</errorstring>
<errorcode
xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x80131600</errorcode>
</detail></soap:Fault></soap:Body>
</soap:Envelope>

IE-11, Posted data request's response is not displayed

I'm posting Zip file of size >400MB in one of web page at Cloudapp.net (Azure hosted site) using IE as well as Chrome. After the request page redirect to result page. It takes around 15 minutes to process Zip file including upload. In Chrome it works fine but in Internet Explorer (11) the request is pending even after the Zip has been processed successfully.
What could be possible changes I can make it to wait or show results?
Following is exported NetworkData for request if could be helpful:
<?xml version="1.0" encoding="UTF-8"?>
<log>
<version>1.1</version>
<creator>
<name>Internet Explorer Network Inspector</name>
<version>11.0.9600.17840</version>
</creator>
<browser>
<name>Internet Explorer</name>
<version>11.0.9600.17840</version>
</browser>
<pages>
<page>
<startedDateTime>2017-03-23T05:01:43.105+05:30</startedDateTime>
<id>0</id>
<title/>
<pageTimings>
<onContentLoad>-1</onContentLoad>
<onLoad>-1</onLoad>
</pageTimings>
</page>
</pages>
<entries>
<entry>
<pageref>0</pageref>
<startedDateTime>2017-03-23T05:01:43.105+05:30</startedDateTime>
<time>291860</time>
<request>
<method/>
<url>http://MY_CLOUD_APP_SITE.cloudapp.net/Admin/Import</url>
<httpVersion/>
<cookies/>
<headers/>
<queryString/>
<headersSize>0</headersSize>
<bodySize>0</bodySize>
</request>
<response>
<cookies/>
<headers/>
<content>
<size>0</size>
<mimeType/>
</content>
<redirectionURL/>
<headersSize>0</headersSize>
<bodySize>0</bodySize>
</response>
<cache/>
<timings>
<send>0</send>
<wait>-1</wait>
<receive>-1</receive>
</timings>
</entry>
</entries>
</log>

INVALID_LOGIN_CREDENTIALS error on NetSuite, but correct credentials

I've been trying to use the NetSuite api for sometime using the netsuite gem.
I can login to the website, but when I try to authenticate from the API I get an INVALID_LOGIN_CREDENTIALS error.
This is the payload of the request:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:platformMsgs="urn:messages_2011_1.platform.webservices.netsuite.com" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:platformCore="urn:core_2011_1.platform.webservices.netsuite.com">
<env:Header>
<platformMsgs:passport>
<platformCore:email>email#email.com</platformCore:email>
<platformCore:password>--snip--</platformCore:password>
<platformCore:account>ACCOUNTNO</platformCore:account>
<platformCore:role type="role" internalId="ROLE"/>
</platformMsgs:passport>
</env:Header>
<env:Body>
<platformMsgs:get>
<platformMsgs:baseRef xsi:type="platformCore:RecordRef" internalId="4" type="customer"/>
</platformMsgs:get>
</env:Body>
</env:Envelope>
This is the payload of the response:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>You have entered an invalid email address or account number. Please try again.</faultstring>
<detail>
<platformFaults:invalidCredentialsFault xmlns:platformFaults="urn:faults_2011_1.platform.webservices.netsuite.com">
<platformFaults:code>INVALID_LOGIN_CREDENTIALS</platformFaults:code>
<platformFaults:message>You have entered an invalid email address or account number. Please try again.</platformFaults:message>
</platformFaults:invalidCredentialsFault>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">sb-partners-java002.svale.netledger.com</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
I've just solved the issue. If you're having trouble make sure that:
You are connecting to the right environment. (non-sandbox vs sandbox)
Your user (or your role) have WebServices permission (see in Permissions > Setup)
I faced both of the issues. My account, even belonging to an Administrator role, lacked Web Services permission. And I was using the sandbox url to a non-sandbox account.
https://webservices.na1.netsuite.com/wsdl/v2012_1_0/netsuite.wsdl (non-sandbox)
https://webservices.sandbox.netsuite.com/wsdl/v2012_1_0/netsuite.wsdl (sandbox)
Another possible cause of this issue is if the password contains + or % characters. Removing these from the password fixed this for me.

DocuSign SOAP Api exception “This Account lacks sufficient permissions”

I created demo account on docusign demo site some days ago and I have the same problem "This Account lacks sufficient permissions" DocuSign.
Could you guys help me out of this? I really appreciate your help.
Update SOAP trace:
CreateAndSendEnvelope request
<MessageLogTraceRecord>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://www.docusign.net/API/3.0/CreateAndSendEnvelope</Action>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreateAndSendEnvelope xmlns="http://www.docusign.net/API/3.0">
<Envelope>
<AccountId>5b119284-64fd-4f85-877c-8825b2e73bc1</AccountId>
<Documents>
<Document>
<ID>1</ID>
<Name>a2a7b1a3efd6416ab00742a72cd00b97_DOCUSIGN_DATA.pdf</Name>
<PDFBytes></PDFBytes>
</Document>
</Documents>
<Recipients>
<Recipient>
<ID>1</ID>
<UserName>TEST 1 LAST</UserName>
<Email>TRUNGNGUYEN#INTERACTIVECONTACTCENTER.COM</Email>
<Type>Signer</Type>
<AccessCode xsi:nil="true"></AccessCode>
<RequireIDLookup>false</RequireIDLookup>
</Recipient>
</Recipients>
<Subject>sign</Subject>
<EmailBlurb></EmailBlurb>
</Envelope>
</CreateAndSendEnvelope>
</s:Body>
</s:Envelope>
</MessageLogTraceRecord>
CreateAndSendEnvelope response
<MessageLogTraceRecord>
<HttpResponse xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
<StatusCode>InternalServerError</StatusCode>
<StatusDescription>Internal Server Error</StatusDescription>
<WebHeaders>
<Vary>Accept-Encoding</Vary>
<Strict-Transport-Security>max-age=7776000; includeSubDomains</Strict-Transport-Security>
<Content-Length>1394</Content-Length>
<Cache-Control>private</Cache-Control>
<Content-Type>text/xml; charset=utf-8</Content-Type>
<Date>Wed, 25 Sep 2013 16:03:23 GMT</Date>
</WebHeaders>
</HttpResponse>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>
<wsa:MessageID>urn:uuid:e12ae2b6-6328-4b5b-b553-95f422f66454</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:9f37c1cf-d875-4acd-9b88-108e9b11efc2</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-14c52cbb-7b93-4541-9867-c16654c1629b">
<wsu:Created>2013-09-25T16:03:24Z</wsu:Created>
<wsu:Expires>2013-09-25T16:08:24Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode xmlns="">soap:Client</faultcode>
<faultstring xmlns="">This Account lacks sufficient permissions. </faultstring>
<faultactor xmlns="">missing in Web.Config</faultactor>
<detail xmlns="">
<ErrorCode xmlns="missing in Web.Config">111</ErrorCode>
<ErrorReason xmlns="missing in Web.Config">This Account lacks sufficient permissions.</ErrorReason>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
</MessageLogTraceRecord>
This means that you are trying to use a feature or setting that is not enabled on your demo account. By default DocuSign enables all features on demo accounts so I'm not sure how your account got into a weird, semi-activated state.
In most situations this needs to be fixed by DocuSign on their side by someone going into your account and enabling a feature or setting.
I've gone through your account and enabled some things that should have been turned on, please try again.

Schema for Siebel header

<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext">
<wsse:UsernameToken xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility">
<wsse:Username>Username</wsse:Username>
<wsse:Password Type="wsse:PasswordText">Password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
The above lines are entered as XML fragment in a BPEL process in JDeveloper.Question: How do I design a suitable schema to get Username and Password for Siebel header to call out Siebel services?
this is an example of request to siebel web services with WSSOAP option turned on:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<ns:UsernameToken xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="http://siebel.com/webservices" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">User name goes here</ns:UsernameToken>
<ns:PasswordText xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="http://siebel.com/webservices" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">Password goes here</ns:PasswordText>
<ns:SessionType xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="http://siebel.com/webservices" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">Session type goes here</ns:SessionType>
<ns:SessionToken xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="http://siebel.com/webservices" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">Session token goes here</ns:SessionToken>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
without WSSOAP option you would have to either invoke that as anonymous user (configured on Siebel side) or put user name & password in URL.
Here you can find more information (Siebel Bookshelf): http://docs.oracle.com/cd/B40099_02/books/EAI2/EAI2_WebServices.html

Resources