0

There's this web service I want to connect to. It's fully detailed here: https://simphonytsapi.docs.apiary.io/#reference/calculatetransactiontotals/overview/example-1?console=1

As you can see there's details on the right on how to connect to it. For example to call the CalculateTransactionTotals method of the web service there is:

  • This .asmx URL: https://private-102dc-simphonytsapi.apiary-mock.com/1/EGateway/SimphonyPosApiWeb.asmx

  • And these headers:

    Content-Type           text/xml;charset=UTF-8
    SOAPAction             http://micros-hosting.com/EGateway/CalculateTransactionTotals
    
  • And this example request body:

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <soap:Body>
         <CalculateTransactionTotals xmlns="http://micros-hosting.com/EGateway/">
             <vendorCode />
             <ppMenuItems />
             <ppComboMeals>
                 <SimphonyPosApi_ComboMeal>
                     <ComboMealMainItem>
                         <Condiments />
                         <MenuItem>
                             <ItemDiscount>
                                 <DiscObjectNum>0</DiscObjectNum>
                             </ItemDiscount>
                             <MiObjectNum>181020001</MiObjectNum>
                             <MiReference />
                             <MiWeight />
                             <MiMenuLevel>1</MiMenuLevel>
                             <MiSubLevel>1</MiSubLevel>
                             <MiPriveLevel>0</MiPriveLevel>
                         </MenuItem>
                     </ComboMealMainItem>
                     <ComboMealMenuItem>
                         <Condiments />
                         <MenuItem>
                             <ItemDiscount>
                                 <DiscObjectNum>0</DiscObjectNum>
                             </ItemDiscount>
                             <MiObjectNum>181010001</MiObjectNum>
                             <MiReference />
                             <MiWeight />
                             <MiMenuLevel>1</MiMenuLevel>
                             <MiSubLevel>1</MiSubLevel>
                             <MiPriveLevel>0</MiPriveLevel>
                         </MenuItem>
                     </ComboMealMenuItem>
                     <ComboMealObjectNum>11</ComboMealObjectNum>
                     <SideItems>
                         <SimphonyPosApi_MenuItem>
                             <Condiments />
                             <MenuItem>
                                 <ItemDiscount>
                                     <DiscObjectNum>0</DiscObjectNum>
                                 </ItemDiscount>
                                 <MiObjectNum>181030001</MiObjectNum>
                                 <MiReference />
                                 <MiWeight />
                                 <MiMenuLevel>1</MiMenuLevel>
                                 <MiSubLevel>1</MiSubLevel>
                                 <MiPriveLevel>0</MiPriveLevel>
                             </MenuItem>
                         </SimphonyPosApi_MenuItem>
                         <SimphonyPosApi_MenuItem>
                             <Condiments />
                             <MenuItem>
                                 <ItemDiscount>
                                     <DiscObjectNum>0</DiscObjectNum>
                                 </ItemDiscount>
                                 <MiObjectNum>299030001</MiObjectNum>
                                 <MiReference />
                                 <MiWeight />
                                 <MiMenuLevel>1</MiMenuLevel>
                                 <MiSubLevel>1</MiSubLevel>
                                 <MiPriveLevel>0</MiPriveLevel>
                             </MenuItem>
                         </SimphonyPosApi_MenuItem>
                     </SideItems>
                 </SimphonyPosApi_ComboMeal>
             </ppComboMeals>
             <pSvcCharge>
                 <SvcChgObjectNum>0</SvcChgObjectNum>
             </pSvcCharge>
             <pSubtotalDiscount>
                 <DiscObjectNum>0</DiscObjectNum>
             </pSubtotalDiscount>
             <revenueCenter>11</revenueCenter>
             <orderType>1</orderType>
             <employeeNumber>900000092</employeeNumber>
             <pTotalsResponse />
         </CalculateTransactionTotals>
     </soap:Body>
    </soap:Envelope>
    

I need the WSDL to connect to this web service. How do I get it?

