output data from a webservice call is empty

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

output data from a webservice call is empty

jose.chacko
Hello,
I am testing a webservice application that is deployed on the same
server(tomcat5.5/axis2) as orbeon 3.7. It is similar to the weather webservice
example. It takes a string argument and returns the data. I can see the data
that are returned in tcpmon but no data is displayed on to the browser. If I
enable xforms-instance-inspector when I select the ws-reponse it contains the
return data. Would it be a timeout issue? I noticed it takes a minute or so
before tcpmon updates the request after I submit the form
If I do a viewsource of the browser, it has this error " An error has occured
you may want to close this dialog .. " but there is no dialog displyed .


Here is the contents of the soap request and response
>>
POST /axis2/services/AddressBookService.AddressBookServiceHttpSoap11Endpoint
HTTP/1.1
Cookie: JSESSIONID=A8AAAB6A580482BEBABAD29C523EFDAF
SOAPAction: "urn:findEntry "
Content-Type: text/xml
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:8085
Content-Length: 711

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:ax21="http://entry.addressbook.sample/xsd"
xmlns:q0="http://service.addressbook.sample"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:widget="http://orbeon.org/oxf/xml/widget"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <q0:findEntry>
      <q0:param0>Sam</q0:param0>
    </q0:findEntry>
  </soapenv:Body>
</soapenv:Envelope>


HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Sep 2008 20:44:32 GMT

246
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:findEntryResponse
xmlns:ns="http://service.addressbook.sample"><ns:return
xmlns:ax21="http://entry.addressbook.sample/xsd"
type="sample.addressbook.entry.Entry">
<ax21:city>cherryhill</ax21:city>
<ax21:name>Sam</ax21:name>
<ax21:postalCode>08056</ax21:postalCode>
<ax21:state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:nil="true" />
<ax21:street>summerhill</ax21:street>
</ns:return>
</ns:findEntryResponse>
</soapenv:Body></soapenv:Envelope>
0
>>
The instance inspector view shows this (ws-response) data
>>

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:findEntryResponse
xmlns:ns="http://service.addressbook.sample"><ns:return
type="sample.addressbook.entry.Entry"
xmlns:ax21="http://entry.addressbook.sample/xsd">
<ax21:city>cherryhill</ax21:city>
<ax21:name>Sam</ax21:name>
<ax21:postalCode>08056</ax21:postalCode>
<ax21:state xsi:nil="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<ax21:street>summerhill</ax21:street>
</ns:return>
</ns:findEntryResponse>
</soapenv:Body>
</soapenv:Envelope>
>>
Here is the contents of the .xtml file
>>
<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
    xmlns:f="http://orbeon.org/oxf/xml/formatting"
    xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
    xmlns:widget="http://orbeon.org/oxf/xml/widget"
    xmlns:ev="http://www.w3.org/2001/xml-events"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:q0="http://service.addressbook.sample"
    xmlns:ax21="http://entry.addressbook.sample/xsd"
type="sample.addressbook.entry.Entry">

    <xhtml:head>
        <xhtml:title>Weather Web Service</xhtml:title>
        <xforms:model>
            <xforms:instance id="ws-request">
               
<soapenv:Envelope>
  <soapenv:Body>
    <q0:findEntry>
      <param0>Sam</param0>
    </q0:findEntry>
  </soapenv:Body>
</soapenv:Envelope>

       </xforms:instance>

            <xforms:instance id="ws-response">
                <dummy/>
            </xforms:instance>

            <xforms:submission id="getaddress" method="post"
                   
action="http://localhost:8085/axis2/services/AddressBookService.AddressBookServiceHttpSoap11Endpoint"
                    ref="instance('ws-request')" replace="instance"
instance="ws-response"
                    mediatype="application/soap+xml; action=&quot;urn:findEntry
&quot;"/>
        </xforms:model>
       
    </xhtml:head>
    <xhtml:body>

        <!-- Input zip code -->
        <xforms:input ref="instance('ws-request')/soapenv:Body/q0:findEntry">
            <xforms:label>name: </xforms:label>
        </xforms:input>
        <xforms:trigger>
            <xforms:label>Get List</xforms:label>
            <xforms:send submission="getaddress" ev:event="DOMActivate"/>
        </xforms:trigger>

        <!-- Display result -->
       
        <xforms:group
ref="instance('ws-response')/soapenv:Body/q0:findEntryResponse/return">
           
             
                            <xforms:output value="ax21:city"/>
                                           
                            <xforms:output value="ax21:name"/>
                       
                                </xforms:group>

        <widget:xforms-instance-inspector id="1"/>
    </xhtml:body>
</xhtml:html>

>>
Any idea what could be the problem?
Thanks
Jose


--
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: output data from a webservice call is empty

Erik Bruchez
Administrator
> I am testing a webservice application that is deployed on the same

> server(tomcat5.5/axis2) as orbeon 3.7. It is similar to the weather  
> webservice
> example. It takes a string argument and returns the data. I can see  
> the data
> that are returned in tcpmon but no data is displayed on to the  
> browser. If I
> enable xforms-instance-inspector when I select the ws-reponse it  
> contains the
> return data. Would it be a timeout issue? I noticed it takes a  
> minute or so
> before tcpmon updates the request after I submit the form
This may simply be due to a keep-alive connection being closed after a  
certain timeout, but I am not sure.

> If I do a viewsource of the browser, it has this error " An error  
> has occured
> you may want to close this dialog .. " but there is no dialog  
> displyed .

This is probably fine, it's just the template for the error dialog.

But you have the following in your form:

   instance('ws-response')/soapenv:Body/q0:findEntryResponse/return

This "return" element doesn't look right: in the response, it is  
<ns:return>, within the http://service.addressbook.sample namespace.  
That would explain why you don't see what you expect.

-Erik

>
>
>
> Here is the contents of the soap request and response
>>>
> POST /axis2/services/
> AddressBookService.AddressBookServiceHttpSoap11Endpoint
> HTTP/1.1
> Cookie: JSESSIONID=A8AAAB6A580482BEBABAD29C523EFDAF
> SOAPAction: "urn:findEntry "
> Content-Type: text/xml
> User-Agent: Jakarta Commons-HttpClient/3.1
> Host: localhost:8085
> Content-Length: 711
>
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:f="http://orbeon.org/oxf/xml/formatting"
> xmlns:ev="http://www.w3.org/2001/xml-events"
> xmlns:xforms="http://www.w3.org/2002/xforms"
> xmlns:xhtml="http://www.w3.org/1999/xhtml"
> xmlns:ax21="http://entry.addressbook.sample/xsd"
> xmlns:q0="http://service.addressbook.sample"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:widget="http://orbeon.org/oxf/xml/widget"
> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>    <q0:findEntry>
>      <q0:param0>Sam</q0:param0>
>    </q0:findEntry>
>  </soapenv:Body>
> </soapenv:Envelope>
>
>
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Thu, 11 Sep 2008 20:44:32 GMT
>
> 246
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/ 
> envelope/"><soapenv:Body><ns:findEntryResponse
> xmlns:ns="http://service.addressbook.sample"><ns:return
> xmlns:ax21="http://entry.addressbook.sample/xsd"
> type="sample.addressbook.entry.Entry">
> <ax21:city>cherryhill</ax21:city>
> <ax21:name>Sam</ax21:name>
> <ax21:postalCode>08056</ax21:postalCode>
> <ax21:state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:nil="true" />
> <ax21:street>summerhill</ax21:street>
> </ns:return>
> </ns:findEntryResponse>
> </soapenv:Body></soapenv:Envelope>
> 0
>>>
> The instance inspector view shows this (ws-response) data
>>>
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/ 
> envelope/"><soapenv:Body><ns:findEntryResponse
> xmlns:ns="http://service.addressbook.sample"><ns:return
> type="sample.addressbook.entry.Entry"
> xmlns:ax21="http://entry.addressbook.sample/xsd">
> <ax21:city>cherryhill</ax21:city>
> <ax21:name>Sam</ax21:name>
> <ax21:postalCode>08056</ax21:postalCode>
> <ax21:state xsi:nil="true"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
> <ax21:street>summerhill</ax21:street>
> </ns:return>
> </ns:findEntryResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>>>
> Here is the contents of the .xtml file
>>>
> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
>    xmlns:f="http://orbeon.org/oxf/xml/formatting"
>    xmlns:xhtml="http://www.w3.org/1999/xhtml"
>    xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>    xmlns:widget="http://orbeon.org/oxf/xml/widget"
>    xmlns:ev="http://www.w3.org/2001/xml-events"
>    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xmlns:q0="http://service.addressbook.sample"
>    xmlns:ax21="http://entry.addressbook.sample/xsd"
> type="sample.addressbook.entry.Entry">
>
>    <xhtml:head>
> <xhtml:title>Weather Web Service</xhtml:title>
> <xforms:model>
>    <xforms:instance id="ws-request">
>
> <soapenv:Envelope>
>  <soapenv:Body>
>    <q0:findEntry>
>      <param0>Sam</param0>
>    </q0:findEntry>
>  </soapenv:Body>
> </soapenv:Envelope>
>
>       </xforms:instance>
>
>    <xforms:instance id="ws-response">
> <dummy/>
>    </xforms:instance>
>
>    <xforms:submission id="getaddress" method="post"
>
> action="http://localhost:8085/axis2/services/AddressBookService.AddressBookServiceHttpSoap11Endpoint 
> "
>    ref="instance('ws-request')" replace="instance"
> instance="ws-response"
>    mediatype="application/soap+xml; action=&quot;urn:findEntry
> &quot;"/>
> </xforms:model>
>
>    </xhtml:head>
>    <xhtml:body>
>
> <!-- Input zip code -->
> <xforms:input ref="instance('ws-request')/soapenv:Body/q0:findEntry">
>    <xforms:label>name: </xforms:label>
> </xforms:input>
> <xforms:trigger>
>    <xforms:label>Get List</xforms:label>
>    <xforms:send submission="getaddress" ev:event="DOMActivate"/>
> </xforms:trigger>
>
> <!-- Display result -->
>
> <xforms:group
> ref="instance('ws-response')/soapenv:Body/q0:findEntryResponse/
> return">
>
>
>    <xforms:output value="ax21:city"/>
>
>    <xforms:output value="ax21:name"/>
>
> </xforms:group>
>
> <widget:xforms-instance-inspector id="1"/>
>    </xhtml:body>
> </xhtml:html>
>
>>>
> Any idea what could be the problem?
> Thanks
> Jose
>
> --
> 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
--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: output data from a webservice call is empty

jose.chacko
Thank you Erik for the reply. That was the problem. It is working now.
 
-Jose

On Tue, Sep 23, 2008 at 6:33 PM, Erik Bruchez <[hidden email]> wrote:
I am testing a webservice application that is deployed on the same
server(tomcat5.5/axis2) as orbeon 3.7. It is similar to the weather webservice
example. It takes a string argument and returns the data. I can see the data
that are returned in tcpmon but no data is displayed on to the browser. If I
enable xforms-instance-inspector when I select the ws-reponse it contains the
return data. Would it be a timeout issue? I noticed it takes a minute or so
before tcpmon updates the request after I submit the form

This may simply be due to a keep-alive connection being closed after a certain timeout, but I am not sure.

If I do a viewsource of the browser, it has this error " An error has occured
you may want to close this dialog .. " but there is no dialog displyed .

This is probably fine, it's just the template for the error dialog.

But you have the following in your form:

 instance('ws-response')/soapenv:Body/q0:findEntryResponse/return

This "return" element doesn't look right: in the response, it is <ns:return>, within the http://service.addressbook.sample namespace. That would explain why you don't see what you expect.

-Erik




Here is the contents of the soap request and response

POST /axis2/services/AddressBookService.AddressBookServiceHttpSoap11Endpoint
HTTP/1.1
Cookie: JSESSIONID=A8AAAB6A580482BEBABAD29C523EFDAF
SOAPAction: "urn:findEntry "
Content-Type: text/xml
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:8085
Content-Length: 711

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:ax21="http://entry.addressbook.sample/xsd"
xmlns:q0="http://service.addressbook.sample"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:widget="http://orbeon.org/oxf/xml/widget"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <q0:findEntry>
    <q0:param0>Sam</q0:param0>
  </q0:findEntry>
 </soapenv:Body>
</soapenv:Envelope>


HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Sep 2008 20:44:32 GMT

246
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:findEntryResponse
xmlns:ns="http://service.addressbook.sample"><ns:return
xmlns:ax21="http://entry.addressbook.sample/xsd"
type="sample.addressbook.entry.Entry">
<ax21:city>cherryhill</ax21:city>
<ax21:name>Sam</ax21:name>
<ax21:postalCode>08056</ax21:postalCode>
<ax21:state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:nil="true" />
<ax21:street>summerhill</ax21:street>
</ns:return>
</ns:findEntryResponse>
</soapenv:Body></soapenv:Envelope>
0

The instance inspector view shows this (ws-response) data


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:findEntryResponse
xmlns:ns="http://service.addressbook.sample"><ns:return
type="sample.addressbook.entry.Entry"
xmlns:ax21="http://entry.addressbook.sample/xsd">
<ax21:city>cherryhill</ax21:city>
<ax21:name>Sam</ax21:name>
<ax21:postalCode>08056</ax21:postalCode>
<ax21:state xsi:nil="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<ax21:street>summerhill</ax21:street>
</ns:return>
</ns:findEntryResponse>
</soapenv:Body>
</soapenv:Envelope>

Here is the contents of the .xtml file

<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
  xmlns:f="http://orbeon.org/oxf/xml/formatting"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
  xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
  xmlns:widget="http://orbeon.org/oxf/xml/widget"
  xmlns:ev="http://www.w3.org/2001/xml-events"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:q0="http://service.addressbook.sample"
  xmlns:ax21="http://entry.addressbook.sample/xsd"
type="sample.addressbook.entry.Entry">

  <xhtml:head>
       <xhtml:title>Weather Web Service</xhtml:title>
       <xforms:model>
           <xforms:instance id="ws-request">
       
<soapenv:Envelope>
 <soapenv:Body>
  <q0:findEntry>
    <param0>Sam</param0>
  </q0:findEntry>
 </soapenv:Body>
</soapenv:Envelope>

     </xforms:instance>

           <xforms:instance id="ws-response">
               <dummy/>
           </xforms:instance>

           <xforms:submission id="getaddress" method="post"
               
action="http://localhost:8085/axis2/services/AddressBookService.AddressBookServiceHttpSoap11Endpoint"
                   ref="instance('ws-request')" replace="instance"
instance="ws-response"
                   mediatype="application/soap+xml; action=&quot;urn:findEntry
&quot;"/>
       </xforms:model>

  </xhtml:head>
  <xhtml:body>

       <!-- Input zip code -->
       <xforms:input ref="instance('ws-request')/soapenv:Body/q0:findEntry">
           <xforms:label>name: </xforms:label>
       </xforms:input>
       <xforms:trigger>
           <xforms:label>Get List</xforms:label>
           <xforms:send submission="getaddress" ev:event="DOMActivate"/>
       </xforms:trigger>

       <!-- Display result -->
       
       <xforms:group
ref="instance('ws-response')/soapenv:Body/q0:findEntryResponse/return">
       
       
                           <xforms:output value="ax21:city"/>
                                       
                           <xforms:output value="ax21:name"/>
               
                               </xforms:group>

       <widget:xforms-instance-inspector id="1"/>
  </xhtml:body>
</xhtml:html>


Any idea what could be the problem?
Thanks
Jose

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

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




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