Skip to Content
avatar image
Former Member

WebServiceUtilities.ExecuteWebService Example

Hi all,

please give me an example of how to add the parameters to ExecuteWebService() function, so I can call the web service.

var serviceID : LANGUAGEINDEPENDENT_Text;
var parameter : NameAndValue;
var parameters : collectionof NameAndValue;

serviceID = ...; // Where can I obtain the ID?
parameter.Name = ...; // Here I need help 
parameter.Value = ...; // Here I need help
parameters.Add(parameter);

var result = WebServiceUtilities.ExecuteWebService(serviceID, parameters);
var content = result.ResponseContent;
var returnCode = result.ReturnCode;

For example I have this web service that has to be called with WebServiceUtilities.ExecuteWebService():

<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
<soap:Header/>
<soap:Body>
  <glob:PointOfSaleTransactionBundleNotification>
    <MessageHeader>
      <CreationDateTime>2016-11-10T10:24:58.375+01:00</CreationDateTime>
      <SenderParty>
        <InternalID schemeID="CommunicationSystemID" schemeAgencyID="310">JAVAPOS</InternalID>
      </SenderParty>
      <BusinessScope>
        <TypeCode>3</TypeCode>
        <ID>301</ID>
      </BusinessScope>
    </MessageHeader>
    <PointOfSaleTransactionBundleNotification>
      <ExternalID>9820100010044</ExternalID>
      <Note>9820100010044 16.50 CHF</Note>
      <TypeCode>1</TypeCode>
<BusinessTransactionDate>2016-11-10</BusinessTransactionDate>
      <CompanyID>10000</CompanyID>
      <RetailTransactionSalesItem>
          <ExternalID>S1</ExternalID>
          <TypeCode>1</TypeCode>
          <Note>Minikrippe 'Piccola'</Note>
      </RetailTransactionSalesItem>
.........

Kind regards,

Ciprian Nasalean

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers