Newbie stuck on HTTP PUT

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie stuck on HTTP PUT

pappleby
Apologies if this question has been asked many times before (although I can't find much about it).

I'm stuck trying to do a PUT to Orbeon. I can't seem to access the XML submission instance - I simply get <null/> in the response.

I'm using CURL to try and do this. If I try:

curl -T c:\research\curl1.xml -X PUT http://localhost:8080/exis
t/rest/db/tso-demos/mytest -u admin:demos

my exist DB is quite happily updated. However, if I try:

curl -T c:\research\curl1.xml -X PUT http://localhost:8080/tso-
demos/users/pappleby/tags/test

things don't work. I have the following page flow line which correctly picks up the page:

<page path-info="/tso-demos/users/([^/]+)/tags/([^/]+)" matcher="oxf:perl5-matcher" view="xpl/test.xpl"/>

(I've got the regular expressions as I want to eventually do some URL processing too). And the following pipeline:

<?xml version="1.0" encoding="UTF-8"?>
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xforms="http://www.w3.org/2002/xforms">   

    <p:param name="data" type="output"/>
    <p:param name="instance" type="input"/>

    <p:processor name="oxf:xslt">
        <p:input name="config" href="xml-xhtml.xsl"/>
        <p:input name="data" href="#instance"/>
        <p:output name="data" id="xhtmlData" ref="data" />
    </p:processor>
   
</p:config>

If I replace #instance with some actual XML in the input element that is being returned okay. It simply isn't picking up the submitted XML document, which looks like:

<?xml version="1.0" encoding="UTF-8"?>
<submission>
    <uri>HELLO WORLD</uri>
</submission>

My XSL is also simple:

<xsl:template match="/">
    <xhtml:html>
        <xhtml:body>
            <xhtml:h1>TESTING</xhtml:h1>
            <xsl:copy-of select="."/>
        </xhtml:body>
    </xhtml:html>
</xsl:template>

I'm pulling my hair out. I thought this bit would be easy! Any pointer will be very welcome.

Thanks

Paul
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on HTTP PUT

Ryan Puddephatt-3
Paul,
  Try using the request processor, I don't think instance will be populated in this case

----- Original Message -----
From: Paul Appleby <[hidden email]>
To: [hidden email] <[hidden email]>
Sent: Sun Aug 24 17:56:47 2008
Subject: [ops-users]  Newbie stuck on HTTP PUT


Apologies if this question has been asked many times before (although I can't
find much about it).

I'm stuck trying to do a PUT to Orbeon. I can't seem to access the XML
submission instance - I simply get <null/> in the response.

I'm using CURL to try and do this. If I try:

curl -T c:\research\curl1.xml -X PUT http://localhost:8080/exis
t/rest/db/tso-demos/mytest -u admin:demos

my exist DB is quite happily updated. However, if I try:

curl -T c:\research\curl1.xml -X PUT http://localhost:8080/tso-
demos/users/pappleby/tags/test

things don't work. I have the following page flow line which correctly picks
up the page:

<page path-info="/tso-demos/users/([^/]+)/tags/([^/]+)"
matcher="oxf:perl5-matcher" view="xpl/test.xpl"/>

(I've got the regular expressions as I want to eventually do some URL
processing too). And the following pipeline:

<?xml version="1.0" encoding="UTF-8"?>
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:xforms="http://www.w3.org/2002/xforms">  

    <p:param name="data" type="output"/>
    <p:param name="instance" type="input"/>

    <p:processor name="oxf:xslt">
        <p:input name="config" href="xml-xhtml.xsl"/>
        <p:input name="data" href="#instance"/>
        <p:output name="data" id="xhtmlData" ref="data" />
    </p:processor>
   
</p:config>

If I replace #instance with some actual XML in the input element that is
being returned okay. It simply isn't picking up the submitted XML document,
which looks like:

<?xml version="1.0" encoding="UTF-8"?>
<submission>
    <uri>HELLO WORLD</uri>
</submission>

My XSL is also simple:

<xsl:template match="/">
    <xhtml:html>
        <xhtml:body>
            <xhtml:h1>TESTING</xhtml:h1>
            <xsl:copy-of select="."/>
        </xhtml:body>
    </xhtml:html>
</xsl:template>

I'm pulling my hair out. I thought this bit would be easy! Any pointer will
be very welcome.

Thanks

Paul
--
View this message in context: http://www.nabble.com/Newbie-stuck-on-HTTP-PUT-tp19132281p19132281.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.



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

_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on HTTP PUT

Alessandro Vernet
Administrator
In reply to this post by pappleby
Paul,

On Aug 24, 2008, at 9:56 AM, Paul Appleby wrote:

> Apologies if this question has been asked many times before  
> (although I can't
> find much about it).

I don't see anything obviously wrong with the code you quoted. Do you  
have this code deployed in apps/tso-demos? Would it be possible for  
your to zip up the content of that directory, attach the zip to a  
message here so we can reproduce the issue you described?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie stuck on HTTP PUT

Alessandro Vernet
Administrator
In reply to this post by Ryan Puddephatt-3
Ryan,

On Aug 24, 2008, at 12:01 PM, Ryan Puddephatt wrote:
> Paul,
>  Try using the request processor, I don't think instance will be  
> populated in this case

Right! I didn't notice Paul was doing a PUT. I should have started by  
reading the message title :).

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: Re: Newbie stuck on HTTP PUT

pappleby
In reply to this post by pappleby
Got it sorted using the request processor as Ryan indicated. Thanks for
the help.

Paul

-----Original Message-----
From: Alessandro Vernet [mailto:[hidden email]]
Sent: 26 August 2008 00:30
To: [hidden email]
Subject: [ops-users] Re: Re: Newbie stuck on HTTP PUT

Ryan,

On Aug 24, 2008, at 12:01 PM, Ryan Puddephatt wrote:
> Paul,
>  Try using the request processor, I don't think instance will be
> populated in this case

Right! I didn't notice Paul was doing a PUT. I should have started by
reading the message title :).

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's
Blog: http://www.orbeon.com/blog/ Personal Blog:
http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet



________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. For more information on a proactive anti-virus
service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


***********************************************************************************************
This email, including any attachment, is confidential and may be legally privileged.  If you are not the intended recipient or if you have received this email in error, please inform the sender immediately by reply and delete all copies from your system. Do not retain, copy, disclose, distribute or otherwise use any of its contents.  

Whilst we have taken reasonable precautions to ensure that this email has been swept for computer viruses, we cannot guarantee that this email does not contain such material and we therefore advise you to carry out your own virus checks. We do not accept liability for any damage or losses sustained as a result of such material.

Please note that incoming and outgoing email communications passing through our IT systems may be monitored and/or intercepted by us solely to determine whether the content is business related and compliant with company standards.
***********************************************************************************************

The Stationery Office Limited is registered in England No. 3049649 at Clifton House, Worship Street, London, EC2A 2EJ.



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws