Invalid format of Web service response

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

Invalid format of Web service response

SukritiS
Hello!
I'm working on a Web service that calls and another server and gets the response. The issue is I'm getting the response but I'm only able to access the first tag. When I print the entire instance, the response is in a single line.
Submission :
<xforms:submission id='request-fruit-basket' serialization = 'none'
Resource ='http://fruitbasket.com'
Method='get' mediatype='application/xml'
Replace='instance' instance='fruit-basket'
xforms:username='owner' xxforms:password='fruitsAreLife'>
<xforms:message ev:event='xforms-submit-done' level='modal'>
<xforms:output value="instance('fruit-basket')"/>
</xforms:message>
</xforms:submission>

Ideally the  response should be something like this in the popup
Expectation :
Apple
Citrus
  Orange
  Grapefruit
  Citron
Banana
Papaya

Reality:
AppleCitrusOrangeGrapefruitCitronBananaPapaya

I checked in soap ui. The raw output xml is in a single line. Could anybody help me with this? How to differentiate between different tags and how to access nested tags as well.

Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Invalid format of Web service response

Alessandro  Vernet
Administrator
Hi Sukriti,

Typically, you would use an `<xf:message>` for debugging. If this is indeed your case, you can show the XML received with the following XPath: `saxon:serialize(instance('fruit-basket'), 'xml')`. Also make sure that you have the `saxon` prefix declared adding a `xmlns:saxon="http://saxon.sf.net/"`, for instance on the root element of your document.

You'll let us know if this works for you,

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet