Home > Mobile >  SOAP API "reverse engineer"
SOAP API "reverse engineer"

Time:04-12

I am trying to figure some SOAP API stuff.

I recently performed a successful call. Its SOAPAction was http://EDPS.ServiceModel.Terminals/ITerminalOperations/DoTransaction, and the body was:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<DoTransaction xmlns="http://EDPS.ServiceModel.Terminals">
<request i:type="a:FinancialRequest" xmlns:a="http://schemas.datacontract.org/2004/07/EDPS.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:MessageType>FinancialTransaction</a:MessageType>
<a:Amount>100</a:Amount>
<a:AuthId i:nil="true"/>
<a:Cashier>1234</a:Cashier>
<a:ECRReferenceNumber i:nil="true"/>
<a:InstPart>0</a:InstPart>
<a:Installments>0</a:Installments>
<a:PostDating>0</a:PostDating>
<a:ReceiptNumber i:nil="true"/>
<a:TipAmount>0</a:TipAmount>
<a:UseTerminalPrinter>false</a:UseTerminalPrinter>
<a:TransactionType>Sale</a:TransactionType>
</request>
</DoTransaction>
</s:Body>
</s:Envelope>

The url was on a local service, http://localhost:8000/EDPOS/service?wsdl. When I try to access that location with a browser, it opens an xml file with some definitions. I can see numerous SOPActions in there, one of which is the one I used.

Question: Am I able to traverse through the xml, or the various links inside it, or anything else, to figure what kind of body the other SOAPActions need?

CodePudding user response:

Download SoapUI (https://www.soapui.org/) it's my favorite tool for these kind of things, load your wsdl (http://localhost:8000/EDPOS/service?wsdl) into a new project, and let SoapUI breakdown all the calls, attributes, methods, etc. for you - It will provide you a visual map and a very easy way to understand what possibilities there are of interacting with the service.

  • Related