motabik Posted December 9, 2014 Share Posted December 9, 2014 HiI have little problem with webserviceI link my excel with webservice and I try add new manufacturerMy program send information to web service , and a get answer 201 Created.But in shop this manufacturer don't added.Please helpHere is my codesURL = "http://xxx/api/manufacturers/" sEnv = "<?xml version=""1.0"" encoding=""utf-8""?>" sEnv = sEnv & "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" sEnv = sEnv & " <soap:Body>" sEnv = sEnv & "<prestashop xmlns:xlink=""http://www.w3.org/1999/xlink"">"sEnv = sEnv & "<manufacturer><id>2</id><active>1</active><link_rewrite not_filterable=""true"">fashion-manufacturer</link_rewrite>"sEnv = sEnv & "<name>Fashion Manufacturer_new</name><date_add></date_add><date_upd></date_upd><description><language id=""1"" xlink:href=""http://XXXXXX/api/languages/1""></language></description><short_description><language id=""1"" xlink:href=""http://XXXXXX/api/languages/1""></language></short_description><meta_title>"sEnv = sEnv & "<language id=""1"" xlink:href=""http://XXXXXX/api/languages/1""></language></meta_title><meta_description><language id=""1"" xlink:href=""http://XXXXXX/api/languages/1""></language></meta_description><meta_keywords><language id=""1"" xlink:href=""http://XXXXXX/api/languages/1""></language></meta_keywords><associations><addresses node_type=""addresses""><addresses xlink:href=""http://XXXXXX/api/addresses/3""><id xlink:href=""http://XXXXXX/api/addresses/3"">3</id></addresses></addresses></associations></manufacturer></prestashop>" sEnv = sEnv & " </soap:Body>" sEnv = sEnv & "</soap:Envelope>" Cells(1, 1) = sEnv With xmlhtp .Open "post", sURL, False, "XXXXXXXX" .setRequestHeader "Host", "XXXXX" .setRequestHeader "Content-Type", "text/xml; charset=utf-8" .setRequestHeader "soapAction", "http://xxxxxx@xxxx/api/manufacturers/" .setRequestHeader "Accept-encoding", "zip" .setRequestHeader "user", "xxxxxxx" .send (sEnv) MsgBox .Status & .statusText .abort End With Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now