Making PUT requests to Atom collections
A web client can edit an existing Atom entry in a collection by making an HTTP PUT request to the URL of the Atom entry, as stated in the <atom:link rel="edit"> element of the entry.
About this task
Procedure
Results
When your request is accepted, the server sends an HTTP response with the status code 200, indicating successful completion of the request, or a suitable error response. CICS returns a copy of the edited Atom entry as the body of the response, so that you can verify your changes if you want.
As for a POST request, if you receive an error response, read the message body for the response, and refer to the list of status codes that CICS provides to web clients in HTTP status code reference for CICS web support. For an error response that might indicate a problem with your request, check for message DFHML0100 from the CICS region, and consult the z/OS XML System Services User's Guide and Reference for an explanation of the return code and reason code.
Example
http://www.example.com:80/web20/entry/10 :PUT /web20/entry/10 HTTP/1.1
Host: www.example.com:80
Content-Type: application/atom+xml;type=entry
Content-Length: 1034
If-Match: c4826af12991fb102ef13099c927c2ac24e4caa2
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app">
<generator uri="http://www.ibm.com/cics/" version="6.6.0">
CICS Transaction Server Version 4.1.0
</generator>
<link rel="self" href="http://www.example.com:80/web20/entry/10"/>
<link rel="edit" href="http://www.example.com:80/web20/entry/10"/>
<id>tag:http://www.example.com/web20/myfeed,2009-01-20:tsqueue:WB20TSQ:10</id>
<title>This is my updated entry</title>
<summary>
This is my new updated entry
</summary>
<category term="Test Feeds"/>
<rights>Copyright (c) 2009, Joe Bloggs</rights>
<published>2009-04-23T15:00:44+00:00</published>
<author>
<name>Joe Bloggs</name>
<email>JBloggs@example.com</email>
<uri>http://www.example.com/JBloggs/</uri>
</author>
<app:edited>2009-04-23T15:00:44+00:00</app:edited>
<updated>2009-04-23T15:00:44+00:00</updated>
<content type="text/xml">
<SAMPBIND xmlns="http://www.ibm.com/xmlns/prod/cics/atom/bindfile/sampbind">
<data_field>
Here is new content for my updated entry
</data_field>
</SAMPBIND>
</content>
</entry>