jmckay123 Absent Member.
Absent Member.
313 views

Using createItemRequest to create a folder

I am trying to create a folder in the cabinet. Take a look at the following code that I am submitting:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.novell.com/2005/01/GroupWise/types"
xmlns:m="http://schemas.novell.com/2005/01/GroupWise/methods">
<soap:Header soap:encodingStyle="">
<session>ihjhElJp4kPFizYS</session>
</soap:Header>
<soap:Body>
<m:createItemRequest>
<item types="Folder">
<container>6.Transend.PO.100.0.1.0.1@15</container>
<name>Space</name>
</item>
</m:createItemRequest>
</soap:Body>
</soap:Envelope>

The value of container is that of the Cabinet, which I got from the list of folders provided by getFolderListRequest. The GroupWise server responds with http code 200, and gives me response
text that includes a code of 0 and and an id code. It seemed to work, however I can see no sign of a created folder in my user's account. Neither with the GW client,
or by subsequently listing the folders with my code. Can somebody explain this, and give me the correct formatting of a request to create a folder?
Labels (1)
0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Using createItemRequest to create a folder

Sorry, this is the client that I had available at the time.
It is a little verbose in providing the namespaces:

<?xml version="1.0"?>
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
<ns0:Header>
<ns1:session
xmlns:ns1="http://schemas.novell.com/2005/01/GroupWise/types">1vqHL6IVBRI7hw
mU</ns1:session>
</ns0:Header>
<ns0:Body>
<ns2:createItemRequest
xmlns:ns2="http://schemas.novell.com/2005/01/GroupWise/groupwise.wsdl">
<ns2:item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="Folder">
<ns1:name
xmlns:ns1="http://schemas.novell.com/2005/01/GroupWise/types">Space</ns1:nam
e>
<ns1:parent
xmlns:ns1="http://schemas.novell.com/2005/01/GroupWise/types">C.PROVO6.PRV6-
4.100.0.1.0.1@21</ns1:parent>
</ns2:item>
</ns2:createItemRequest>
</ns0:Body>
</ns0:Envelope>

The only thing I saw, was "types=Folder".
You might also need to provide the correct namespace prefixes.
on all of the elements.

Give that a try.
Let me know if you still have problems.

Preston


>>>


> I am trying to create a folder in the cabinet. Take a look at the
> following code that I am submitting:
>
> <?xml version="1.0" encoding="utf‑8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:t="http://schemas.novell.com/2005/01/GroupWise/types"
> xmlns:m="http://schemas.novell.com/2005/01/GroupWise/methods">
> <soap:Header soap:encodingStyle="">
> <session>ihjhElJp4kPFizYS</session>
> </soap:Header>
> <soap:Body>
> <m:createItemRequest>
> <item types="Folder">
> <container>6.Transend.PO.100.0.1.0.1@15</container>
> <name>Space</name>
> </item>
> </m:createItemRequest>
> </soap:Body>
> </soap:Envelope>
>
> The value of container is that of the Cabinet, which I got from the list
> of folders provided by getFolderListRequest. The GroupWise server
> responds with http code 200, and gives me response
> text that includes a code of 0 and and an id code. It seemed to work,
> however I can see no sign of a created folder in my user's account.
> Neither with the GW client,
> or by subsequently listing the folders with my code. Can somebody
> explain this, and give me the correct formatting of a request to create
> a folder?


0 Likes
jmckay123 Absent Member.
Absent Member.

Re: Using createItemRequest to create a folder

You're right, changing "types" to "type" made the difference (also using "parent" instead of "container"). I only used "Types" because that was in the example of creating a contact item in the documentation, not a good place for a typo. If you happen to have examples of creating a mail, task and calendar item, that might save me some time, although I will try to figure that out on my own. Thanks again for your help.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.