Hi,

I am trying to test a web service that I have deployed, both with Orbeon; so my page-flow.xml has the entries:

  <!-- Web services -->
  <page id="ws" path-info="/services" model="ws/webservice.xpl"/>

<!-- Testing -->
<page id="test" path-info="/test" xforms="test/test-xforms-model.xml" view="te
st/test-view.xsl">
<action when="/form/action = 'identify'" action="test/wstest.xpl">
<result page="view">
<xu:update select="/form/document">
<xu:copy-of select="document('oxf:action')/*"/>
</xu:update>
</result>
</action>
</page>


The test form has a single button on it that should send a SOAP message to the web service; here is wstest.xpl:

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline";
          xmlns:oxf="http://www.orbeon.com/oxf/processors";
          xmlns:ri="http://www.ivoa.net/wsdl/RegistryHarvest/v0.1";
>

  <p:param type="output" name="response"/>

  <p:processor name="oxf:null-serializer">
    <p:input name="data" debug="message">
      <message>Test called</message>
    </p:input>
  </p:processor>

<p:processor name="oxf:delegation">
<p:input name="interface">
<config>
<service id="oaiidentify" type="webservice" style="document"
endpoint="http://localhost:8080/carnorb/services";>
</service>
</config>
</p:input>
<p:input name="call">
<delegation:execute service="oaiidentify" operation="Identify" xsl:version
="2.0" xmlns:delegation="http://orbeon.org/oxf/xml/delegation";>
<ri:Identify/>
</delegation:execute>
</p:input>
<p:output name="data" ref="response"/>
</p:processor>


</p:config>

The web service is defined to be doc/literal wrapped so the SOAP message just needs to be:

<soapenv:Envelope>
  <soapenv:Body>
    <ri:Identify/>
  </soapenv:Body>
</soapenv:Envelope>

The web service, webservice.xpl, is:

<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:xs="http://www.w3.org/2001/XMLSchema";
          xmlns:xdt="http://www.w3.org/2003/11/xpath-datatypes";
          xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
          xmlns:oai="http://www.openarchives.org/OAI/2.0/";
          xmlns:ri="http://www.ivoa.net/xml/RegistryInterface/v0.1";
>

  <!-- Display message -->
  <p:processor name="oxf:null-serializer">
    <p:input name="data" debug="message">
      <message>Web service called</message>
    </p:input>
  </p:processor>

  <!-- Get SOAP envelope -->
  <p:processor name="oxf:request">
    <p:input name="config">
      <config stream-type="xs:anyURI">
        <include>/request/body</include>
      </config>
    </p:input>
    <p:output name="data" id="uri"/>
  </p:processor>

<p:processor name="oxf:url-generator">
<p:input name="config" href="aggregate('config', aggregate('url', #uri#xpointer(string(/request/body))))"/>
<p:output name="data" id="request"/>
</p:processor>


<!-- Handle operation -->
<p:choose href="#request#xpointer(/soapenv:Envelope/soapenv:Body)">
<p:when test="ri:Identify">
<p:processor name="oxf:xslt">
<p:input name="data" href="identity.xml"/>
<p:input name="config">
<oai:OAI-PMH>
<oai:responseDate>
<xsl:value-of select="concat(adjust-dateTime-to-timezone(current-dateTime(), xdt:dayTimeDuration('PT0H')), 'Z')"/>
</oai:responseDate>
<oai:request verb="Identify">
http://mercury.cacr.caltech.edu:8080/carnbox/services
</oai:request>
<xsl:copy-of select="oai:Identify"/>
</oai:OAI-PMH>
</p:input>
<p:output name="data" id="response"/>
</p:processor>
</p:when>


  <p:processor name="oxf:xslt">
    <p:input name="data" href="#response"/>
    <p:input name="config">
      <soapenv:Envelope xsl:version="2.0">
        <soapenv:Body>
          <xsl:copy-of select="."/>
        </soapenv:Body>
      </soapenv:Envelope>
    </p:input>
    <p:output name="data" id="SOAPResponse"/>
  </p:processor>

  <!-- Send SOAP response -->
  <p:processor name="oxf:xml-serializer">
    <p:input name="config">
      <config/>
    </p:input>
    <p:input name="data" href="#SOAPResponse"/>
  </p:processor>
</p:config>

OK, so when I press the button on the test form, I get a page back showing the response which is just:
<null xsi:nil="true"/>


Checking the logfiles I see the "Test called" message from wstest.xpl but not the "Web service called" message from webservice.xpl that I would also expect to see. This looks as though the web service is not being called.

Any ideas?

        Cheers,

        Matthew



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to