Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Instead of generating an interface for a WSDL endpoint as shown in the introductory examples, we can use the dynamic interface to pass in/out any arbitrary XML blob over REST or SOAP.

So here is a dynamic web service invocation using XMLBeans as the body and result of the documents. Note that XmlObject instances could be used in this example, there's no real need to have a concrete, autogenerated schema when using this mechanism (other than performance).

Wiki Markup
{snippet:id=soapClient|lang=java|url=http://cvs.activesoap.codehaus.org/viewrep/~raw,r=HEAD/activesoap/activesoap/src/test/org/codehaus/activesoap/examples/snowboard/SnowboardDynamicTest.java}

Here's the same example again using a REST client

Wiki Markup
{snippet:id=restClient|lang=java|url=http://cvs.activesoap.codehaus.org/viewrep/~raw,r=HEAD/activesoap/activesoap/src/test/org/codehaus/activesoap/examples/snowboard/SnowboardDynamicTest.java}

The API for the dynamic invocation API currently works with XMLBeans but should ultimately work with JAX-RPC, JAXB, Castor, XStream etc.