Advertisement
Guest User

Untitled

a guest
Sep 4th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 1.38 KB | None | 0 0
  1. #include "AddressValidationServiceSoapBinding.nsmap"
  2. #include "soapH.h"
  3.  
  4. struct Result
  5. {
  6.     char *soap_error;
  7.     struct ns2__AddressValidationReply AddressValidationReply;
  8. };
  9.  
  10. struct /*ns2__AddressValidationReply*/ Result validate_address(struct soap *soap, char *base_url, struct ns2__AddressValidationRequest *ptr_AddressValidationRequest)
  11. {
  12.  
  13.     struct ns2__AddressValidationReply AddressValidationReply;
  14.  
  15.     char soap_endpoint[36] = "/web-services/addressvalidation";
  16.     char soap_url[100] = "";
  17.  
  18.     strcat(soap_url, base_url);
  19.     strcat(soap_url, soap_endpoint);
  20.  
  21.     if (
  22.         soap_call___ns2__addressValidation(soap, soap_url,
  23.                                            NULL,
  24.                                            ptr_AddressValidationRequest,
  25.                                            &AddressValidationReply) == SOAP_OK)
  26.     {
  27.     }
  28.     else
  29.     {
  30.         char xx[3000] = "";
  31.         soap_sprint_fault(soap, xx, 3000);
  32.  
  33.         printf("s = %s", xx);
  34.  
  35.         //soap_print_fault(soap, stderr);
  36.         //free (AddressValidationReply); // TODO
  37.         //struct /*ns2__AddressValidationReply*/Result empty = {0};
  38.         //return empty;
  39.  
  40.         struct Result aa = {
  41.             xx,
  42.             AddressValidationReply};
  43.  
  44.          return aa;
  45.     }
  46.  
  47.     struct Result aa = {
  48.         NULL,
  49.         AddressValidationReply};
  50.  
  51.     return aa;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement