Re: highway traffic web service example missing namespace declaration

Posted by Adrian Baker on
URL: https://discuss.orbeon.com/highway-traffic-web-service-example-missing-namespace-declaration-tp33391p33392.html

Further problems with this.. the attached pipeline uses an XSLT to construct a document, which is then wrapped in the <delegation:execute> element using XInclude (thus leaving only business logic in the XSLT), then passed to the delegation processor.

The resulting document now has *duplicate* namespace declarations, also making it badly formed:

<return xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:oxf="http://www.orbeon.com/oxf/processors"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:p="http://www.orbeon.com/oxf/pipeline"
    xmlns:p="http://www.orbeon.com/oxf/pipeline"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:oxf="http://www.orbeon.com/oxf/processors" xsi:type="xsd:string">No accidents reported.</return>


Adrian Baker wrote:
I've been experimenting with calling a web service from XPL.

However I notice the example of calling the highway traffic web service (http://www.orbeon.com/ops/doc/integration-webservices) can return a badly formed document, with no namespace prefix declared for the "xsi:type" attribute:
   <return .. xsi:type="xsd:string">No accidents reported.</return>

To avoid the problem I can declare the prefix 'xsi' in the XPL pipeline invoking the web service, but this seems totally hacky to rely on this prefix being delclared like this - eg, if my prefix name doesn't match 'xsi', it won't work.

Is this the fault of the web service or Orbeon?

Adrian







______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

<?xml version="1.0"?>
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
                xmlns:oxf="http://www.orbeon.com/oxf/processors"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xi="http://www.w3.org/2001/XInclude"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       
        <p:param type="output" name="clinical-document" />
        <p:param type="input" name="parameters"/>
       
        <p:processor name="oxf:xslt">
                <p:input name="data" href="#parameters"/>
                <p:input name="config">
                        <hwynums xsl:version="2.0">
                                <xsl:value-of select="/parameters/highway"/>
                        </hwynums>
                </p:input>
                <p:output name="data" id="xslt-result"/>
        </p:processor>
       
        <p:processor name="oxf:xinclude">
                <p:input name="config">
                        <delegation:execute service="ca-traffic" operation="getTraffic" xmlns:delegation="http://orbeon.org/oxf/xml/delegation" xmlns="">
                                <xi:include href="input:xslt-result"/>
                        </delegation:execute>
                </p:input>
                <p:input name="xslt-result" href="#xslt-result"/>
                <p:output name="data" id="web-service-call"/>
        </p:processor>
       
        <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>
                <p:input name="call" debug="true" href="#web-service-call"/>
                <p:output name="data" ref="clinical-document" debug="true"/>
        </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