Skip navigation
Currently Being Moderated

web service calls

Feb 8, 2005 1:00 AM

I have created a web service which I would liked to be called from an xfa form.  The service has two basic operations, getDataService and getStuffService which return an int and string respectively.  I am able to create a DataConnection from the wsdl file associated with this web service, and from the DataConnection I can drag relevant fields and buttons onto a form.  <br /><br />However, only the getDataService operation works.  When I click the button to execute the getStuffService nothing happens.  On looking at the SOAP message (given below) sent by the form, it appears that the operation is not getting included in the service request.<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><br />  <soap:Body/><br /></soap:Envelope><br /><br />I have used other programs to call both operations without problems so I am assuning that the wsdl file is OK, but here it is just in case:<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><wsdl:definitions targetNamespace="http://myservice.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://myservice.org" xmlns:intf="http://myservice.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><br /><!--WSDL created by Apache Axis version: 1.2beta3<br />Built on Aug 01, 2004 (05:59:22 PDT)--><br /> <wsdl:types><br />  <schema elementFormDefault="qualified" targetNamespace="http://myservice.org" xmlns="http://www.w3.org/2001/XMLSchema"><br />   <complexType name="Data"><br />    <sequence><br />     <element name="data" type="xsd:int"/><br />    </sequence><br />   </complexType><br />   <element name="getDataServiceReturn" type="impl:Data"/><br />   <complexType name="Stuff"><br />    <sequence><br />     <element name="stuff" nillable="true" type="xsd:string"/><br />    </sequence><br />   </complexType><br />   <element name="getStuffServiceReturn" type="impl:Stuff"/><br />  </schema><br /> </wsdl:types><br />   <wsdl:message name="getDataServiceResponse"><br />      <wsdl:part element="impl:getDataServiceReturn" name="getDataServiceReturn"/><br />   </wsdl:message><br />   <wsdl:message name="getDataServiceRequest"><br />   </wsdl:message><br />   <wsdl:message name="getStuffServiceResponse"><br />      <wsdl:part element="impl:getStuffServiceReturn" name="getStuffServiceReturn"/><br />   </wsdl:message><br />   <wsdl:message name="getStuffServiceRequest"><br />   </wsdl:message><br />   <wsdl:portType name="MyService"><br />      <wsdl:operation name="getDataService"><br />         <wsdl:input message="impl:getDataServiceRequest" name="getDataServiceRequest"/><br />         <wsdl:output message="impl:getDataServiceResponse" name="getDataServiceResponse"/><br />      </wsdl:operation><br />      <wsdl:operation name="getStuffService"><br />         <wsdl:input message="impl:getStuffServiceRequest" name="getStuffServiceRequest"/><br />         <wsdl:output message="impl:getStuffServiceResponse" name="getStuffServiceResponse"/><br />      </wsdl:operation><br />   </wsdl:portType><br />   <wsdl:binding name="MyServiceSoapBinding" type="impl:MyService"><br />      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><br />      <wsdl:operation name="getDataService"><br />         <wsdlsoap:operation soapAction=""/><br />         <wsdl:input name="getDataServiceRequest"><br />            <wsdlsoap:body use="literal"/><br />         </wsdl:input><br />         <wsdl:output name="getDataServiceResponse"><br />            <wsdlsoap:body use="literal"/><br />         </wsdl:output><br />      </wsdl:operation><br />      <wsdl:operation name="getStuffService"><br />         <wsdlsoap:operation soapAction=""/><br />         <wsdl:input name="getStuffServiceRequest"><br />            <wsdlsoap:body use="literal"/><br />         </wsdl:input><br />         <wsdl:output name="getStuffServiceResponse"><br />            <wsdlsoap:body use="literal"/><br />         </wsdl:output><br />      </wsdl:op
 
Replies
  • Currently Being Moderated
    Feb 8, 2005 10:18 AM   in reply to (brian_bounds)
    Brian,

    I think you did not do anything wrong. I just need to clarify that when you are using the drag and drop to create a connection to a web services, the action button is associated to only one operation. If you recall when you went through the connection wizard, one of the steps was to select the web service operation.
    You can implement by scripting to have the button to work with multiple operations.

    Jimmy
     
    |
    Mark as:
  • Currently Being Moderated
    Feb 9, 2005 10:44 AM   in reply to (brian_bounds)
    Brian,

    I don't think you need to modify the getStuffService (i.e:to take different paramters).
    The issue is more with what you can do with the current Designer 7 interface. If you still want to use Designer 7 to make connection to your web services to use the other operation, you need to create a 2nd connection to that same web service. The only difference is this time, you choose the getStuffService operation instead of the other one.
    Once you have these 2 connections, you can associate field on the form to appropriate operation.
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)