For XML ILL Response, YAZ prints Octet aligned buf (presumably XML)
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 14 Aug 2007 12:21:14 +0000 (12:21 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 14 Aug 2007 12:21:14 +0000 (12:21 +0000)
if that is the ItemRequest EXTERNAL in the targetPart structure.

client/client.c

index 23e9af2..ce1adba 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2007, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: client.c,v 1.348 2007-07-13 09:28:43 adam Exp $
+ * $Id: client.c,v 1.349 2007-08-14 12:21:14 adam Exp $
  */
 /** \file client.c
  *  \brief yaz-client program
@@ -1915,6 +1915,20 @@ void process_ESResponse(Z_ExtendedServicesResponse *res)
                 }
             }
         }
+        if (ext->which == Z_External_itemOrder)
+        {
+            Z_IOTaskPackage *otp = ext->u.itemOrder->u.taskPackage;
+            if (otp && otp->targetPart && otp->targetPart->itemRequest)
+            {
+                Z_External *ext = otp->targetPart->itemRequest;
+                if (ext->which == Z_External_octet)
+                {
+                    Odr_oct *doc = ext->u.octet_aligned;
+                    printf("Got itemRequest doc %.*s\n",
+                           doc->len, doc->buf);
+                }
+            }
+        }
     }
     if (res->taskPackage && res->taskPackage->which == Z_External_octet)
     {