CLEAR(locautXmlDoc); CLEAR(locautSoapHttpConnector); CLEAR(locautSoapSerializer); CREATE(locautSoapHttpConnector); locautSoapHttpConnector.Property('EndPointURL','https://api-3t.paypal.com/2.0/'); locautSoapHttpConnector.Connect; locautSoapHttpConnector.Property('AuthUser', User); locautSoapHttpConnector.Property('AuthPassword', Password); locautSoapHttpConnector.Property('Timeout', 5 * 1000); locautSoapHttpConnector.Property('SoapAction','http://www.paypal.com/wsdl/PayPalSvc.wsdl'); locautSoapHttpConnector.BeginMessage; CREATE(locautSoapSerializer); locautSoapSerializer.Init(locautSoapHttpConnector.InputStream); locautSoapSerializer.startEnvelope('SOAP','STANDARD'); locautSoapSerializer.startHeader; locautSoapSerializer.startHeaderElement('RequesterCredentials'); locautSoapSerializer.startHeaderElement('Credentials'); locautSoapSerializer.startHeaderElement('Username'); locautSoapSerializer.writeString(User); locautSoapSerializer.endHeaderElement; locautSoapSerializer.startHeaderElement('Password'); locautSoapSerializer.writeString(Password); locautSoapSerializer.endHeaderElement; locautSoapSerializer.startHeaderElement('Signature'); locautSoapSerializer.writeString(AuthToken); locautSoapSerializer.endHeaderElement; locautSoapSerializer.endHeaderElement; locautSoapSerializer.endHeaderElement; locautSoapSerializer.endHeader; locautSoapSerializer.startBody; locautSoapSerializer.startElement('GetBalanceReq'); locautSoapSerializer.startElement('GetBalanceRequest'); locautSoapSerializer.startElement('Version'); locautSoapSerializer.writeString('51'); locautSoapSerializer.endElement; locautSoapSerializer.startElement('ReturnAllCurrencies'); locautSoapSerializer.writeString('0'); locautSoapSerializer.endElement; locautSoapSerializer.endElement; locautSoapSerializer.endElement; locautSoapSerializer.endBody; locautSoapSerializer.endEnvelope; locautSoapHttpConnector.EndMessage; CREATE(locautXmlDoc); locautXmlDoc.load(locautSoapHttpConnector.OutputStream); Speichername := 'N:\'+Datumsformatierung(TODAY)+'_GetBalance.xml'; locautXmlDoc.save(Speichername);
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <SOAP:Envelope SOAP:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Header> <RequesterCredentials> <Credentials> <Username>User</Username> <Password>Password</Password> <Signature>Authtoken</Signature> </Credentials> </RequesterCredentials> </SOAP:Header> <SOAP:Body> <GetBalanceReq> <GetBalanceRequest> <Version>51</Version> <ReturnAllCurrencies>0</ReturnAllCurrencies> </GetBalanceRequest> </GetBalanceReq> </SOAP:Body> </SOAP:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:ns="urn:ebay:api:PayPalAPI"> <SOAP-ENV:Header> <Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext" xsi:type="wsse:SecurityType"/> <RequesterCredentials xmlns="urn:ebay:api:PayPalAPI" xsi:type="ebl:CustomSecurityHeaderType"> <Credentials xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:UserIdPasswordType"/> </RequesterCredentials> </SOAP-ENV:Header> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" id="_0"> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Client</faultcode> <faultstring>Method 'GetBalanceReq' not implemented</faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Comments
I am trying to use SOAP API to achieve this.
it will be great if you can help me on this.
Thanks
U Prem Kumaran