Getting vCards from iCloud using PHP - icloud

Searched thru serverfault.com, stackoverflow.com, apple.stackexchange.com, googled and still not getting far. Need someone to help.
I'm trying to get all vCards from iCloud accounts.
I'm starting from the plugin from Roundcube/CardDav.
From the articles such as:
stackoverflow.com/questions/24202551/manipulate-groups-in-icloud-with-carddav-protocol
sabre.io/dav/building-a-carddav-client/
sabre.io/dav/clients/osx-addressbook/
stackoverflow.com/questions/15111887/how-to-import-icloud-contacts-in-php#
tools.ietf.org/html/rfc6352#section-8.7.1
I managed to get the Principal, the Principal's address. But the last step of getting the card returns ContentLength of 0.
Here is what I do:
- use icloud email as username
- use icloud password
To get the Principal, using "https : / / contacts.icloud.com/" as URL, PROPFIND, DEPTH 0:
<?xml version="1.0" encoding="UTF-8"?>
<d:propfind xmlns:d="DAV:">
<d:prop>
<d:current-user-principal/>
</d:prop>
</d:propfind>
Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<multistatus xmlns="DAV:">
<response>
<href>/</href>
<propstat>
<prop>
<current-user-principal>
<href>/1331115018/principal/</href>
</current-user-principal>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
Next, here is what I do to get the home, using "https : / /contacts.icloud.com/1331115018/principal/", PROPFIND, DEPTH 0:
<?xml version="1.0" encoding="UTF-8"?>
<d:propfind xmlns:d="DAV:" xmlns:card="urn:ietf:params:xml:ns:carddav">
<d:prop>
<card:addressbook-home-set/>
</d:prop>
</d:propfind>
Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<multistatus xmlns="DAV:">
<response>
<href>/1331115018/principal/</href>
<propstat>
<prop>
<addressbook-home-set xmlns="urn:ietf:params:xml:ns:carddav">
<href xmlns="DAV:">https://p44-contacts.icloud.com:443/1331115018/carddavhome/</href>
</addressbook-home-set>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
Finally, here is what I do to try to get all the vCards, using https : / / p44-contacts.icloud.com:443/1331115018/carddavhome/, REPORT, DEPTH 1:
<?xml version="1.0" encoding="utf-8" ?>
<C:addressbook-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
<D:prop>
<D:getetag/>
<C:address-data>
<C:prop name="UID"/>
<C:prop name="EMAIL"/>
<C:prop name="FN"/>
</C:address-data>
</D:prop>
</C:addressbook-multiget>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<multistatus xmlns="DAV:" xmlns:CD="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
</multistatus>
or
<?xml version="1.0" encoding="utf-8" ?>
<C:addressbook-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
<D:prop>
<D:getetag/>
<C:address-data>
<C:prop name="UID"/>
<C:prop name="EMAIL"/>
<C:prop name="FN"/>
</C:address-data>
</D:prop>
</C:addressbook-query>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<multistatus xmlns="DAV:" xmlns:CD="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
<response>
<href>/1331115018/carddavhome/</href>
<propstat>
<prop> <getetag>"C=0#U=9123588c-8038-439c-a547-19c866d1ed06"</getetag>
<address-data xmlns="urn:ietf:params:xml:ns:carddav">
</address-data>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
or
<?xml version="1.0" encoding="utf-8" ?>
<C:addressbook-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
<D:prop>
<D:getetag/>
<C:address-data>
<C:prop name="UID"/>
<C:prop name="EMAIL"/>
<C:prop name="FN"/>
</C:address-data>
</D:prop>
<C:prop-filter name="EMAIL">
<C:text-match collation="i;unicode-casemap" match-type="equals">me</C:text-match>
</C:prop-filter>
</C:filter>
</C:addressbook-query>
Response:
"Didn't understand the report"
What do I have to do?

