Multiref href resolution for SOAP #160

greenrd opened this Issue May 28, 2012 · 6 comments


None yet

2 participants

greenrd commented May 28, 2012

Currently, if a SOAP web service returns XML that uses multirefs, scalaxb generates this type of class:

case class ArrayOf_tns1_RemoteIssue(arg1: Option[com.ocado.jira.api.ArraySequence] = None,
  soapencarrayType: Option[String] = None,
  soapencoffset: Option[String] = None,
  id: Option[String] = None,
  href: Option[] = None,
  attributes: Map[String, scalaxb.DataRecord[Any]]) extends Arrayable

(This was generated for the JIRA SOAP service.)

The arg1 field just references an array of scala.xml.Nodes, with href attributes, which doesn't really help me to find the referenced data, let alone bind it. The URI in each of those href attributes is just a local anchor like #id16. Also, the hrefs are a serialisation detail, which should not really be exposed (indeed, these should be bound instances, not scala.xml.Nodes).

So I would like a way to find the data referenced by the inner hrefs. Or am I missing something obvious?


Currently scalaxb does not support references in SOAP. It's treating the messages as literal document.
I guess the best thing I could do is to resolve the references and stuff it into the case class?

greenrd commented May 29, 2012

Yes, that would be good.

eed3si9n commented Jun 3, 2012

So I implemented href resolution at the XML level, so at least you'd have access to the data.
This is available in 0.7.2-SNAPSHOT. I'd appreciate if you could test it. Here's a sample project I created for JIRA service.

Once the hrefs are resolved I don't think there's much use for the SOAP encoding, so likely better data binding is possible, for example as DataRecord[RemoteIssue] etc. but that'll be more complicated change requiring special handling for SOAP encoded types, so it will be on nice to have list for the future.

greenrd commented Jun 11, 2012

I was unable to test it due to this error:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.scalaxb#sbt-scalaxb;0.7.2-SNAPSHOT: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]          org.scalaxb:sbt-scalaxb:0.7.2-SNAPSHOT (sbtVersion=0.11.3, scalaVersion=2.9.1)
[error] {file:/home/robin/workspace2/jira-worklog/project/}default-3f61c9/*:update: sbt.ResolveException: unresolved dependency: org.scalaxb#sbt-scalaxb;0.7.2-SNAPSHOT: not found

What do I need to do to fix this?


Do you have the following resolvers?

resolvers ++= Seq(
  "sonatype-public" at "",
  "" at "")
eed3si9n commented Nov 4, 2014

Dropping any attempt of RPC/encoding.

@eed3si9n eed3si9n closed this Nov 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment