Orbeon 3.0 / PHP Web service / XPath problems

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

Orbeon 3.0 / PHP Web service / XPath problems

nmaly
The response coming back from the PHP web service I am calling is:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://login.remedyconfig.com/svcs.php/MetaDataService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:MetaDataService" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
                                <SOAP-ENV:Body>
                                        <ns1:saveResponse>
                                                <return xsi:type="ns2:SaveResult">
                                                        <primaryKey xsi:type="xsd:int">42</primaryKey>
                                                        <debugOutput xsi:type="xsd:string"></debugOutput>
                                                        <metaViewId xsi:type="xsd:int">2003000884</metaViewId>
                                                </return>
                                        </ns1:saveResponse>
                                </SOAP-ENV:Body>
                        </SOAP-ENV:Envelope>

I've been trying to figure out the proper XPath to get at the "primaryKey" value, but have had no luck. I've used several tools (Stylus Studio and some others) to guide me to the correct XPath, and what they suggest also does not work.

The most recent suggestion has been /SOAP-ENV:Envelope/SOAP-ENV:Body/ns1:saveResponse/return/primaryKey

Although that doesn't work fully, I can navigate to ns1:saveResponse just fine, but trying to navigate to its children does not work.

Modifying the web service isn't an option. How can I accommodate this with Orbeon XForms?



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon 3.0 / PHP Web service / XPath problems

Daniel E. Renfer
Are you sure you have the same namespace bindings in your
XPL/XSL/XForms/Whatever you're using this in? Make sure that you don't
have anything set for the default namespace. (xmlns="")

Other than that, your XPath looks good.

--
Daniel E. Renfer
http://kronkltd.net/

On 7/30/07, [hidden email] <[hidden email]> wrote:

> The response coming back from the PHP web service I am calling is:
>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://login.remedyconfig.com/svcs.php/MetaDataService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:MetaDataService" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>                                 <SOAP-ENV:Body>
>                                         <ns1:saveResponse>
>                                                 <return xsi:type="ns2:SaveResult">
>                                                         <primaryKey xsi:type="xsd:int">42</primaryKey>
>                                                         <debugOutput xsi:type="xsd:string"></debugOutput>
>                                                         <metaViewId xsi:type="xsd:int">2003000884</metaViewId>
>                                                 </return>
>                                         </ns1:saveResponse>
>                                 </SOAP-ENV:Body>
>                         </SOAP-ENV:Envelope>
>
> I've been trying to figure out the proper XPath to get at the "primaryKey" value, but have had no luck. I've used several tools (Stylus Studio and some others) to guide me to the correct XPath, and what they suggest also does not work.
>
> The most recent suggestion has been /SOAP-ENV:Envelope/SOAP-ENV:Body/ns1:saveResponse/return/primaryKey
>
> Although that doesn't work fully, I can navigate to ns1:saveResponse just fine, but trying to navigate to its children does not work.
>
> Modifying the web service isn't an option. How can I accommodate this with Orbeon XForms?


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon 3.0 / PHP Web service / XPath problems

Erik Bruchez
Administrator
In reply to this post by nmaly
Your XPath expression is correct, and it works perfectly for me. Did you
declare the following namespace prefixes in your XForms document:

   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:ns1="http://login.remedyconfig.com/svcs.php/MetaDataService"

See attached files for a working example. You will have to fix the URL
that loads soap.xml to make it work with your setup.

-Erik

[hidden email] wrote:

> The response coming back from the PHP web service I am calling is:
>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://login.remedyconfig.com/svcs.php/MetaDataService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:MetaDataService" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <SOAP-ENV:Body>
> <ns1:saveResponse>
> <return xsi:type="ns2:SaveResult">
> <primaryKey xsi:type="xsd:int">42</primaryKey>
> <debugOutput xsi:type="xsd:string"></debugOutput>
> <metaViewId xsi:type="xsd:int">2003000884</metaViewId>
> </return>
> </ns1:saveResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> I've been trying to figure out the proper XPath to get at the "primaryKey" value, but have had no luck. I've used several tools (Stylus Studio and some others) to guide me to the correct XPath, and what they suggest also does not work.
>
> The most recent suggestion has been /SOAP-ENV:Envelope/SOAP-ENV:Body/ns1:saveResponse/return/primaryKey
>
> Although that doesn't work fully, I can navigate to ns1:saveResponse just fine, but trying to navigate to its children does not work.
>
> Modifying the web service isn't an option. How can I accommodate this with Orbeon XForms?
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/

<SOAP-ENV:Envelope
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:ns1="http://login.remedyconfig.com/svcs.php/MetaDataService"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:ns2="urn:MetaDataService"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
        <ns1:saveResponse>
            <return xsi:type="ns2:SaveResult">
                <primaryKey xsi:type="xsd:int">42</primaryKey>
                <debugOutput xsi:type="xsd:string"></debugOutput>
                <metaViewId xsi:type="xsd:int">2003000884</metaViewId>
            </return>
        </ns1:saveResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


--
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

xpath.xhtml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon 3.0 / PHP Web service / XPath problems

Erik Bruchez
Administrator
One more thing: you mention Orbeon 3.0 in the title. I assume you mean
3.5? If you are using 3.0, then I would very strongly advise upgrading.

-Erik

Erik Bruchez wrote:

> Your XPath expression is correct, and it works perfectly for me. Did you
> declare the following namespace prefixes in your XForms document:
>
>   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>   xmlns:ns1="http://login.remedyconfig.com/svcs.php/MetaDataService"
>
> See attached files for a working example. You will have to fix the URL
> that loads soap.xml to make it work with your setup.
>
> -Erik
>
> [hidden email] wrote:
>> The response coming back from the PHP web service I am calling is:
>>
>> <SOAP-ENV:Envelope
>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:ns1="http://login.remedyconfig.com/svcs.php/MetaDataService"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:ns2="urn:MetaDataService"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>>                 <SOAP-ENV:Body>
>>                     <ns1:saveResponse>
>>                         <return xsi:type="ns2:SaveResult">
>>                             <primaryKey
>> xsi:type="xsd:int">42</primaryKey>
>>                             <debugOutput
>> xsi:type="xsd:string"></debugOutput>
>>                             <metaViewId
>> xsi:type="xsd:int">2003000884</metaViewId>
>>                         </return>
>>                     </ns1:saveResponse>
>>                 </SOAP-ENV:Body>
>>             </SOAP-ENV:Envelope>
>>
>> I've been trying to figure out the proper XPath to get at the
>> "primaryKey" value, but have had no luck. I've used several tools
>> (Stylus Studio and some others) to guide me to the correct XPath, and
>> what they suggest also does not work.
>>
>> The most recent suggestion has been
>> /SOAP-ENV:Envelope/SOAP-ENV:Body/ns1:saveResponse/return/primaryKey
>>
>> Although that doesn't work fully, I can navigate to ns1:saveResponse
>> just fine, but trying to navigate to its children does not work.
>>
>> Modifying the web service isn't an option. How can I accommodate this
>> with Orbeon XForms?
>>
>>
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws