Topic
No replies
debuggers
debuggers
1 Post
ACCEPTED ANSWER

Pinned topic XFORMS AND WEB SERVICES HELP!

‏2012-02-04T03:08:49Z |
Hi friends,i am trying to call a web service from XFORM,i read tutorial http://www.ibm.com/developerworks/xml/library/x-tipxf1/ in IBM site..

when i implement it it is not working...please solve this error....
xform

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:ns1="urn:xmethods-Temperature"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<head>
<title>XForms and Web Services</title>
</head>
<body>
<object id="FormsPlayer"
classid="CLSID:4D0ABA11-C5F0-4478-991A-375C4B648F58">
FormsPlayer has not loaded. Please check your installation.
</object>
<?import namespace="xforms" implementation="#FormsPlayer" ?>

<xforms:model id="WeatherService">

<xforms:instance id="messages">
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  • <soap:Body>*
  • <ns2:add xmlns:ns2="http://service.com/">*
  • <arg0>4</arg0>*
  • <arg1>8</arg1>*
  • </ns2:add>*
  • </soap:Body>*
  • </soap:Envelope>*
</xforms:instance>

<xforms:submission id="getweather" method="text-xml-post"
replace="instance"
action="http://localhost:9082/AddMulWS/services/AddMulServicePort" />

</xforms:model>

<xforms:switch id="switch1">

<xforms:case id="requestGUI">

<xforms:input ref="instance('messages').//arg0">
<xforms:label>Zip code: </xforms:label>
<xforms:hint>Enter a zip code and submit the form for the current
temperature in that area.</xforms:hint>
</xforms:input>

<xforms:trigger style="display:block">
<xforms:label>Change to results case</xforms:label>
<xforms:action ev:event="DOMActivate">
<xforms:toggle case="responseGUI" />
</xforms:action>
</xforms:trigger>

</xforms:case>

<xforms:case id="responseGUI">

Results go here.

<xforms:trigger>
<xforms:label>Change to request case</xforms:label>
<xforms:action ev:event="DOMActivate">
<xforms:toggle case="requestGUI" />
</xforms:action>
</xforms:trigger>
<xforms:trigger style="display:block">
<xforms:label>Get current temperature</xforms:label>
<xforms:action ev:event="DOMActivate">
<xforms:send submission="getweather" />
<xforms:toggle case="responseGUI" />
</xforms:action>
</xforms:trigger>
<xforms:output ref="instance('messages')//return"
style="width:40ex;display:block;">
<xforms:label>Current Temperature:</xforms:label>
</xforms:output>

</xforms:case>
</xforms:switch>

</body>
</html>

i have bolded the soap request..!