Guest User

knuckl_es

a guest
Mar 29th, 2009
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.15 KB | None | 0 0
  1. 8<--8<--8<--8<--8<--8<--8<--8<--8<--
  2.  
  3.     MerchantInterfaceProxy amazon;
  4.  
  5.     amazon.userid = "[email protected]";
  6.     amazon.passwd = "xxxx";
  7.  
  8.  
  9.     ns1__Merchant merchant;
  10.     merchant.merchantName = new std::string("[email protected]");
  11.     merchant.merchantIdentifier = new std::string("xxxxx");
  12.  
  13.     QString type = "_POST_PRODUCT_DATA_";
  14.  
  15.     xsd__base64Binary href_doc;
  16.     unsigned char blub[] = "";
  17.  
  18.     href_doc.__ptr = blub;
  19.     href_doc.__size = sizeof(blub);
  20.     href_doc.id = "productdata.xml";
  21.  
  22.     xsd__base64Binary real_doc;
  23.     unsigned char real_cont[] = "<asd></asd>";
  24.  
  25.     real_doc.__ptr = real_cont;
  26.     real_doc.__size = sizeof(real_cont);
  27.  
  28.     /* initialize and enable MIME */
  29.     soap_set_mime(&amazon, "MIME_boundary", NULL);
  30.  
  31. @@  soap_set_mime_attachment(&amazon, (char*)real_cont, sizeof(real_cont), SOAP_MIME_BASE64, "text/xml; charset=UTF-8", "<http://xxxxxx.de/productdata.xml>", "productdata.xml", NULL);
  32.  
  33.  
  34.     ns1__DocumentSubmissionResponse response;
  35.  
  36.     if (amazon.postDocument(&merchant, type.toStdString(), href_doc, &response) == SOAP_OK)
  37.     {
  38.         soap_clr_mime(&amazon);
  39.         std::cout << response.documentTransactionID << std::endl;
  40.  
  41.  
  42.  
  43. 8<--8<--8<--8<--8<--8<--8<--8<--8<--
Add Comment
Please, Sign In to add comment