cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
bofort
Nintex Newbie

Call web service Sites.asmx CreateWeb method

Hello,

Can someone explain me how to use this method?

My request message:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/sharepoint/soap/">
<soap:Header>
</soap:Header>
<soap:Body>
<m:CreateWeb>
<m:url>https://url/{WorkflowVariable:title}</m:url>
<m:title>{ItemProperty:Title}</m:title>
<m:description>
</m:description>
<m:templateName>{WorkflowVariable:template}</m:templateName>
<m:language>English</m:language>
<m:locale>
</m:locale>
<m:collationLocale>
</m:collationLocale>
<m:uniquePermissions>true</m:uniquePermissions>
<m:anonymous>false</m:anonymous>
<mSmiley Tongueresence>true</mSmiley Tongueresence>
</m:CreateWeb>
</soap:Body>
</soap:Envelope>

Result:

The remote server returned an error: (500) Internal Server Error.

And I don't know, what I do wrong...

Labels: (2)
0 Kudos
Reply
1 Reply
mlauer
Nintex Newbie

Re: Call web service Sites.asmx CreateWeb method

Without knowing of Action configuration and variable values it is hard to help.

Please use Chrome browser with Wizdler extension to test soap services, it will give complete soap response with error message in faultstring.

This is a working example:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Body>
        <CreateWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/">
            <url>test</url>
            <title>test</title>
            <description>test</description>
            <templateName>STS#0</templateName>
            <language>1031</language>
            <locale>1031</locale>
            <collationLocale>1031</collationLocale>
            <uniquePermissions>false</uniquePermissions>
            <anonymous>false</anonymous>
            <presence>false</presence>
        </CreateWeb>
    </Body>
</Envelope>

Response:

<?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>
        <CreateWebResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
            <CreateWebResult>
                <CreateWeb Url="https://xx.xxx.xx/intranet/home/xx/xxx/test" />
            </CreateWebResult>
        </CreateWebResponse>
    </soap:Body>
</soap:Envelope>

omitting value for <collationLocale></collationLocale> response is:

<?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</faultcode>
            <faultstring>Die Anforderung konnte vom Server nicht gelesen werden. ---&gt; Fehler im XML-Dokument (10,48). ---&gt; Die Eingabezeichenfolge hat das falsche Format.</faultstring>
            <detail />
        </soap:Fault>
    </soap:Body>
</soap:Envelope>
0 Kudos
Reply