scalaxb

How do I construct the cake when using Scalaxb to connect to a SOAP service?


I've read the documentation, but what I need to know is:

I'm not using a fictitious stock quote service (with an imaginary wsdl file). I'm using a different service with a different name.

Where, among the thousands and thousands of lines of code that have been generated, will I find the Scala trait(s) that I need to put together that correspond to this line in the documentation's example:

val service = (new stockquote.StockQuoteSoap12Bindings with scalaxb.SoapClients with scalaxb.DispatchHttpClients {}).service

Now, you might be thinking "Why not just search for Soap12Bindings in the generated code"? Good idea - but that turns up 0 results.


Solution

  • The example in the documentation is outdated, or too specific. (The documentation is also internally inconsistent and inconsistent with the actual filenames output with scalaxb.)

    First, search for SoapBindings instead of Soap12Bindings to find the service-specific trait (the first trait).

    Then, instead of scalaxb.SoapClients, use scalaxb.Soap11Clients.