When the "call" input of a oxf:delegation processor is supplied as an inline Xml fragment, I'm getting a ClassCastException. However if the "call" input is supplied from an oxf:xslt processor, it works fine. I'm attempting to make a SOAP call with the delegation processor.
The test scenario is:
- No model specified in page-flow.xml
- view is specified as ws-test.xpl (below)
- Web service called is from Orbeon example "California Traffic"
- Environment: Tomcat 5.0.28; J2sdk 1.4.2_08
- Orbeon 3 Beta 2 (same results on Orbeon 2 as well)
Error message, and both versions of ws-test.xpl (working and non-working ones) below.
I can't work out why it shouldn't be possible to include the call data directly in the "call" input rather than having to generate it externally in another processor; is this a bug? Or am I missing something really obvious?
Steve
----------------------------------------
Error (when xml fragment included inline as input):
----------------------------------------
2005-08-24 10:32:18,716 ERROR org.orbeon.oxf.pipeline.InitUtils null - Exception with no location data
java.lang.ClassCastException
at org.orbeon.oxf.processor.DelegationProcessor$2.endElement(DelegationProcessor.java:185)
at org.orbeon.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.java:291)
at org.orbeon.saxon.event.ProxyReceiver.endElement(ProxyReceiver.java:190)
at org.orbeon.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:252)
at org.orbeon.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:215)
at org.dom4j.io.SAXWriter.endElement(SAXWriter.java:631)
at org.dom4j.io.SAXWriter.write(SAXWriter.java:585)
at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:479)
at org.dom4j.io.SAXWriter.write(SAXWriter.java:180)
at org.dom4j.io.SAXWriter.parse(SAXWriter.java:461)
at org.orbeon.saxon.event.Sender.sendSAXSource(Sender.java:209)
at org.orbeon.saxon.event.Sender.send(Sender.java:94)
at org.orbeon.saxon.IdentityTransformer.transform(IdentityTransformer.java:31)
at org.orbeon.oxf.xml.TransformerWrapper.transform(TransformerUtils.java:380)
at org.orbeon.oxf.processor.generator.DOMGenerator$1.readImpl(DOMGenerator.java:177)
----------------------------------------
----------------------------------------
non-working ws-test.xpl
----------------------------------------
<p:config
xmlns:p="
http://www.orbeon.com/oxf/pipeline"
xmlns:oxf="
http://www.orbeon.com/oxf/processors"
xmlns:xhtml="
http://www.w3.org/1999/xhtml"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
xmlns:delegation="
http://orbeon.org/oxf/xml/delegation">
<p:param type="input" name="instance" />
<p:param type="output" name="data" />
<!-- ws call -->
<p:processor name="oxf:delegation">
<p:input name="interface">
<config>
<service id="ca-traffic" type="webservice" endpoint="
http://services.xmethods.net/soap/servlet/rpcrouter">
<operation nsuri="urn:xmethods-CATraffic" name="getTraffic"/>
</service>
</config>
</p:input>
<!-- "call" input specified inline as xml fragment -->
<p:input name="call">
<delegation:execute service="ca-traffic" operation="getTraffic">
<hwynums>101</hwynums>
</delegation:execute>
</p:input>
<p:output name="data" ref="data" />
</p:processor>
</p:config>
----------------------------------------
----------------------------------------
working ws-test.xpl:
"call" input now supplied as output of an oxf:xslt processor
----------------------------------------
<p:config
xmlns:p="
http://www.orbeon.com/oxf/pipeline"
xmlns:oxf="
http://www.orbeon.com/oxf/processors"
xmlns:xhtml="
http://www.w3.org/1999/xhtml"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
xmlns:delegation="
http://orbeon.org/oxf/xml/delegation">
<p:param type="input" name="instance" />
<p:param type="output" name="data" />
<!-- this processor generates the "call" input for the oxf:delegation processor -->
<p:processor name="oxf:xslt">
<p:input name="data">
<!-- xml fragment to be processed -->
<highway>101</highway>
</p:input>
<p:input name="config">
<!-- xsl to generate "call" xml, inserting data from above xml fragment -->
<delegation:execute service="ca-traffic" operation="getTraffic" xsl:version="2.0">
<hwynums><xsl:value-of select="/highway" /></hwynums>
</delegation:execute>
</p:input>
<p:output name="data" id="wscall" />
</p:processor>
<!-- ws call -->
<p:processor name="oxf:delegation">
<p:input name="interface">
<config>
<service id="ca-traffic" type="webservice" endpoint="
http://services.xmethods.net/soap/servlet/rpcrouter">
<operation nsuri="urn:xmethods-CATraffic" name="getTraffic"/>
</service>
</config>
</p:input>
<!-- "call" input generated by oxf:xslt processor -->
<p:input name="call" href="#wscall" >
<!-- removed... using oxf:xslt processor to generate this
<delegation:execute service="ca-traffic" operation="getTraffic">
<hwynums>101</hwynums>
</delegation:execute>
-->
</p:input>
<p:output name="data" ref="data" />
</p:processor>
</p:config>
----------------------------------------
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws