I try to create a payment system with SOAP for ipayment (Germany) and in its documentation it is described that with the following SOAP request I might get the response shown in second code example.
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<capture>
<accountData>
<accountId>99999</accountId>
<trxuserId>99999</trxuserId>
<trxpassword>0</trxpassword>
<adminactionpassword>
5cfgRT34xsdedtFLdfHxj7tfwx24fe</adminactionpassword>
</accountData>
<origTrxNumber>1-25949395</origTrxNumber>
<transactionData>
<trxAmount>119</trxAmount>
<trxCurrency>EUR</trxCurrency>
</transactionData>
</capture>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
And example response from server is
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:captureResponse
xmlns:ns1="https://ipayment.de/service_v3/binding">
<ipaymentReturn>
<status>SUCCESS</status>
<successDetails>
<retTransDate>25.07.08</retTransDate>
<retTransTime>17:08:08</retTransTime>
<retTrxNumber>1-25949407</retTrxNumber>
<retAuthCode></retAuthCode>
</successDetails>
<addressData>
<addrStreet>Ernst-Frey-Str. 9</addrStreet>
<addrCity>Karlsruhe</addrCity>
<addrZip>76135</addrZip>
<addrCountry>DE</addrCountry>
</addressData>
<addresscheckResult>UNCHECKED</addresscheckResult>
<paymentMethod>VisaCard</paymentMethod>
<trxPaymentDataCountry>US</trxPaymentDataCountry>
</ipaymentReturn>
</ns1:captureResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But I have no idea how to create the request as shown with grails. I try to use Spring WS plugin but the sample codes in documentation doesn't help at all. Do you know any source for some examples or any idea? WSDL schema can be found at https://ipayment.de/service/3.0/?wsdl
Thanks.
If cookies are not needed for authentication to the WS (and they shouldn't :-) ), groovy-wslite is a nice library to use to create SOAP request.
Another method is to use HTTPBuilder which allows you to create tour exact requests and handle cookies if needed (You can do that with wslite, but with a bit more work)
If you are scripting, a tip could be to use curl (if you have that available) directly from groovy. It's pretty powerful, easy to handle and you can do it in a one-liner.
Eg:
"curl -d \"${payload}\" -H \"Content-Type: text/xml\" ${wsUrl}".execute.text
Where the payload is the request(including the soap-envelope).
Related
I've been working on a "kind" of integration with NetSuite. We are using Suitetalk/SOAP webservices in order to pull and push some data, basic stuff only as I'm not a netsuite expert.
It's been working good pulling data from Netsuite and pushing (adding) vendorBill only. At this point everything is working good.
But then I was requested to add (create) purchase orders and also itemReceipts.
I've managed to create purchase order but I'm struggling trying to create the itemReceipt. When I send it to Netsuite I get the error "Adding new line to sublist expense is not allowed.".
Follow below the request and the response xml.
Can someone help me to spot what I am doing wrong? what is missing?
Thank you very much. Cheers.
REQUEST
<?xml version="1.0"?>
-<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-<soap:Header>
-<preferences xmlns="urn:messages_2019_1.platform.webservices.netsuite.com">
<warningAsError>false</warningAsError>
<ignoreReadOnlyFields>true</ignoreReadOnlyFields>
</preferences>
-<tokenPassport xmlns="urn:messages_2019_1.platform.webservices.netsuite.com">
<account xmlns="urn:core_2019_1.platform.webservices.netsuite.com">1111111_SB1</account>
<consumerKey xmlns="urn:core_2019_1.platform.webservices.netsuite.com">****************************************************************</consumerKey>
<token xmlns="urn:core_2019_1.platform.webservices.netsuite.com">****************************************************************</token>
<nonce xmlns="urn:core_2019_1.platform.webservices.netsuite.com">1111100</nonce>
<timestamp xmlns="urn:core_2019_1.platform.webservices.netsuite.com">11111899</timestamp>
<signature xmlns="urn:core_2019_1.platform.webservices.netsuite.com" algorithm="HMAC-SHA1">****************************</signature>
</tokenPassport>
</soap:Header>
-<soap:Body>
-<add xmlns="urn:messages_2019_1.platform.webservices.netsuite.com">
-<record xmlns:q1="urn:purchases_2019_1.transactions.webservices.netsuite.com" xsi:type="q1:ItemReceipt">
<q1:entity type="vendor" internalId="19918834"/>
<q1:subsidiary internalId="15"/>
<q1:createdFrom type="purchaseOrder" internalId="28854986"/>
<q1:tranDate>2020-01-31T08:21:38.7482415Z</q1:tranDate>
<q1:memo>test memo</q1:memo>
<q1:currency type="currency" internalId="1"/>
-<q1:itemList>
-<q1:item>
<q1:itemReceive>true</q1:itemReceive>
<q1:item type="inventoryItem" internalId="1238"/>
<q1:location type="location" internalId="26"/>
<q1:quantity>1</q1:quantity>
<q1:rate>200</q1:rate>
</q1:item>
</q1:itemList>
-<q1:expenseList>
-<q1:expense>
<q1:markReceived>true</q1:markReceived>
<q1:account>117</q1:account>
<q1:amount>0</q1:amount>
</q1:expense>
</q1:expenseList>
</record>
</add>
</soap:Body>
</soap:Envelope>
RESPONSE
<?xml version="1.0"?>
-<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-<soapenv:Header>
-<platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2019_1.platform.webservices.netsuite.com">
<platformMsgs:nsId>WEBSERVICES_1111111_SB1_013120208906514922222545436_466a0e814</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
-<soapenv:Body>
-<addResponse xmlns="urn:messages_2019_1.platform.webservices.netsuite.com">
-<writeResponse>
-<platformCore:status xmlns:platformCore="urn:core_2019_1.platform.webservices.netsuite.com" isSuccess="false">
-<platformCore:statusDetail type="ERROR">
<platformCore:code>USER_ERROR</platformCore:code>
<platformCore:message>Adding new line to sublist expense is not allowed.</platformCore:message>
</platformCore:statusDetail>
</platformCore:status>
</writeResponse>
</addResponse>
</soapenv:Body>
</soapenv:Envelope>
Bit late, but anyone else finding themselves here. Its because the order line was not supplied. If you don't supply it NS thinks you are creating a new line which you are not allwoed to do.
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:.
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>
I am trying to integrate Siebel CRM with SAP system via...
The problem is : the SOAP request that siebel is generating is giving me an error while if I use SOAP UI to generate the SOAP request, it is working fine. Following are the error mesages and SOAP requests generated
Error from siebel SOAP request :
CX_ST_MATCH_ELEMENT:.System expected element 'PiCopyreference'".(SBL-EAI-04308)
Unsuccessful Siebel generated SOAP Request:-
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<CustomerCreatefromdata1 xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
<PiCompanydata xmlns="urn:sap-com:document:sap:soap:functions:mc-style"></PiCompanydata>
<PiCopyreference xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
<Salesorg xmlns="urn:sap-com:document:sap:soap:functions:mc-style">0001</Salesorg>
<DistrChan xmlns="urn:sap-com:document:sap:soap:functions:mc-style">01</DistrChan>
<Division xmlns="urn:sap-com:document:sap:soap:functions:mc-style">01</Division>
<RefCustmr xmlns="urn:sap-com:document:sap:soap:functions:mc-style">0000000011</RefCustmr>
</PiCopyreference>
<PiOptCompanydata xmlns="urn:sap-com:document:sap:soap:functions:mc-style"></PiOptCompanydata>
<PiOptPersonaldata xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
<Transpzone xmlns="urn:sap-com:document:sap:soap:functions:mc-style">0000000001</Transpzone>
</PiOptPersonaldata>
<PiPersonaldata xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
<TitleP xmlns="urn:sap-com:document:sap:soap:functions:mc-style">MR</TitleP>
<Firstname xmlns="urn:sap-com:document:sap:soap:functions:mc-style">FirstN</Firstname>
<Lastname xmlns="urn:sap-com:document:sap:soap:functions:mc-style">lastN</Lastname>
<City xmlns="urn:sap-com:document:sap:soap:functions:mc-style">SomeCity</City>
<PostlCod1 xmlns="urn:sap-com:document:sap:soap:functions:mc-style">7866</PostlCod1>
<Country xmlns="urn:sap-com:document:sap:soap:functions:mc-style">AT</Country>
<LanguP xmlns="urn:sap-com:document:sap:soap:functions:mc-style">E</LanguP>
<Currency xmlns="urn:sap-com:document:sap:soap:functions:mc-style">INR</Currency>
</PiPersonaldata>
</CustomerCreatefromdata1>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Successfull SOAP UI generated request :-
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
<soapenv:Header/>
<soapenv:Body>
<urn:CustomerCreatefromdata1>
<PiCompanydata/>
<PiCopyreference>
<Salesorg>0001</Salesorg>
<DistrChan>01</DistrChan>
<Division>01</Division>
<RefCustmr>0000000011</RefCustmr>
</PiCopyreference>
<PiOptCompanydata/>
<PiOptPersonaldata>
<Transpzone>0000000001</Transpzone>
</PiOptPersonaldata>
<PiPersonaldata>
<TitleP>MR</TitleP>
<Firstname>FirstN</Firstname>
<Lastname>lastN</Lastname>
<City>SomeCity</City>
<PostlCod1>7866</PostlCod1>
<Country>AT</Country>
<LanguP>E</LanguP>
<Currency>INR</Currency>
</PiPersonaldata>
</urn:CustomerCreatefromdata1>
</soapenv:Body>
</soapenv:Envelope>
Also in siebel i'm generating the SOAP request using workflows(no scripting involved).
Could be namespace issue. In the Siebel external IO, you could try inactivating all the user properties for namespace at ICField level.
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.