User104163
  • 532
  • 6
  • 17
  • Normally it should be at `https://private-102dc-simphonytsapi.apiary-mock.com/1/EGateway/SimphonyPosApiWeb.asmx?wsdl` but for me it shows 404 errors for both this and the endpoint. See also https://stackoverflow.com/questions/19311393/is-it-mandatory-to-have-a-wsdl-definition-accessible-using-wsdl – Bogdan Nov 24 '22 at 20:01
  • @Bogdan I tried running the curl on another website (https://reqbin.com/curl) and it works. So what could be the issue? – User104163 Nov 26 '22 at 16:25
  • What do you mean by "it works"? I get a page telling me 404 resource not found, when I should be getting back the WSDL instead. If you get the same 404 response, then it means they disallowed that `?wsdl` option and instead of providing a WSDL document they offer that interface of theirs to test the service. Do you have someone to contact and ask how you can get a WSDL? – Bogdan Nov 27 '22 at 10:59
  • @Bogdan No I meant their curl works. Here is the curl I ran: https://justpaste.it/cfglz – User104163 Nov 27 '22 at 15:47
  • In your question you say you need the WSDL of the service. But in the `curl` command you are showing me a SOAP request message. You might be confusing two things here. What exactly are you trying to do? – Bogdan Nov 27 '22 at 17:15
  • @Bogdan Well I'm trying to connect the web service to Oracle Integration (using a soap adapter). It requires the WSDL to create the connection. – User104163 Nov 27 '22 at 17:33
  • @Bogdan I was thinking maybe there's a way to get the wsdl from the curl? – User104163 Nov 28 '22 at 09:21
  • The service needs to expose the WSDL, and apparently it does not. I skimmed through those documentation pages from the link you posted and I don't see any reference to a WSDL. Replacing the WSDL with a fancy invocable documentation UI is just silly, considering that the WSDL is very useful in creating the client code for the invocation. You can build a WSDL from the SOAP messages and the documentation details, if you know what you are doing, but the service should just provide you with one. Can you contact them and ask how you can get a WSDL? – Bogdan Nov 28 '22 at 18:21
  • 1
    @Bogdan An Oracle Simphony representative did email me asking if I had any questions. I'll ask him this and tell you what he responds. – User104163 Nov 28 '22 at 18:42
  • @Bogdan So they don't seem to be responding. Do you by any chance know to create a WSDL using a SOAP payload? I tried asking a separate question about it but it's been 5 days and nobody answered: https://stackoverflow.com/questions/74669739/how-do-you-create-a-wsdl-using-a-soap-request-and-response – User104163 Dec 09 '22 at 12:35
  • You need to 1. generate XSD from XML (you can search for some tools online). 2. add the missing WSDL parts (step 1 just gives you the `` content). 3. Validate the WSDL with online tools (or an IDE that supports it). 4. Feed it to SoapUI tool to try to make a successful call. 5. Use the feedback you get from SoapUI to tweak the WSDL until you get a successful call. You can start small, with one operation, and when that's done you can continue with the rest. I can write a WSDL, but I don't invest that much time in this community to write it for you... – Bogdan Dec 11 '22 at 16:10
  • The post you referenced in your other question has broken links for example, to tools that used to work. I don't even have the time to redo that post to add a new explanation. My suggestion is to insist with the representative, or to find a way to call the service without the need for a WSDL. Can't you just use something else? A POST call to the service endpoint is all you need. The WSDL is just for convenience, and having to write it by hand removes that convenience right now and makes it an issue in the other direction... – Bogdan Dec 11 '22 at 16:13
  • This online tool allows generating 3 different types of xsd: Russian Doll, Salami slice, and Venetian Blind. Does it make a difference which one I pick? https://www.freeformatter.com/xsd-generator.html – User104163 Dec 12 '22 at 07:49
  • @Bogdan really going crazy trying to figure this out. For starters how do I know what to put in the "definitions" tag of the WSDL? I'm guessing `xmlns="http://schemas.xmlsoap.org/wsdl/"` is one and `xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"` is another, but what about the rest? – User104163 Dec 12 '22 at 14:36
  • 1
    You can start with these three and build your way up: `xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"`. For the formatter it shouldn't really matter, but I find Venetian Blind the most readable. But again, my suggestion would be to insist with the representative, or to find a way to call the service without the need for a WSDL. – Bogdan Dec 12 '22 at 21:29
  • Thank you. What about `targetNamespace` in the definitions tag? Is it not necessary in this case? – User104163 Dec 13 '22 at 10:42
  • 1
    That too. In this case, by looking at the message you posted, it should be `targetNamespace="http://micros-hosting.com/EGateway/"` – Bogdan Dec 13 '22 at 20:15

0 Answers0