eed3si9n / scalaxb

scalaxb is an XML data binding tool for Scala.

Home Page:http://scalaxb.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xmlprotocol.scala throwing compilation errors after generating the code using wsdl and xsd's

deveshgithub opened this issue · comments

Hi,

I do see similar issue #433 but seems something to do with ref type for element.

Versions

scalaxb : 1.7.0
Scala : 2.12.4
SBT Version : 1.3.8
Java : OpenJDK 11

Steps

  1. Create the new project using following sbt command sbt new eed3si9n/scalaxb.g8
  2. Copy the wsd and xsd dir from the given attachment into the new project created at step 1.
  3. Place the build.sbt and plugins.sbt from attachment to respective folder.
  4. Execute following command sbt clean compile . This fails with compilation error.
  5. Now in Warnings.wsdl file remove the line number 36 which adds the header in response.
    Line 36 is => <soap:header use="literal" part="header" message="tns:soapcompanyprofile"/>
  6. Execute the following command sbt clean compile .
  7. The compilable code is generated with some warnings.

Results

Expected
Compilable code should be should be generated using built.sbt

Actual

[info] Compiling 12 Scala sources to /Users/test/testwsdlgeneration/foo-project/target/scala-2.12/classes ...
[error] /Users/test/testwsdlgeneration/foo-project/target/scala-2.12/src_managed/main/sbt-scalaxb/generated/xmlprotocol.scala:160:62: type mismatch;
[error] found : generated.AddWarningsCustContactResponseType
[error] required: generated.AddWarningsCustContactResponse
[error] } \ "addWarningsCustContactResponse").head,
Nil).addWarningsCustContactResult,
[error] ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 9 s, completed 11-Apr-2020, 4:42:25 pm

Attached issue-new.zip containing wsdl, xsd's , built.sbt , plugins.sbt and generated scala source.

Note
If only code using xsd needs to generate then it has no issues generates the compilable code but when wsdl comes into picture then uncompilable code is generated.