The CardDAV home (your https://p44-contacts.icloud.com:443/1331115018/carddavhome/) contains the CardDAV collections (aka the 'address books'), not the vCards (which contain contacts and contact groups). You need to take one more hop.
You can list the addressbook collections in the home using a regular PROPFIND Depth 1 and then query those for the contacts with the report you specify. Like so:
PROPFIND /1331115018/carddavhome/ HTTP/1.1
Depth: 1
Host: p44-contacts.icloud.com:443
Authorization: ...
Content-Type: text/xml; charset=utf-8
Content-Length: ...
<propfind xmlns="DAV:">
<prop>
<displayname />
<resourcetype />
</prop>
</propfind>
This returns you the list of all sub-collections in the CardDAV home collection.
The collections which have an addressbook resourcetype are CardDAV addressbook collections and can be queried using an addressbook-query or addressbook-multiget report, using a sync-report if that is supported (iCloud does) or again using a simple PROPFIND. Depends on what you want.
Given an address book collection URL a 'real' client would usually use a sync-report to grab the URLs of all changed objects if the server supports that, or just grab the URLs, Content-Type and ETags of all contained vCards using a PROPFIND as a fallback. For example:
PROPFIND /1331115018/carddavhome/contacts/ HTTP/1.1
Depth: 1
Host: p44-contacts.icloud.com:443
Authorization: ...
Content-Type: text/xml; charset=utf-8
Content-Length: ...
<propfind xmlns="DAV:">
<prop>
<getetag />
<getcontenttype />
</prop>
</propfind>
This gives you the URLs of all objects in the address book collection. Which you can then retrieve using simple GETs or a multiget REPORT.
BTW: In your addressbook-multiget REPORT you do not list any vCard URLs, hence the result set will always be empty ... You can read about multiget in RFC 6352.
Note: In iCloud there is usually just one addressbook collection in the home, but in other servers it is quite common to have multiple. Also in some servers the CalDAV and CardDAV homes are the same collection (i.e. remember to actually check the resourcetype of the sub-collections in the respective home collections).
This is a great introduction on CardDAV: Building a CardDAV client.
Or this one on YouTube: FOSDEM 2009 CalDAV.

<card:addressbook-multiget xmlns:d="DAV:" xmlns:card="urn:ietf:params:xml:ns:carddav">
<d:prop>
<d:getetag />
<card:address-data />
</d:prop>
<d:href>/1331115018/carddavhome/card/vcard_UUID.vcf</d:href>
</card:addressbook-multiget>
Let try this in the REPORT Request.

Getting your credentials: https://github.com/muhlba91/icloud/blob/master/groovy_java/gui-2.1.0.zip! Keep in mind: https://support.apple.com/en-us/HT204397
Getting your vCards: https://github.com/andig/carddav2fb - just use the download command: php carddav2fb download yourdownload.vcf

Related

How to format a SOAP request

I want to access an online program via the command line within a bash script. I've been told I can run a SOAP request in order to access the software. This is the request I've been told I can use.
POST /OnlineAnalysis/Service.asmx HTTP/1.1
Host: cydas.org
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.cydas.org/OnlineAnalysis/analyseKaryotype"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<analyseKaryotype xmlns="http://www.cydas.org/OnlineAnalysis/">
<strKaryotype>string</strKaryotype>
</analyseKaryotype>
</soap:Body>
</soap:Envelope>
I've never run a SOAP request before but it looks like I'm able to use the curl command based on this question. I've tried to model my curl command according to the link I posted
curl -X POST -H "POST /OnlineAnalysis/Service.asmx HTTP/1.1" -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction: \"http://www.cydas.org/OnlineAnalysis/analyseKaryotype\"" -H "Host: cydas.org" --data-binary #request.xml
And am getting this output
<HTML>
<HEAD>
<TITLE>405 Method Not Allowed</TITLE>
<BASE href="/error_docs/"><!--[if lte IE 6]></BASE><![endif]-->
</HEAD>
<BODY>
<H1>Method Not Allowed</H1>
The HTTP verb used to access this page is not allowed.<P>
<HR>
<ADDRESS>
Web Server at cydas.org
</ADDRESS>
</BODY>
</HTML>
<!--
- Unfortunately, Microsoft has added a clever new
- "feature" to Internet Explorer. If the text of
...
These are the contents of my request.xml file below
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<analyseKaryotype xmlns="http://www.cydas.org/OnlineAnalysis/">
<strKaryotype>46,XX,del(3)(p11)</strKaryotype>
</analyseKaryotype>
</soap:Body>
</soap:Envelope>
I'm not sure what the expected output is supposed to be yet because I can't run the program. I just want to get my SOAP request running properly.
try this:
curl -v "http://www.cydas.org/OnlineAnalysis/Service.asmx" -H "Content-Type: text/xml;charset=UTF-8" -H "SOAPAction: \"http://www.cydas.org/OnlineAnalysis/analyseKaryotype\"" -H "Connection: Keep-Alive" -H "Host: www.cydas.org" --data #request.xml
The server responded with the message: "The Karyotype del(3)(p11) is not valid:
Non-specified error in chromosome count element (del(3)(p11))"
Here's the complete response message:
<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>
<analyseKaryotypeResponse xmlns="http://www.cydas.org/OnlineAnalysis/">
<analyseKaryotypeResult>
<Original_ISCN_Formula>del(3)(p11)</Original_ISCN_Formula>
<IsPolyClonal>false</IsPolyClonal>
<IsValidKaryotype>false</IsValidKaryotype>
<Corrected_ISCN_Formula/>
<CloneSize>0</CloneSize>
<IsIncompleteKaryotype>false</IsIncompleteKaryotype>
<Ploidy>0</Ploidy>
<ErrorMessages>The Karyotype del(3)(p11) is not valid:
Non-specified error in chromosome count element (del(3)(p11))</ErrorMessages>
</analyseKaryotypeResult>
</analyseKaryotypeResponse>
</soap:Body>
</soap:Envelope>
cURL is a great tool, but if you want a nice gui you can try other tools like SoapUI or Postman for testing APIs. SoapUI is a standalone Java application and Postman is a plugin for Chrome. They're both free.

How can I resolve "unexpected encoding style" using Savon Gem with Ruby on Rails

I am getting the following error when accessing a WSDL SOAP server:
{:error=>true, :message=>"Savon::SOAPFault: (env:Client) JAXRPCTIE01: caught exception while handling request: unexpected encoding style: expected=http://schemas.xmlsoap.org/soap/encoding/, actual="}
I went to soapclient.com to figure out what it's looking for.
Here is the error message I'm receiving.
Here is the code I'm using to connect to the SOAP client:
my_hash_of_stuff = {
zipcode: d_zip,
country: country
}
wsdl = 'http://my.yrc.com/dynamic/national/WebServices/YRCZipFinder_V1.wsdl'
client = Savon.client(wsdl: wsdl,
logger: Rails.logger,
log_level: :debug,
log: true,
pretty_print_xml: true,
env_namespace: :'soap-env',
strip_namespaces: true
)
response = client.call(:lookup_zip, message: my_hash_of_stuff)
print response.to_hash
Here's a copy of my log output so you can see what's happening.
This appears to be what the SOAP request should look like according to soapclient.com (if i'm understanding it correctly).
This is what I am sending.
I've been fighting with it all day and I'm sure it's probably a combination of my ignorance and something simple that i'm missing. Hopefully you guys might be able to help?
EDIT 05/25/2016:
So, looking at this again today, here's the log showing the request that savon is making:
HTTPI GET request to my.yrc.com (net_http)
SOAP request: http://my.yrc.com/dynamic/national/webservice/YRCZipFinder_V1
SOAPAction: "http://my.yrc.com/national/WebServices/YRCZipFinder_V1.wsdl/lookupCity", Content-Type: text/xml;charset=UTF-8, Content-Length: 417
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://my.yrc.com/national/WebServices/YRCZipFinder_V1.wsdl" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:lookupCity>
<zipCode>84101</zipCode>
<country>USA</country>
</tns:lookupCity>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Here's what a correct one looks like. I got this from the existing php app and tested it in Postman to verify that it works:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://my.yrc.com/national/WebServices/YRCZipFinder_V1.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://my.yrc.com/national/WebServices/YRCZipFinderMessages_V1.xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:lookupCity>
<lookupCityRequest xsi:type="ns2:YRCLookupCityRequest">
<zipCode xsi:type="xsd:string">84101</zipCode>
<country xsi:type="ns2:CountryCode">USA</country>
</lookupCityRequest>
</ns1:lookupCity>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
UPDATE:
After some more hacking, I have my request looking like this:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://my.yrc.com/national/WebServices/YRCZipFinder_V1.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://my.yrc.com/national/WebServices/YRCZipFinderMessages_V1.xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<tns:lookupCity lookupCityRequest="ns2:YRCLookupCityRequest">
<zipCode>84101</zipCode>
<country>USA</country>
</tns:lookupCity>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I need to get lookupCityRequest to move inside lookupCity instead of being an attribute of lookupCity, however. Testing it in Postman, that appears to be the only stumbling block left to hurdle.
You can use the special :attribute!symbol to assign additional attributes. That's a functionality from Nokogiri which Savon uses to build XML.
require 'savon'
my_hash_of_stuff =
{ zipcode: "99103",
country: 'US',
attributes!: { :country => { 'xsi:type' => 'ns2:YRCLookupCityRequest'},
:zipcode => { 'xsi:type' => 'ns2:YRCLookupCityRequest' }}
}
wsdl = 'http://my.yrc.com/dynamic/national/WebServices/YRCZipFinder_V1.wsdl'
client = Savon.client(wsdl: wsdl,
# logger: Rails.logger,
log_level: :debug,
log: true,
pretty_print_xml: true,
env_namespace: :'soap-env',
strip_namespaces: true
)
response = client.call(:lookup_zip,
message: my_hash_of_stuff)
print response.to_hash
If nothing works and you're desperate enough then you can still create your very own XML and use xml: instead of message:.

Internal Server Error in CreateItem operation of EWS

I'm using CreateItem Operation to save message in the Draft folder using EWS with gSOAP toolkit, but when i run the code I've response XML as follows:
<?xml version="1.0" encoding="utf-8"?>
<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">*</Action>
</s:Header>
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorInternalServerError</faultcode>
<faultstring xml:lang="en-US">An internal server error occurred. The operation failed.</faultstring>
<detail>
<e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorInternalServerError</e:ResponseCode>
<e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">An internal server error occurred. The operation failed.</e:Message>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
and in the terminal the fault which i've got is:
SOAP 1.1 fault: SOAP-ENV:MustUnderstand[no subcode]
"The data in element 'Action' must be understood but cannot be processed"
Detail: [no detail]
and there is no compile time error. If you need code, kindly let me know, I'll give that also. Please help me, I've tried a lot, but not find the solution, no matter I change in code, the response XML remains same.
Request XML is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ews="http://schemas.microsoft.com/exchange/services/2006/messages">
<SOAP-ENV:Body>
<ews:CreateItem xsi:type="ews:CreateItemType" MessageDisposition="SaveOnly"><ews:SavedItemFolderId xsi:type="ns1:TargetFolderIdType">
<ns1:DistinguishedFolderId Id="drafts" xsi:type="ns1:DistinguishedFolderIdType"></ns1:DistinguishedFolderId>
</ews:SavedItemFolderId>
<ews:Items xsi:type="ns1:NonEmptyArrayOfAllItemsType">
<ns1:Message xsi:type="ns1:MessageType">
<ns1:ItemClass xsi:type="ns1:ItemClassType">IPM.Note</ns1:ItemClass>
<ns1:Subject xsi:type="xsd:string">Project Action</ns1:Subject>
<ns1:Body BodyType="Text" xsi:type="ns1:BodyType">Priority - Update specification</ns1:Body>
<ns1:Sender xsi:type="ns1:SingleRecipientType">
<ns1:Mailbox xsi:type="ns1:EmailAddressType">
<ns1:EmailAddress xsi:type="ns1:NonEmptyStringType">markzuck93#live.com</ns1:EmailAddress>
</ns1:Mailbox>
</ns1:Sender>
<ns1:ToRecipients xsi:type="ns1:ArrayOfRecipientsType">
<ns1:Mailbox xsi:type="ns1:EmailAddressType">
<ns1:EmailAddress xsi:type="ns1:NonEmptyStringType">openuib#openuib.onmicrosoft.com</ns1:EmailAddress>
</ns1:Mailbox>
</ns1:ToRecipients>
</ns1:Message>
</ews:Items>
</ews:CreateItem>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I would suggest you get rid of all the xsi:type attributes eg how to remove xsi:type information from gSoap message?
Simplified your request should look like
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ews="http://schemas.microsoft.com/exchange/services/2006/messages">
<SOAP-ENV:Body>
<ews:CreateItem MessageDisposition="SaveOnly">
<ews:SavedItemFolderId>
<ns1:DistinguishedFolderId Id="drafts" />
</ews:SavedItemFolderId>
<ews:Items>
<ns1:Message>
<ns1:ItemClass>IPM.Note</ns1:ItemClass>
<ns1:Subject>Project Action</ns1:Subject>
</ns1:Message>
</ews:Items>
</ews:CreateItem>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Which works okay for me.
cheers
Glen
I recently explored the EWS api and found that a Sender tag causes the 500 response with the CreateItem request. Rather, you should be using the From tag.
<ns1:From xsi:type="ns1:SingleRecipientType">
<ns1:Mailbox xsi:type="ns1:EmailAddressType">
<ns1:EmailAddress xsi:type="ns1:NonEmptyStringType">markzuck93#live.com</ns1:EmailAddress>
</ns1:Mailbox>
</ns1:From>

apigee policy error - java.lang.String cannot be cast to com.apigee.flow.message.Message

I am trying to transform a JSON response from a target end point into soap message. I have 2 policies in the post flow.
JSONTOXML - If I disable xsltransform I see the xml result so this work.
xsltransform - this just point to my xsltransform file which has the template and dynamic content supposed to come from the xml from step 1.
Both source and output are set to "response" but it looks like it failed to cast in step 2. What should I make step 2 to pick up the xml and apply the xsl? How else can I do this? Thanks
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JSONToXML async="false" continueOnError="false" enabled="true" name="jsontoxml-2">
<DisplayName>JSONtoXML-2</DisplayName>
<FaultRules/>
<Properties/>
<Options>
<NullValue>NULL</NullValue>
<NamespaceBlockName>#namespaces</NamespaceBlockName>
<DefaultNamespaceNodeName>$default</DefaultNamespaceNodeName>
<NamespaceSeparator>:</NamespaceSeparator>
<TextNodeName>#text</TextNodeName>
<AttributeBlockName>#attrs</AttributeBlockName>
<AttributePrefix>#</AttributePrefix>
<InvalidCharsReplacement>_</InvalidCharsReplacement>
<ObjectRootElementName>Root</ObjectRootElementName>
<ArrayRootElementName>Array</ArrayRootElementName>
<ArrayItemElementName>Item</ArrayItemElementName>
</Options>
<OutputVariable>response</OutputVariable>
<Source>response</Source>
</JSONToXML>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XSL async="false" continueOnError="false" enabled="true" name="xsltransform-1">
<DisplayName>XSLTransform-1</DisplayName>
<FaultRules/>
<Properties/>
<Source>response</Source>
<ResourceURL>xsl://xsltransform-1</ResourceURL>
<Parameters ignoreUnresolvedVariables="true"/>
<OutputVariable>response</OutputVariable>
</XSL>
OutputVariable cannot be set to 'response'.
Try removing the 'OutputVariable' line, or leaving it empty. Removing it, should cause the output to go to the response payload.
In other words, try this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XSL async="false" continueOnError="false" enabled="true" name="xsltransform-1">
<DisplayName>XSLTransform-1</DisplayName>
<FaultRules/>
<Properties/>
<Source>response</Source>
<ResourceURL>xsl://xsltransform-1</ResourceURL>
<Parameters ignoreUnresolvedVariables="true"/>
</XSL>
Is this always the case? Can OutputVariable never be set on response?

Full SOAP syntax for a Sharepoint DspSts.asmx query including dsp:authentication and dsp:dataRoot

I'm trying to retrieve list data from a Sharepoint 2010 server using the webservice at DspSts.asmx. (Nope can't use oData here - long story). The WSDL suggests the following format:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp">
<SOAP-ENV:Header>
<dsp:authentication/>
<dsp:dataRoot>
<dsp:root>STRING </dsp:root>
</dsp:dataRoot>
<dsp:request document="" method=""/>
<dsp:versions>
<dsp:version>STRING </dsp:version>
</dsp:versions>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<dsp:queryRequest/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
So I created the following sample request code (and send it out using Oxygen XML):
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp">
<SOAP-ENV:Header>
<dsp:authentication/>
<dsp:dataRoot allowRemoteDataAccess="true" >
<dsp:root />
</dsp:dataRoot>
<dsp:request service="DspSts" document="content" method="query"></dsp:request>
<dsp:versions>
<dsp:version>1.0</dsp:version>
</dsp:versions>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<dsp:queryRequest>
<dsQuery select="/list[#id='{8F3269B6-02EA-44C5-BA2B-BA8A4D5E9C44}']" resultContent="dataOnly" columnMapping="element" resultRoot="Rows" resultRow="Row">
<Query QueryType="DSPQ">
<Fields>
<AllFields />
</Fields>
</Query>
</dsQuery>"
</dsp:queryRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
However when I send that query I do not get a login prompt (when I use the list web service I get one) and then an error result:
<?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:Client.Dsp.InvalidSite</faultcode>
<faultstring>Failed to verify user permissions.</faultstring>
<detail>
<queryResponse xmlns="http://schemas.microsoft.com/sharepoint/dsp">
<dsQueryResponse status="failure"/>
</queryResponse>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
I'm using a hosted Sharepoint, so I don't know if I can tweak any security setting. Now my questions:
How can I enforce authentication?
What do I need to put into dsp:authentication
What to put in dsp:root
All samples I found didn't have dsp:authentication or dsp:root in it.
Help is very much appreciated
There actually is a work around. If you read a different Sharepoint web service first, e.g. Lists.asmx, then you are properly prompted for credentials and the following calls to DspSts.asmx use the digest credentials created in the first call.