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

StackOverflow https://stackoverflow.com/questions/10615662

  •  09-06-2021
  •  | 
  •  

문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top