Stefan Cameron on Forms
Building intelligent forms using Adobe LiveCycle Designer

Connecting to a Web Service

Since I wrote my various articles on connecting forms to databases, I’ve had numerous inquiries about connecting to web services so here’s the long-overdue article on doing just that.

In Designer, you not only have the ability to create data connections to schemas (directly or based on sample XML data) and databases, you can also connect to web services. Web services are online applications that return information in response to specific requests. These requests and responses are sent and received via the SOAP protocol in various formats, as specified by the web service in an XML-based language called WSDL (you guessed it — Web Service Description Language).

Advantages of Web Services

One of the main advantages of using web services is to create an abstraction from server components such that clients ask the web service for information (via its various operations) without having to know the specifics about the server-side implementation (e.g. the web service may retrieve information from an Access database one day and later switch to a MySQL database but the client would still retrieve information in the same way, via the web service’s operations). If implemented correctly, web services can also provide better security by preventing clients from connecting directly to databases from the Internet, for example.

Supported Web Service Operation Types

To keep things simple, the WSDL basically describes the operations that are supported by the web service. To execute an operation, the client must submit a request to a web service operation and, upon receipt, the web service will execute the operation and submit a response back to the client, possibly containing data. Furthermore, these requests and responses are submitted in specific formats using specific data types which the WSDL also describes for each operation.

Document/Literal — Supported in Designer and Acrobat

The most important thing to note here is that Designer only supports executing web service operations which are specified as document/literal. This means that an operation defines XML schemas for its request and response formats. In turn, the XML data adhering to an operation’s request and response schemas can easily be gathered from a form using basic data bindings (a way, in XFA, to link a particular field’s value to a specific data node in a data connection).

RPC/Encoded — Supported in Acrobat only

Some of you more familiar with web services will note that operations may also be specified in the rpc/encoded format. Designer does not support executing such operations at this time because the data formats are more complex than straight XML schemas. The Google Search web service is an example. You may choose to connect to such operations using Acrobat’s SOAP object but beware that there is no server-side support for this object. This article will focus on doc/literal operations since they’re fully supported across all LiveCycle products.

Creating the Data Connection

Now that you have a basic understanding of web services and the document/literal operation type supported in Designer, let’s see how simple it is to execute a web service operation and receive a response.

First, you must create a new data connection to a web service. In the Data View palette’s menu, choose the "New Data Connection…" command, select "WSDL File" as the type and continue to the next step:

Choose "WSDL File" as the type.

At the second step, you’ll be asked to specify the WSDL file to connect to. For this tutorial, you’ll connect to a little web service called "Echo Employee" which simply defines 4 fields for the request and returns their data back as the response:

http://www.whitemesa.net/wsdl/r3/compound2.wsdl

Specify the source WSDL file.

When you click the "next" button, Designer will attempt to connect to the WSDL file and retrieve a list of its document/literal operations. If successful, you’ll get to the third step where you can choose the operation that will be executed by the data connection:

Specify the operation to execute.

In this case, there is only one operation. Choose "echoEmpolyee" and click on the "finish" button.

Designer will then use the data type definitions for the request and response formats of the echoEmployee operation to define a data structure in the new data connection in the Data View palette:

The new data connection in the Data View palette.

The only thing that remains is to create 2 sets of fields (one which will be used to submit the data for the request and another to receive the response) and a button to execute the operation. This can be done very easily simply by dragging and dropping the "DataConnection" node (or whatever you named your data connection earlier when you created it) onto your form. This will automatically generate all the necessary fields and bindings as well as the execute button:

New bindings after drag & drop.

Notice, in the Data View palette, that the icons pertaining to the various request/response fields are different than the usual binding icons: The request field icons have a single red arrow pointing to the left (indicating that their data is outgoing) and the response field icons have a single green arrow pointing to the right (indicating that their data is incoming).

You should now have the following object block on your form (from the earlier drag and drop operation) with fields of types matching the data which they will contain (text, numeric, etc.):

New fields and button after drag & drop.

That’s it! All that remains is to preview your form using Acrobat Standard or Pro (since connecting to a web service implies importing data which is only possible using Acrobat Standard/Pro or an extended PDF, via LC Reader Extensions, in Reader).

In the preview window, fill-in the top 4 fields and click on the "Echo Employee Btn".

Top 4 fields filled-in in preview.

If you correctly configured your data connection and created the necessary fields and bindings, Acrobat should connect to the web service, submit the data you entered as the request to the "echoEmployee" operation which will, in turn, respond with the same data to Acrobat, at which point the response data will be pushed into the response fields (directly below the 4 top fields):

Bttom 4 fields filled-in after response in preview.

Note that the fact that the same data is returned is only specific to this web service and its "echoEmployee" operation. Other web service operations may return different data (e.g. you submit a record ID and the response contains all the information for an individual) or not data at all (if the operation is simply meant to add a new record in a back-end system, for example).

Update (May 24, 2007): Zee, a colleague at flexlive.net, has posted a video tutorial on connecting a form to a web service. If you’re looking for something with more context, you might want to try that since you get to see the actual steps in Designer which I’m attempting to describe.

Update (Sep 2, 2010): faith pointed-out that the “Echo Employee” web service I had based this tutorial’s sample on no longer works. In fact, it doesn’t seem to exist anymore. I have kept the original sample since the tutorial is based on it and I have provided a new sample PDF based on a different web service (see below).

Sample Form

In case you have trouble following these steps, you may download the "solution" file here:

Download (original) [pdf]

Download (updated Sep 2, 2010) [pdf]

Minimum Sample Requirements: Designer 7.x, Acrobat 7.x.

Sep 2, 2010 — Add new sample PDF based on different web service since original sample PDF’s web service is no longer available online.


Posted by Stefan Cameron on May 21st, 2007
Filed under Acrobat,Data Binding,Tutorials
Both comments and pings are currently closed.

91 Responses to “Connecting to a Web Service”

  1. Fridrik Marteinsson on May 30th, 2007

    I was trying this Web service tutorial and got it to work properly with Acrobat Pro 8 but not with Acrobat Reader.
    Acrobat Pro 8 includes LC Designer and LC Reader Extension but it look like something is missing or I’m doing
    something wrong when enabeling Reader rights. The response from the web service does not appear.

  2. Ken on May 30th, 2007

    I had the same problem. The button doesn’t work in Reader, but I think it has to have Reader Extensions applied. Is that the same as enabling rights using Acrobat Pro 8 or is it the separate product that Adobe has called “Reader Extensions.”

  3. Stefan Cameron on May 31st, 2007

    Fridrik, Ken,

    Ken is correct: The form needs to be reader-extended in order to function properly in the free Adobe Reader. Unfortunately, this is not the same as the new “Enable Usage Rights in Reader” feature now available in Acrobat Pro 8.0.

    “Enable Usage Rights in Reader” only enables “local save” and not full-fledged data import which is what you need for importing data from a data connection (XML Data, ODBC or WSDL).

  4. Fridrik Marteinsson on June 20th, 2007

    Now, after the introduction of Adobe LC ES, is it right to assume that I need, as the creator of the interactiv PDF form, to buy the Data Capture Edition of LiveCycle ES for this kind of operation to work with the free Adobe Reader. Does someone know if prices have been mentioned somewhere.

  5. Pete Smith on June 21st, 2007

    This is all very interesting.

    I was hoping to be able to do something similar, targeting users with free Acrobat Reader installed. Looks like I can’t??

    Am I the only person who find’s it really odd, and rather frustrating that:
    a) it’s up to me to dig this kind of info out by searching newgroups and blogs, rather than Adobe providing some decent publically-available documentation setting it all out in a clear, easy to understand way
    b) why Adobe have decided to make this web service connectivity feature unavailable to so many potential users, who aren’t likely to want to pay up for a full version of Acrobat.

    Also:
    Can you confirm that, if I wanted to do something similar involving populating a dropdown control with the response from a web service:
    i) it would be possible -if so, how, precisely?
    ii) even if it were possible (and I’d love to know EXACTLY how it’s achieved if so), it’s actually of no use to me since my target users are only likely to be willing to use a free version of Acrobat Reader.

  6. Pete Smith on June 21st, 2007

    As a follow on from my last post – I stand corrected, having just re-read some of the preceding posts… users with Acrobat Reader could potentially benefit from the web service connectivity feature, but only if I have somehow done something to the form using “Reader Extensions”, whatever that is.

    Am I correct to stand corrected? If so, some detailed info on what “Reader Extensions” actually consists of, and what/how/why they are needed, would be very much appreciated. I’m guessing it’s all subject to licencing costs too – are these costs significant?

  7. Stefan Cameron on June 21st, 2007

    Fridrik,

    You’ve always needed either LC Forms ES or LC Reader Extensions ES to import data into the free Adobe Reader. If you did the data import on the server side, then you’d need LC Forms ES. If you did it on the client side, then you would use LC Reader Extensions.

    I haven’t heard about any pricing details yet.

  8. Stefan Cameron on June 21st, 2007

    Pete,

    I agree: I wish there was one logical place where customers/developers could go to get a straight answer on what they need for data import in PDF forms.

    The short story is that you need either LC Forms ES (for server-side data import) or LC Reader Extensions ES (for client-side data import) to enable people using only the free Adobe Reader to fill your form with a data connection to a schema, database or web service. The reason is that data import is one way in which Adobe monetizes the Reader which they freely distribute.

    Basically, the Adobe Reader cannot import data by default. Although it’s capable of doing so, that functionality is hidden and can only be “unlocked” on a form-by-form basis by using Reader Extensions (or you can circumvent it by having Forms to the data import on the server and serve the resulting PDF to the free Reader). By using Reader Extensions, you can enable things like data import for a specific PDF.

    Other hidden features in the free Reader are the ability to do a “local save” (give the user the ability to save their form — with data — to their local system in order to re-open it later and continue/finish filling the form) or to apply a digital signature to a PDF. These two functionalities don’t require the full Reader Extensions to be enabled as they can be enabled for limited use (I believe the limit is 500 uses of those functionalities per form — you would have to check the licensing agreement to be certain) using Adobe Acrobat Pro however enabling “local save” will not enable “data import”.

    Unfortunately, both Forms and Reader Extensions are quite expensive if you’re just wanting to enable a few forms. An alternative to purchasing Reader Extensions is to find a company which licenses Reader Extensions and charges a reduced cost to extend only a few forms (so instead of paying Adobe a large sum of money for Reader Extensions, you would pay this third party a much smaller cost on a per-form basis). You might also be able to find a company that would host your form on a server which has an installation of Forms — I’m not sure about that one though.

  9. Pete Smith on June 22nd, 2007

    Stefan

    Thanks for the useful (if slightly depressing) info.

    So, I need either LC Forms ES or LC Reader Extensions ES if I want to import data to a PDF using a web service.

    But what about simple “fillable” forms, where you create a template PDF in LiveCycle Designer, deploy it on your web server, and then serve some XFA-compliant XML to the client that contains data for certain fields (e.g. Smith) plus a URL reference to the template PDF….when this is parsed by the Adobe software on the client, the template PDF is downloaded and the data is merged. Oh, and also the template contains a button that submits the form content back as an XDP package to a given URL….?

    I’ve already created an example of the above type of form…it works, but I haven’t tried it with free Adobe Reader. My question is, will the free Adobe Reader let the user see the partially-populated PDF and allow them to fill in the remaining fields and click the button to submit their filled-in form back to the URL? Or will it only work if I send them the form via LC Forms ES or LC Reader Extensions ES? I guess to answer this, I could try this out myself, but I need to know the official answer just in case there’s something non-standard in my environment (i.e. my dev PC!) that makes it look as if it works when actually it shouldn’t.

  10. Pete Smith on June 22nd, 2007

    Sorry, yet another post… I would actually love to know how dropdown population is acheived using a web service, just in case LC Forms ES or LC Reader Extensions ES end up being available to me. I have tried following some earlier advice you’ve given to another person, but it didn’t go far enough for me to appreciate exactly what I needed to do. More info would be really useful.

  11. marty on June 26th, 2007

    Hi Stefan,
    I just want to clarify my understanding of this. I have created a form in Designer that is uploaded to our server and then accessed by a call to a php program that switches to HTTPS and then downloads the pdf form. The user fills in the form and then submits. The data is sent to my Linux/apache/PHP/MySQL server as POST data. this works great! Now I’m ready to have the form data accessed by the recipient, so I want to use the same form, and extract the data and populate it. Do I understand that if I use the SOAP/WSDL methods I can do this without requiring any upgrades or extensions to Reader, and that I don’t have to have any additional software except the SOAP client and a php program to process the SOAP request?
    There’s ton’s of information on the net and in Adobe, but sometimes simple answers are just not to be found.
    To see/try my form you may go to http://www.devtest.ipssolutions.com/bwca.php?d=1
    And, yes, the d=1 is used for configuration control, which means I will be able to add parameters that I will dynamically use to set up the SOAP call via scripts.

    Thanks
    Marty

  12. Stefan Cameron on June 26th, 2007

    Pete Smith,

    That’s very interesting. You would have to try this out in your environment with Reader. I would expect, however, that you wouldn’t be able to merge the data into the PDF if the client application is Reader since Reader doesn’t allow data merge from an external source unless you’ve Reader-Extended the form to allow “data import”. That would be the “official” answer. I’d be curious to know if you got this to work with Reader. What does the packet you serve-out to the client look like? Can you post a sample?

    LC Forms is different than Reader Extensions because it performs the data merge (or data import) on the server prior to serving the PDF out to the client (whether it’s Reader or any flavor of Acrobat). In this case, you don’t need to Reader-Extend the PDF because there’s no data merge that takes place at the client-end.

    Without knowing the degree of sensitivity of the data you’re trying to import into your PDF form, if you can deploy the PDF to a web server, then you could do the data import manually by passing the data into the PDF via the URL Request. Of course, if it’s sensitive data, then this wouldn’t be an option but it might give you some ideas…

  13. Stefan Cameron on June 27th, 2007

    Pete Smith,

    With regards to your question about populating a drop down list with a web service data connection, you should be able to use the Dynamic Binding feature to bind the drop down list’s item data to a repeating section in the response of a web service call.

  14. Pete Smith on June 27th, 2007

    I can confirm that, having uninstalled my trial version of Adobe Acrobat Professional 8.0 (which includes LiveCycle Designer) and reverting to my existing Adobe Reader 7.0, I was able to open my test web portal, and download my XFA/XML “packet” (XFA form data plus pdf reference) and the data and XFA form template were merged successfully.

    The data I’m serving to the client (simply writing out data to the Response object of my ASP.NET page) looks something like this:

    private void FormatResponse(string data)
    {
    Response.Charset = “”;
    Response.AddHeader(“Content-Type”, “application/vnd.adobe.xdp+xml”);
    Response.AddHeader(“Content-Disposition”, “inline”);
    Response.Write(GenerateBlankPDF());

    }

    private string GenerateBlankPDF()
    {
    System.Text.StringBuilder sb = new System.Text.StringBuilder();

    string strPDFUrl = ConfigurationManager.AppSettings["ApplicationFormURL"];

    sb.Append(“<?xml version=\”1.0\” encoding=\”UTF-8\”?>”);
    sb.Append(“<?xfa generator=\”XFA2_4\” APIVersion=\”2.5.6290.0\”?>”);
    sb.Append(“<xdp:xdp xmlns:xdp=\”http://ns.adobe.com/xdp/\”>”);
    sb.Append(” <xfa:datasets xmlns:xfa=\”http://www.xfa.org/schema/xfa-data/1.0/\”>”);
    sb.Append(” <xfa:data>”);
    sb.Append(” <topmostSubform>”);
    sb.Append(” <txtForename>Pete</txtForename>”);
    sb.Append(” <txtSurname>Pete</txtSurname>”);
    sb.Append(” </topmostSubform>”);
    sb.Append(” </xfa:data>”);
    sb.Append(” </xfa:datasets>”);
    sb.Append(” <pdf href=\”" + strPDFUrl + “\” xmlns=\”http://ns.adobe.com/xdp/pdf/\” />”);
    sb.Append(“</xdp:xdp>”);

    return sb.ToString();
    }

    The ApplicationFormURL config item is just a simple URL pointing to the blank XFA form deployed elsewhere on the same server.

    From what you’ve said, it sounds as if you wouldn’t have expected this to work in Adobe Reader (free). Have I witnessed magic here then? Or maybe my de-install of Acrobat Pro has left something hanging around which makes it work?

    Also:
    Notice this isn’t “data import” in the sense of having web service calls embedded into the form at design time. From all your other repsonses I’m now aware that this isn’t available in the free Adobe Reader unless the form has been suitable ‘activated’ via LC Forms ES or Reader Extensions. This example is purely merging data values into a fixed blank ‘template’. What I’d really love to be able to do is to modify things like dropdown list contents to make them dynamically bound to the database, but I gather this is only possible using web services etc. and hence will need LC Forms ES or Reader Extensions.

    BTW:
    I still don’t know what data a web service actually needs to return in order for a dropdown sitting on an XFA form to be able to “understand” it and use it to populate it’s own list of items. Does the data need to be XML? I’ve tried returning stuff like e.g. “<root><item>Mr.</item><item>Miss</item><item>Mrs</item><item>Ms</item></root>” as a string and all that seems to happen is that the dropdown just displays the entire XML string as a single item. Sometimes Designer also tries to convert it to a textbox control (presumably because it sees the return type of the webservice as ‘string’).

    Unfortunately your article on Dynamic Binding hasn’t helped me crack the problem.

  15. Pete Smith on June 27th, 2007

    I’ve tried posting a sample of the packet I’m sending, but for some reason it disappears when I click ‘submit comment’. Wonder what I’m doing wrong.

  16. Pete Smith on June 27th, 2007

    The data I’m serving to the client (simply writing out data to the Response object of my ASP.NET page) looks something like this:

    private void FormatResponse(string data)
    {
    Response.Charset = “”;
    Response.AddHeader(“Content-Type”, “application/vnd.adobe.xdp+xml”);
    Response.AddHeader(“Content-Disposition”, “inline”);
    Response.Write(GenerateBlankPDF());

    }

    private string GenerateBlankPDF()
    {
    System.Text.StringBuilder sb = new System.Text.StringBuilder();

    string strPDFUrl = ConfigurationManager.AppSettings["ApplicationFormURL"];

    sb.Append(“<?xml version=\”1.0\” encoding=\”UTF-8\”?>”);
    sb.Append(“<?xfa generator=\”XFA2_4\” APIVersion=\”2.5.6290.0\”?>”);
    sb.Append(“<xdp:xdp xmlns:xdp=\”http://ns.adobe.com/xdp/\”>”);
    sb.Append(” <xfa:datasets xmlns:xfa=\”http://www.xfa.org/schema/xfa-data/1.0/\”>”);
    sb.Append(” <xfa:data>”);
    sb.Append(” <topmostSubform>”);
    sb.Append(” <txtForename>Pete</txtForename>”);
    sb.Append(” <txtSurname>Pete</txtSurname>”);
    sb.Append(” </topmostSubform>”);
    sb.Append(” </xfa:data>”);
    sb.Append(” </xfa:datasets>”);
    sb.Append(” <pdf href=\”" + strPDFUrl + “\” xmlns=\”http://ns.adobe.com/xdp/pdf/\” />”);
    sb.Append(“</xdp:xdp>”);

    return sb.ToString();
    }

  17. Pete Smith on June 27th, 2007

    The packet I’m sending looks like this:

    <?xml version=\”1.0\” encoding=\”UTF-8\”?>
    <?xfa generator=\”XFA2_4\” APIVersion=\”2.5.6290.0\”?>
    <xdp:xdp xmlns:xdp=\”http://ns.adobe.com/xdp/\”>
    <xfa:datasets xmlns:xfa=\”http://www.xfa.org/schema/xfa-data/1.0/\”>
    <xfa:data>
    <topmostSubform>
    <txtForename>Pete</txtForename>
    <txtSurname>Pete</txtSurname>
    </topmostSubform>
    </xfa:data>
    </xfa:datasets>
    <pdf href=\”" + strPDFUrl + “\” xmlns=\”http://ns.adobe.com/xdp/pdf/\” />
    </xdp:xdp>

  18. Pete Smith on June 27th, 2007

    strPDFUrl in the above example is just a simple URL pointing to the blank XFA form deployed elsewhere on the same server.

    From what you’ve said, it sounds as if you wouldn’t have expected this to work in Adobe Reader (free). Have I witnessed magic here then? Or maybe my de-install of Acrobat Pro has left something hanging around which makes it work?

    Also:
    Notice this isn’t “data import” in the sense of having web service calls embedded into the form at design time. From all your other repsonses I’m now aware that this isn’t available in the free Adobe Reader unless the form has been suitable ‘activated’ via LC Forms ES or Reader Extensions. This example is purely merging data values into a fixed blank ‘template’. What I’d really love to be able to do is to modify things like dropdown list contents to make them dynamically bound to the database, but I gather this is only possible using web services etc. and hence will need LC Forms ES or Reader Extensions.

    BTW:
    I still don’t know what data a web service actually needs to return in order for a dropdown sitting on an XFA form to be able to “understand” it and use it to populate it’s own list of items. Does the data need to be XML? I’ve tried returning stuff like e.g. “<root><item>Mr.</item><item>Miss</item><item>Mrs</item><item>Ms</item></root>” as a string and all that seems to happen is that the dropdown just displays the entire XML string as a single item. Sometimes Designer also tries to convert it to a textbox control (presumably because it sees the return type of the webservice as ‘string’).

    Unfortunately your article on Dynamic Binding hasn’t helped me crack the problem.

  19. Pete Smith on June 27th, 2007

    …and I should also point out that the above example packet is served up with a Content-type of “application/vnd.adobe.xdp+xml”.

  20. Stefan Cameron on June 30th, 2007

    Marty,

    Cool form — I just gave it a shot as “John Doe”.

    If I understand correctly, you’re wanting to give a way for the user to see information they’ve submitted using a PDF form, possibly the same one I just used to submit information but populated with the data that was previously submitted, correct?

    If so, then you can do it with a web service however Reader alone won’t be able to import the data into the PDF form. If people accessing this form — with data included — will be using Reader, you have two options:

    1. The data is merged into the PDF form on the server using LiveCycle Forms ES and the form is then served to the client; or
    2. The PDF form extends Reader, using LiveCycle Reader Extensions, in order to temporarily give it the ability to import data from a web service.

    If people will be using Acrobat Standard or Professional, then there’s no problem connecting to a web service in order to import data into the form as these versions of Acrobat support data import on all forms.

  21. Stefan Cameron on July 10th, 2007

    Pete Smith,

    Have you made any headway with this over the past week?

    It looks to me like you’re generating an XDP with a data packet and an externally-referenced PDF form and serving this to the client. In return, the client is detecting it as a file which can be opened with Acrobat or Reader and proceeds to do so with the data merged-in. As far as I can tell, this is still considered a “data import” and the fact that it works with Reader 7.0 but not with later versions is likely due to the fact that prior to Reader 7.0.5, there was bug which actually permitted Reader to import data without the PDF being Reader-Extended. It’s possible you’re running into this if you’ve reverted back to Reader 7.0.

    As far as dynamically populating drop down lists or list boxes, you need to bind the list object to a repeating data node in your data packet. Let’s say we took the data.xml file from my data-nominated subforms tutorial. It looks like this:

    <data>
        <movie>
            <title>movie title</title>
            ...
        </movie>
        ...
    </data>

    The <movie> data node repeats and contains properties about the movie. If you then used the Dynamic Properties feature to bind the <title> data to the items in a list object, you would end-up specifying that the items as a whole are bound to

    $record.movie[*]

    which means it’s bound to all instances of the <movie> data and then you would also specify the property of the <movie> node which is bound to the list object item’s text as “title”. The resulting XFA is as follows for the list object:

    <field>
        ...
        <bindItems ref="$record.movie[*]" labelRef="title"/>
    </field>

    This is obviously very similar to your data example for “Mr, Miss, Mrs and Ms” in your previous comment. The fact that the XML string gets displayed in the drop down list rather than various items make me think that all you’ve got is a binding of the <root> data to the drop down list’s value rather than a dynamic binding of “$record.root[*]” for the items and “item” for the item text values.

  22. David Daiker on July 12th, 2007

    Hi all, this has been a great discussion for me as I’ve been trying to get answers to some of these questions myself and can’t seem to find them. I want to summarize what I’ve been reading and get everyone’s opinion if I’m right or not

    1) With only Reader installed you are not supposed to be able to do anything that “imports” data into the form.
    2) Using Pete Smith’s approach of sending an XDP file through the browser, Reader will populate a form with data (I confimed this works with only Reader 8.1 installed).
    3) Given #1, will any web service call work? Should a call invoked via javascript work? I havn’t been successful in getting any web service call to work yet, even with Acrobat Pro installed.
    4) By using LC Reader Extensions all this can be enabled for Reader only users.

    Another quesion, what is LC Reader Extensions anyway? Is it a tool that you purchase and install on each form designer’s machine? Or does it need to be liscensed for each “Reader only” user? Or is it a server based product? I can’t seem to find much info on this product, including Adobe’s sales staff.

  23. John Nesbitt on July 16th, 2007

    Stefan,

    We are attempting to connect to a webservice from a Reader Extended LiveCycle form – using Adobe Reader as the client. We want to streamline our account opening process by creating an interactive, dynamic LiveCycle form with a submit button that uploads the form’s XML content to a webservice. The response of the webservice is the new account code. The process is based off the solution brief – http://www.adobe.com/financial/pdfs/accountopening_sb.pdf

    Our network (and potentially the networks of our clients) is behind a Microsoft ISA Server, which uses NTLM proxy authentication (challenge / response).

    Using Ethereal, I can see that the form does correctly send the XML to the webservice, however, when the challenge (“HTTP 407 Proxy Authentication Required”) response comes back, Adobe Reader thinks that this is the actual response from the web server, tries to process it and fails with “Error attempting to read from file”.

    I’ve attempted to use the HTTP submit feature but that too fails when “Display PDF in browser” is not enabled. The HTTP submit feature works if the PDF is displayed in the browser because the browser has already authenticated to the proxy server. However, calling a webservice from behind an ISA proxy never works, even if the PDF is displayed in the browser.

    I have been trying to find information on Adobe Reader’s support of NTLM proxy authentication but I can only find articles on “Adobe Stock Photos” and “Adobe Download Manager” products not being able to handle them.

    Are you aware of any work arounds to this problem or do you know of any plans to introduce support for this type of proxy authentication within Adobe Reader?

    Thanks,
    John.

  24. Stefan Cameron on July 18th, 2007

    David Daiker,

    In response to your statements/questions:

    1. That’s correct: When using the Adobe Reader without anything special done to a PDF form, you aren’t supposed to be able to import data into the PDF by any means.
    2. Pete Smith’s approach is very interesting because he’s essentially getting data into Reader without extending the form (which, as far as I know, isn’t intended to work). This approach may or may not continue to work in future releases.
    3. Web service calls will definitely work in Acrobat Standard or Pro and in Reader as well, if the form has been properly extended with “data import” rights. If you follow the tutorial I posted recently about connecting to a web service (in fact, it’s this article), you should be able to see this working properly. If you did but aren’t getting any results, perhaps the web service operation you’re attempting to execute to isn’t document/literal. Designer and Acrobat are only capable of working with doc/literal operations at the moment.
    4. By using LC Reader Extensions, you can enable Reader to import data and therefore enable Reader to receive a web service response.

    Put simply, LC Reader Extensions is a server product which is used to set special codes in a PDF form (on a form-by-form basis) which Reader recognizes in order to enable hidden features in Reader such as data import. You could say that Acrobat Pro 8.0 has a very “light” version of LC Reader Extensions built into it because of its new “Enable Usage Rights in Reader” command (under the top-level “Advanced” menu) which allows you to enable “local save” in Reader for a particular form (note that the use of that feature is restricted — see your license agreement for more details).

    To find-out more on Reader Extensions, see the feature page which gives you some of the highlights of the product. Note the 4th row from the top highlights providing “web service and database connectivity” for your forms.

  25. Stefan Cameron on July 24th, 2007

    John Nesbitt,

    I’m afraid I don’t know of any workarounds to this situation, neither do I know of any plans for Reader to support authentication when establishing a connection to an external resource such as a web service.

    I believe your best bet is to require that users login prior to using the form and, as a result, prior to Reader attempting to establish the connection with the web service.

  26. Pete Smith on July 31st, 2007

    Stefan

    Help! Your last reply to my endless waffle about “data imports” and web services is slightly terrifying.
    Are you actually saying categorically that the technique I’m clutching onto in something approaching desperation – because, so far, it WORKS – is really just some happy accident?
    Forgive me, but I’m beginning to bang my head against a hypothetical brick wall with all this… I’d be delighted to stand corrected but your blog here seems to be literally the *only* resource on the planet where this kind of information is readily forthcoming!

    Ok please excuse me for sounding off.
    I need to get to the bottom of this once and for all, and quickly.
    Is the technique I’m using viable, or should I throw it out right now before more trouble starts? In which case, what’s the next best, cheapest alternative? LiveCycle Forms ES or Reader Extensions ES? And do these products rely on installing/running some extra stuff e.g. JBoss server to effectively host them? Is there a Microsoft-friendly version of them? I can’t get this information from anything I’ve looked at on Adobe websites.

    Please Help!
    Sounds like David Daiker will be interested in this too…

  27. Stefan Cameron on July 31st, 2007

    Pete Smith,

    I apologize that this is causing so much frustration. I wish working with data in XFA-PDF forms was more straight-forward. I’ve made an inquiry to colleagues of mine who will hopefully provide me with a more definite answer and will report back here as soon as I hear from them.

    In the mean time, to answer your Reader Extensions and Form Server questions, I don’t know much about pricing but I would suspect that Form Server would cost less than Reader Extensions simply because Reader Extensions has a cost per PDF (as I understand it). If you’re really interested in purchasing either, I believe you can get in touch with an Adobe Sales Representative via Adobe’s website. As for deploying either on your server, I’ve been told that Windows Server 2003 can be used however both are Java implementations and therefore require an application server. Apparently, the majority of deployments on Windows Server 2003 have been to WebSphere (which must be purchased separately).

  28. Stefan Cameron on August 1st, 2007

    Pete Smith,

    The initial reaction from my colleagues is that this probably won’t continue to work. In your previous comments, you indicated that you verified this method works with Reader 7.0. Have you tried it with Reader 8.1? If I could easily replicate what you’re doing, I would test it myself but this is a rather complex scenario to reproduce so I’ll have to ask you to test it yourself. Please let me know if it still works in Reader 8.1 and we’ll take it from there.

  29. Pete Smith on August 15th, 2007

    Stephan

    Thanks for your response. I’ve been away from the office the past couple of weeks so have only just picked this up again.
    I can confirm that with Reader 8.1.0. everything still seems to work, except dropdown populations!
    So for example if I have a dropdown control on my form where someone has selected a value from the list and then submitted the form, if I send them back the XFA data at a later point in time the template is displayed with all their other text field entries populated ok but the dropdown appears as if no value has yet been selected.

    In Reader 7.0 the same form behaves ok with dropdowns populated ok too.

    Sounds like Form Server and WebSphere together could end up costing a fair bit. What a shame.

  30. Stefan Cameron on August 26th, 2007

    Pete Smith,

    Thanks for the update on Reader 8.1. I’ll pass this along to my colleague to see what he can make of it.

    As for your problem with drop down lists, I’m wondering if we’ve had a little communication problem: In previous comments, you’ve talked about “populating drop down lists” which in your last comment, you’re talking about a problem where there appears to be no selected value in the drop down list. I’ve been responding with methods to populate a drop down list with items which is different from binding a drop down list to a data item in a schema in order load an associated value from an XML Data file. Which one is it that you’re asking about with respect to your on-going drop down list issue?

  31. Robert on August 27th, 2007

    Pete and Stefan,

    I have also used the same method as Pete to populate PDF documents on the fly – by sending the response object back to the client. I’m running 8.1 and can select items in a listbox, but cannot populate items in a dropdown or listbox. If one of you are able to get it to work, can you post an example of what the XFA should look like here? Thanks.

  32. Sandeep Virmani on September 18th, 2007

    Hi,

    I have started using the evaluation version of Live Cycle Designer. Can some one please let me know what features/ functionalities are NOT available in the evaluation version.

    Presently I am trying to export the Form Data in XML format, but unable to do so, Though the code written to export the form contents into pdf is correct, i am not getting any response/error while i click on the export button.(added for exporting to xml).

    Thanks in advance
    Sandeep Virmani

  33. Stefan Cameron on September 22nd, 2007

    Sandeep Virmani,

    The evaluation version of LC Designer is the full version except that it has a time limit for its use, after which you’ll have to purchase a copy.

    When you talk of exporting “the form data in XML format”, are you saying you’re trying to put a submit button on your form which, when pressed, would submit the form’s data in XML format to an email recipient? If so, simply use the email submit button found in the Library palette’s Standard tab.

  34. Steven on October 4th, 2007

    Hi Stefan,

    I have a web service that I created and it looks like it is set up similarly. Although I was wondering if you could extend your example to show how to repeat data from a web service in subforms. For some reason examples that I have found that point to xml files will repeat data properly, although when I apply the same settings on my subforms data will not repeat unless I hard set my initial count on min count. I am using Designer 8 and tried saving the document as v7 and v8 dynamic documents and as an XDP but it just will not automatically generate the correct number of fields for me.

    For example,

    <Logs>
    <LogNum>
    12345
    </LogNum>
    <LogNum>
    54321
    </LogNum>
    </Logs>

    I will wrap a Flowed subform around a positioned subform set at initial count 1 and when I execute the web service only 1 text box is there and it fills with the first value.

    Then if I set initial count to 2 and execute, I will see both values. The problem is I wont know how many values I’m getting so I am trying to figure out how to make that happen dynamically.

    Thanks!

  35. Stefan Cameron on October 18th, 2007

    Steven,

    I’m a little puzzled as to why this is happening but I have to admit: Your sample XML data (the response from the web service, I assume) looks a little suspicious. When I look at it, I don’t see a repeating section in the way Designer (and XFA) is expecting it. Obviously, the intention is that the “LogNum” data node repeats but in order for the instances to be correctly determined, the repeating data node must contain some other node. Otherwise, there’s nothing to bind the repeatable subform to and then there’s nothing to bind a field within that subform to.

    If you were to create a data connection using that sample XML data, the data connection would show you a single data node named “LogNum”. It wouldn’t show you a “LogNum” data node that contains something else.

    If you restructured the XML data like this:

    <Logs>
        <Log>
            <Num>12345</Num>
        </Log>
        <Log>
            <Num>54321</Num>
        </Log>
    </Logs>

    then the repeatable subform inside the flowed subform could bind to the <Log> data node and a field inside the subform could bind to the <Num> data node. Establishing these bindings would create multiple instances of the repeatable subform where each instance’s field is populated with the correct log number.

  36. Marion on June 2nd, 2008

    Hello,

    I’ve install Adobe LiveCycle ES trial version with JBoss.

    I would like to create a form with witch I can call web services (and send datas to another application). I follow the tutorial of Zee Yang (http://www.flexlive.net/?p=70) and your but in the end, when I click on my “submit” button, nothing appens…
    But my web services are OK, we can call them with another appli !

    What can I do ?

    Thank you for your help and sorry for my bad english

    Marion.

  37. Stefan Cameron on June 7th, 2008

    Marion,

    Are you certain the web service operation type you’re connecting to is “document/literal”? If not, the web service data connection will not work properly.

  38. Madhavi on July 7th, 2008

    Hi Stefan,

    I am working on Adobe livecycle Workbench 8.1.

    I went through your article of “Connecting to a Web Service”. I tried to implement it and it works fine. You mentioned that a button is needed to invoke the WebService. Is there a way to skip button clicking. Basically what I am trying is I have a webservice and its returning multiple rows(retrieving results from a lookup table). I need to display the results in a form data drop down list and should happen when I run the form, I dont want another button to be clicked in between.

    Thanks,
    Madhavi.

  39. Stefan Cameron on July 14th, 2008

    Madhavi,

    You can manually execute a web service data connection by accessing it in the ConnectionSet DOM and calling its execute() method. Try putting this script in the form’s Initialize event and get rid of the button:

    xfa.connectionSet.{WebServiceDataConnectionName}.execute();

    where {WebServiceDataConnectionName} is the name you gave to your web service data connection.

  40. Madhavi on July 15th, 2008

    Stefan,

    Thanks for your reply. I did try as you suggested before you replied, but now the issue is that its returning only one value to the drop down list while I know there are multiple value. I tried using data drop down list…but it did not help.

    Also I have another issue which is -

    I created a process, the goal is to use it as Lookup web serice which points to DB table and returns results which can be viewed in Forms using a drop down list. In the process I have a Service Operation called “Query for Multiple Rows as XML”.

    For “Input” -

    I have the DataSource Name and a SQL statement to the lookup table.
    In the Input XML information, I provided the Root Element and the Repeating Element name and provided column mappings. When I test it the correct XML gets generated.

    For “Output”-

    I set the output to a variable of datatype XML.

    I activated the service and can view the WSDL.

    In the Form Design,
    1) I created Data Connection to the WSDL.
    2) On the form, I added drop down list and binded it with the element of the variable from the response and added the “Invoke Button”.
    3) I went to AdminUI and disabled the security for that service.

    When I hit the button, I get no results.

    Would be great if you could direct me to a document or mention procedure as to how to go about with this issue.

  41. Stefan Cameron on July 20th, 2008

    Madhavi,

    I could see why you would’ve tried the data drop down list however it’s pre-configured to work with ODBC data connections, not web service data connections. If you simply create an execute binding to the drop down list, you’ll only get a single value. You would need to use Dynamic Binding in order to get all results from the web service merged into the drop down list as items.

    As for your question about the process, I’m afraid that’s not my strong suit. I would suggest you post that question to the Adobe LiveCycle ES Workbench Forum. Hopefully someone there could answer your question.

  42. Brian on July 29th, 2008

    Hi,

    Thanks for all the help already! I a trying out your example and I simply get an error that says “Error attempting to read from file”. Maybe you’ve answered this already, but what does that mean?

    ~Brian Wright

  43. Brian on July 29th, 2008

    …by the way. I am using Acrobat 8.0 Professional

  44. Stefan Cameron on August 5th, 2008

    Brian,

    I’m not certain what that error message could mean. At which point do you get it? When you try to open the PDF in Acrobat? Are you able to open it in Designer? Are you able to follow my tutorial and make your own form that connects to the “Echo Employee” web service?

  45. Brian on August 7th, 2008

    I tried your tutorial and as soon as I push the “Echo Employee Btn”, after filling out the information, I am given the message “error attempting to read from file”. I tried connecting to a webservice that someone at my organization wrote and it gave me the same message until he changed the authentication method in the virtual directory to “anonymous access”. I do not competely understand what he did, but once he made the change it worked. However, it still did not work for your example neither any other examples I tried online.

  46. Brian on August 7th, 2008

    I am opening and creating the PDF in Designer…

  47. Stefan Cameron on August 14th, 2008

    Brian,

    I tested my sample form and I’m getting an “error 500″ response from the “echoEmployee” web service. That tells me that there’s something wrong with the web service (the server), not the form or Acrobat. Unfortunately, there’s nothing I can do about that since I don’t own it.

    If your colleague had created a web service that required authentication and you were connecting to it with Designer 8.1, which doesn’t support authenticated web service access (or you tried this with Designer 8.2 but didn’t configure the authentication), then this would explain the error before they switched it to “anonymous access”.

    As for other web services out there, it could be an authentication problem just the same or something entirely different. It’s difficult to tell what, exactly.

  48. Brian on August 19th, 2008

    Stefan,
    Thanks for your reply. This is totally off topic but maybe you can help me out or point me in the right direction…

    My boss has asked me to develop a form that is filled out and then sent to a first, second, and third line manager in that order. The first line manager reviews the form, signs it, and e-mails it to the second line manager. The second and third line manager do the same. My boss wants to know how the form will handle the situation if one of the managers is out on sick leave or vaction. He wants the form to be able to forward itself to the next manager in line. From my understanding, once a form is sent out via e-mail it has no other connection with the world. I know for certain that the form cannot determine how long it has been sitting in someone e-mail’s box. A suggestion my boss gave me was to send the form to next line manager and send the data via XML to a database on a server. A batch job would run every so often and check to see how long the data has been sitting in the database. If a certain amount of time has passed, then a program would load a pdf form with the data and automatically send it to the next manager in line. Obviously this is a very complex solution. I want to know if anything like this is possible using Livecycle 8 or Acrobat 8?

  49. Stefan Cameron on August 25th, 2008

    Brian,

    This is the sort of thing LiveCycle ES Process Management was designed to handle. The process would manage the email routing as needed.

  50. Brian on August 26th, 2008

    Thanks! This looks like EXACTLY what we need. I am going to start reasearching that more right now.

  51. Ram on September 12th, 2008

    Stefan

    I am trying to implement a similar solution and my requirement is something like this:

    I have a PDF form that was developed in LiveCycle Designer 8 and user rights enabled using Acrobat 8.
    This PDF form will be posted on our organization’s website, so that our users can download the form to their desktop. (Note: our users are not connected to our corporate network).
    Users will fill out the form and then click on the Submit button located on the form.
    When they submit, data should be posted directly to our IMS database.

    We are still in the design phase and I would like to know what the architecture would look like. We have IMS connect which is an interface between the XML stream and the IMS database.

    Now my question is:

    1. What are all the components required to do this? (Web server, Application Server, LiveCycle Server, IMS Connect, IMS database). I am just looking for some step by step guide on how the data flows from pdf form to database how the components/servers are interacting.
    2. Do we need to write any servlet/php scripts that will send the form data in xml or just changing the “Submit As” property would do the trick?

    Much appreciate your help.

  52. Stefan Cameron on September 15th, 2008

    Ram,

    I can’t speak to the specifics of what’s required with respect to the IMS database however I can suggest what the setup would look like for a database in general:

    It sounds like your form is a data capture solution, meaning that you don’t have a need to pre-populate it with data from the database. Users simply download the form from your website, fill it out and you want the data submitted directly into your database. If that’s the case, then I suggest you consider the following options:

    1. Create a web service and connect your form to it using a data connection. Upon clicking a submit button on the form, the data would be submitted directly to the web service which would, in turn, insert the data into the database. In order to implement this solution, you’ll need LiveCycle ES with LiveCycle Reader Extensions ES in order to extend the PDF to allow for communication with the web service.
    2. Create a web service and connect your form to it using a data connection however you would specify that the web service execution would take place on the server, which means Acrobat/Reader would not be submitting the data to the web service. This task would occur on the LiveCycle ES server running in the back-end. In this case, you would LiveCycle ES with LiveCycle Forms ES.
    3. Create a web service and create a web page that can process an HTTP POST call. Ideally, this would be either an ASP, PHP or JSP-style page. This page would take the posted XML data and relay it to the web service. Or it could even insert it directly into the database (e.g. in a PHP+MySQL setup). That’s up to you. The advantage here is that you don’t need LiveCycle in the back-end however it’s an extra step to go through the web page and you can only submit XML data (as opposed to the entire form, if you needed to do that).

    Please note that I can’t guarantee any of these solutions and I can’t speak to the degree of security of each one. They’re just some ideas for your consideration.

  53. Han Dao on November 17th, 2008

    Hi Stefan,

    I am still in learning phase of LiveCycle Designer and Workflow . I’m trying to follow your tutorial “Connect to Web Service” but having a problem that I don’t get the other data populate. How do I make the form that when a user enter a emp ID and press on the button then the response will populate all the information such as name, address, etc for that empl ID which connect from the web service that I created in the Workflow (I created it by using SQL qpac in Wkflow 7.2)? I know that I miss something but could not figure out so I would like to get some help/hints from you. Note that I am still using LiveCycle Designer and Worflow 7.2. Do you have some tutorial or example from the scratch, please provide it. Thanks very much in advance. I appreciated much.

    Regards,
    Han Dao

  54. Han Dao on November 19th, 2008

    Hi Stefan,

    I got every thing done now but I don’t get all the information populated except for only one fields. I created a web services in workflow 7.2 and created a form to connect to that web service, I binded fields such as lanid, empid, fname, lname, address, etc to that w.s and created an invoke button to populate the data base on the laid but I only got the empid populate shown only but not fname, lname, etc. I know that I may miss something here but I could not figure what it is. Any of your idea would be appreciated. Note that the web service contains a query from 2 different views/tables in which the lanid and empid are from viewA and empid and other fields are from viewB.

    Thanks in advance,
    Han Dao

  55. Stefan Cameron on November 19th, 2008

    Han Dao,

    If you’re calling the web service appropriately, then this kind of trouble is probably related to the bindings you’ve set on the fields.

    Web services have import and export bindings. The export bindings are for the request part of the web service (the data that goes out like the empid data to do the query) and the import bindings are for the response part (the data that comes back to the form like fname, lname, etc.).

    You should have the lanid and empid fields bound to export bindings within the web service data connection and you should also have fields bound to fname, lname, etc., bound to the import bindings.

    The easiest way to verify that the web service is working as expected may be to simply drag & drop the entire data connection onto a blank form. This will create all of the import and export fields and bindings. You can then fill-in the empid and lanid fields manually and invoke the web service. You should then see the data coming back in the fname, lname, etc., fields.

    If that works, then it points to a binding problem in your form.

  56. Han Dao on November 20th, 2008

    Stefan,

    Thanks for your response. I did exactly like what you have suggested but still did not return all the data. However, I did create a new form that call the sample web services from StrikeIron and it works perfectly. When I created a web service in Workflow 7.2 with an Oracle query, I see no option for me to enter username & pw & db to login to Oracle in order for that query to run. So I doubt about it and question that how can the workflow know which database to use so it can execute that query. In this case, is it considering a secured web service that require authentication? Could you please advise.

    Thanks,
    Han Dao

  57. Sandeep on January 13th, 2009

    Hello Stefan,

    I have workbench and livecycle designer installed on my work machine. I have a form which talks to web service to get the firstname, lastname and address.
    When i tried to open this form on my work machine, it did not populate any data.
    I do have a personal machine on which i have acrobat professional 9 Extended version installed. The same form runs on this machine and populates data from the same web service.

    Work machine just have the workbench 8.2 ES and adobe reader, but no acrobat professional.
    Do i need to install acrobat professional and work machine or do i have to extended usage rights of the form using reader extensions?

  58. Stefan Cameron on January 15th, 2009

    Sandeep,

    Unless you extend the PDF to allow data import rights using LC Reader Extensions ES, you won’t be able to connect to the web service using only Reader. Given the substantial cost of Reader Extensions, you might want to just install Acrobat Standard or Pro on your work machine if you have access to it.

  59. Maurice on February 5th, 2009

    I’m using a sample webservice that requires basic authentication to the webservice, but I don’t know how to submit the credentials via the dataconnection with ALCD 7.1. Any ideas?

    I have setup the form (dc) via a webservice.

  60. Stefan Cameron on February 10th, 2009

    Maurice,

    Unfortunately, web service authentication is only supported as of Designer 8.2. In that version, you can specify that the web service requires various types of authentication.

  61. Susan Wilson on March 13th, 2009

    Hi Stefan,

    If a web service returns multiple records, what object do you use to parse through the records?

    I am using Designer 8.0 and I have searched through all the resources I can find for some javascript that will allow me to query the result set and select the record and I want. But I have yet to find anything. Can you get me started?

    Thanks in advance for your help!

  62. Stefan Cameron on March 17th, 2009

    Susan Wilson,

    I’ve seen this done in two ways:

    1. The web service operation (doc/literal) defines the response XML structure and you set import bindings on various fields — making some repeatable as appropriate — using the Data View palette (e.g. drag and drop objects from the ‘response’ section in the data connection in the Data View palette onto your form). When the data is returned from the web service, the fields (and instances) are populated.
    2. The web service operation (doc/literal still) defines the response as being a single value which you expect to be an XML-encoded string. You create an import binding on a hidden text field for the response and you then manually execute the web service data connection (xfa.connectionSet.{DataConnectionName}.execute(false) — specify ‘false’ as the argument to prevent the data from being automatically merged into the form’s Data DOM when the response is received). After the connection has executed, the hidden text field contains the XML-encoded response string which you can then load into the Data DOM (xfa.datasets.data.loadXML(string, …)) and parse.

    There is also a third option which is to set a PostExecute event on a form object (say a subform) for the data connection in order to have a look at the data right after it’s received from the web service. In this case, I don’t think you would even need a hidden field for the response. Say your data connection’s name was “MyDataConnection”. You could set the following on the root subform in the XML Source view (since you can’t do this using the Script Editor):

    <event activity="postExecute" ref="$connectionSet.MyDataConnection">
        <script contentType="application/x-javascript">
            var responseXml = xfa.datasets.connectionData.MyDataConnection.nodes[0];
            myScriptObject.processResponse(responseXml);
        </script>
    </event>

    When a web service is executed, the response is temporarily stored in xfa.datasets.connectionData.{DataConnectionName} for the duration of the PostExecute event for the data connection to give the form a chance to process it some way. The above event assumes you have a script object named “myScriptObject” that has a function called “processResponse(node)” which it will call with the root XML node of the response from the web service. You can then either merge that XML into the Data DOM or manually parse it (using E4X syntax) and create subform instances and populate fields as needed.

  63. Adi Kadapa on June 15th, 2009

    Hi Stefan,

    We are trying to connect to our server using WSDL from pdf. We are using Adobe Livecycle Designer ES and Acrobat reader. The WSDL is supposed to return a list of items when an input string from pdf is submitted to the server. Though I am successful working with other free WSDL files, I couldnot able to get results with our WSDL file.
    After creating a new data connection using our WSDL file, in the data tab I could see a text input and a button for out going message body which is obvious in our case( text box for text and button to submit the text). But the incoming message body only has a subform and nothing else(supposed to have a textbox or dropdownlist when compared with working examples).
    Our WSDL is working good with html forms. It would be very helpful if you could suggest a solution for us. Our WSDL file is located at
    https://qhrdev.healthquilt.org/ccrimport/meds.php?wsdl=true

    Thanks,
    ADi

  64. Stefan Cameron on July 13th, 2009

    Adi Kadapa,

    All I can suggest is that Designer’s Data Connection Wizard doesn’t
    recognize “soap-enc:Array” as being a list type.

  65. chully park on August 13th, 2009

    Hi Stefan
    I’m able to create a WSDL data connection and populate the pdf with the results.
    But im having problems pushing data to a web service. I have a pdf with a dynamic table and have consumed a WSDL. I’ve mapped the columns to the wsdl but when I call the webservice, only the data from the last row gets passed, not all the rows.

  66. chully park on August 13th, 2009

    I found a post similar to what im trying to do but the suggested solution would imply i call the webservice 5x for 5 rows.

    http://groups.google.com/group/livecycle/browse_thread/thread/cba54a078914af17

  67. Stefan Cameron on August 23rd, 2009

    chully park,

    If you’re using a version of Acrobat/Reader prior to 8.1, then you’re likely running into a bug where only the last instance of a repeating table/subform is sent to the web service (rather than all instances).

  68. vlada on September 23rd, 2009

    Hi, sorry for wasting your time again. I need an advice. We have simple project:
    - we have created PDF template (document)
    - we have created XML data file
    - we would like to use acrobat reader as a client
    - it is possible to programatically load XML data into PDF without LifeCycle server? (for example using wsdl connection or better another trick which works without server – XML data connection???)
    - the data are submitted back using http submit (it seems to work without problem)
    Have a nice day
    Ing. Vladimír Pravenec

  69. Stefan Cameron on September 27th, 2009

    vlada,

    First, it’s not possible to programatically load XML data into a form due to security restrictions. If you could, you would do it with xfa.host.importData(file.xml) however this will not work unless the script executing this statement is “trusted” (which means it’s in a special JavaScript folder on the user’s system). Otherwise, you’ll get the file picker dialog where the user can choose an XML file to load (or cancel the dialog altogether) — assuming they’re using Acrobat or the PDF has been extended, using LiveCycle Reader Extensions, to permit data import in Reader.

    Using a web service is an alternative, as you can have a method on that service that returns an URL-encoded XML string which you can decode, using the JavaScript decode() function, and then load into the form’s Data DOM. You could do this by pre-processing the web service response. That being said, you’ll still run into problems doing this using Reader because the PDF will need to be extended to allow data import privileges using LiveCycle Reader Extensions.

  70. Jalal Mohtashami on November 6th, 2009

    This is probably pretty obvious but I just want to clarify. LC Forms ES or LC Reader Extensions ES are only needed to import data from a server to a form, correct? That is to say forms created in LC Designer can freely submit data using xml schema, web services or database connections, right?

    If this is the case, is there a way for Reader users to receive a submission confirmation that would not require a reader extended form?

    Thanks

  71. Stefan Cameron on November 8th, 2009

    Jalal Mohtashami,

    LC Forms ES can be used to import and export data into/from a form and this is done server-side. LC Reader Extensions ES is used to enable Reader to do this client-side which, by default, it cannot do.

    The only thing Reader can do, without LC Forms in the background or a reader-enabled PDF, is submit XML data by email or HTTP. That being said, there are ways, which aren’t necessarily secure, to get data into Reader. This is one that I have explored.

  72. Jalal Mohtashami on November 20th, 2009

    Okay, so I hate to ask because it feels like I’m just asking the same question again. I was checking the LiveCycle Forums and I read that for 2D Barcodes the limitation requiring LC Reader Extensions is in the EULA. Regarding data binding, is this limitation also coming from the EULA of LiveCycle Designer or is it simply that these solutions are needed to connection

    I ask because my manager asking me to look into a programmatic work around of this limitation.

  73. Jalal Mohtashami on November 20th, 2009

    Sorry, let me correct my typing error:

    Regarding data binding, is this limitation also coming from the EULA of LiveCycle Designer or is it simply that these solutions are needed to facilitate the connection.

    I ask because my manager is asking me to look into a programmatic work around of this limitation.

  74. Stefan Cameron on December 3rd, 2009

    Jalal Mohtashami,

    These are limitations imposed by Reader. If you knew all the users of your form(s) would have at least Acrobat Standard on their desktop, then you wouldn’t have a need for LC Forms (for what you can do with server-side rendering) and/or RE (enabling various features in Reader that are basically considered too valuable to give away for free).

    If you’re looking for a programmatic workaround, then I would suggest something like the URL request tutorial I pointed you to (not secure, to say the least, but it works for an online form).

  75. Manish on December 27th, 2009

    Hi ALL,

    In LiveCycle 8.2.1 , i had created a wokkflow to convert a document to PDF and storing it to some location on the server itself( by using writedata operation).
    work fine for watch folder end point( to confirm that there is no errors in workflow)

    Now, i had one input type variable inDoc(as Document)

    i want to send the attached document in PDF file through WSDL to the LiveCycle server by creating Data Connection in Designer (http://servername:port/soap/services/servicename?wsdl).

    Now i had attach the document( .txt for example) by following command in button’s click event:

    form1.#subform[0].Button1[0]::click – (JavaScript, client)

    var myDoc= event.target;
    myDoc.importDataObject(“file”);

    in data connection i see four text fields for input document ( contentType,BinaryData,attachmentID,remoteURL) dragged only contentType and BinaryData TextFields on the page.

    also dragged the invoke button (invokeBtn) which is now in invisible mode.

    i used the following script to retrive the data form the attachment and try to send it to livecycle input variable(indoc).

    form1.#subform[0].Button1[1]::click – (JavaScript, client)

    var myDoc= event.target;
    var con = myDoc.getDataObjectContents(“file”);
    var cFile = util.stringFromStream(con , “utf-8″);
    // assigning data to textfield dragged form data connection
    binaryData.rawValue=cFile;

    invokeBtn.execEvent(“click”);

    Before excuting the above command i had supplied value for contentType as well to ‘application/msword’.

    Now i went back to the workbench and saw (in recordings) that document had been recieved from the pdf file as mentioned above.
    However, as you can noticed that i had converted the binary data to simple string before sending it to server, so the characters in the document are altogether diffrent( as it would be treating it a binary data and converting them again to some different format)
    i did so as i was unable to send the binary stream directly using binaryData(since its a textfield and we can’t assign binary data to it.)

    However, i’m getting the following error:
    java.lang.NullPointerException
    at com.adobe.pdfg.GeneratePDFImpl.createPDFCommon(GeneratePDFImpl.java:373)
    at com.adobe.pdfg.GeneratePDFImpl.createPDF2(GeneratePDFImpl.java:143)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:118)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:140)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doBMT(EjbTransactionBMTAdapterBean.java:197)
    at sun.reflect.GeneratedMethodAccessor310.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
    at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158)
    at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    at $Proxy194.doBMT(Unknown Source)
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:95)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInterceptor.java:72)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStrategyInterceptor.java:55)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateInterceptor.java:37)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:132)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
    at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:91)
    at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:215)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:57)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    at com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:724)
    at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.transientInvoke(WorkflowDSCInvoker.java:346)
    at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.invoke(WorkflowDSCInvoker.java:157)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:140)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:342)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doRequiresNew(EjbTransactionCMTAdapterBean.java:284)
    at sun.reflect.GeneratedMethodAccessor246.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
    at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:389)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    at $Proxy193.doRequiresNew(Unknown Source)
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:143)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInterceptor.java:72)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStrategyInterceptor.java:55)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateInterceptor.java:37)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:132)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
    at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
    at com.adobe.idp.dsc.provider.impl.soap.axis.AdobeAxisServiceProvider.invokeMethod(AdobeAxisServiceProvider.java:222)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at com.adobe.idp.dsc.provider.impl.soap.axis.InvocationFilter.doFilter(InvocationFilter.java:43)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)

    Kindly suggest me on it as i had to send the attachment from the PDF file as an input variable using LiveCycle WSDL.

    Regards,
    Manish

  76. Manish on December 27th, 2009

    Hi ALL,

    In LiveCycle 8.2.1 , i had created a wokkflow to convert a document to PDF and storing it to some location on the server itself( by using writedata operation).
    work fine for watch folder end point( to confirm that there is no errors in workflow)

    Now, i had one input type variable inDoc(as Document)

    i want to send the attached document in PDF file through WSDL to the LiveCycle server by creating Data Connection in Designer (http://servername:port/soap/services/servicename?wsdl).

    Now i had attach the document( .txt for example) by following command in button’s click event:

    form1.#subform[0].Button1[0]::click – (JavaScript, client)

    var myDoc= event.target;
    myDoc.importDataObject(“file”);

    in data connection i see four text fields for input document ( contentType,BinaryData,attachmentID,remoteURL) dragged only contentType and BinaryData TextFields on the page.

    also dragged the invoke button (invokeBtn) which is now in invisible mode.

    i used the following script to retrive the data form the attachment and try to send it to livecycle input variable(indoc).

    form1.#subform[0].Button1[1]::click – (JavaScript, client)

    var myDoc= event.target;
    var con = myDoc.getDataObjectContents(“file”);
    var cFile = util.stringFromStream(con , “utf-8″);
    // assigning data to textfield dragged form data connection
    binaryData.rawValue=cFile;

    invokeBtn.execEvent(“click”);

    Before excuting the above command i had supplied value for contentType as well to ‘application/msword’.

    Now i went back to the workbench and saw (in recordings) that document had been recieved from the pdf file as mentioned above.
    However, as you can noticed that i had converted the binary data to simple string before sending it to server, so the characters in the document are altogether diffrent( as it would be treating it a binary data and converting them again to some different format)
    i did so as i was unable to send the binary stream directly using binaryData(since its a textfield and we can’t assign binary data to it.)

    However, i’m getting the following error:

    2009-12-27 22:11:37,043 INFO [org.apache.axis.EXCEPTIONS] AxisFault:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}stackTrace:ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
    at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.transientInvoke(WorkflowDSCInvoker.java:367)
    at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.invoke(WorkflowDSCInvoker.java:157)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:140)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:342)

    Kindly suggest me on it as i had to send the attachment from the PDF file as an input variable using LiveCycle WSDL.

    Regards,
    Manish

  77. Manish on December 27th, 2009

    I had found another way of achieving the above where i’m only using the javascript(i.e. No Data connection wizard).

    form1.#subform[0].Button1[0]::click – (JavaScript, client)

    var myDoc= event.target;
    myDoc.importDataObject(”file”);

    ————–

    form1.#subform[0].Button1[0]::click – (JavaScript, client)
    ///
    var myDoc= event.target;
    var con = myDoc.getDataObjectContents(“file”);
    var myProxy = SOAP.connect(“http://10.10.129.176:8080/soap/services/Webservices?wsdl”);
    var myObject = {soapType: “SOAP-ENC:base64″ ,soapAttachment: true,soapValue: con};
    var result = myProxy.invoke({doc:myObject});
    console.println(“Result is ” + result);
    ———————————————–
    “doc” refer to the variable used in workbench an a input variable of type document.
    “invoke” is a method in it.
    However if try to do the same for input type varibles (xsd:int) or (xsd:string) by making any other services then it works fine.

    However, when i try to attach the document then i get the following error in acroabt debeggur:
    SOAPError: No such operation ‘invoke’
    SOAP.request:1:XFA:form1[0]:#subform[0]:Button1[0]:click

    above error comes if change the type from soapType: “SOAP-ENC:base64″ to “impl:BLOB”

    Further i removed soapAttachment: true from myObject and i got the following error:

    SOAPError: The input BLOB object should have attachmentID, remoteURL, or binaryData field specified.
    SOAP.request:1:XFA:form1[0]:#subform[0]:Button1[0]:click

    which gives me a sense that almost everything here is fine but somewhere somethings is missing.

    Kindly suggest.

    Regards,
    Manish

  78. patxitron on June 23rd, 2010

    Hi Stefan,

  79. ww on June 23rd, 2010

    Hi Stefan,
    I´ve created a pdf form using Adobe Livecycle Designer and I´ve distributed it so every user can save it with data. I´ve loaded it in the web server. To populate data in the form_, I create a xdp using an asp page and it works cool.
    Now I want to call a web service from the form_ and read the data received to populate some field in the form, but it doesn´t work using Adobe Acrobat Reader. Is it necesary LC Reader Extensions ES?

  80. Stefan Cameron on June 29th, 2010

    @ww,

    Yes, I’m afraid LC Reader Extensions is necessary to import data using a web service.

  81. CarlosN on June 30th, 2010

    Hi Stefan,

    Can we use a LC WS under HTTPS in order to make a DataConnection?

    Thanks!

    Carlos

  82. Stefan Cameron on July 9th, 2010

    @CarlosN,

    From page 1186 in the XFA 3.1 specification:

    In this release Adobe products only support the password authentication method. This method is supported at both the transport (HTTPS) and SOAP levels.

    Based on that, I think HTTPS for WSDL connections should work, at least in LiveCycle ES2, but perhaps in earlier versions as well.

  83. faith on August 24th, 2010

    Hi
    I am using LiveCycle Designer. I manage to setup a connection to a web service and and select the operation.
    How ever the input and out put fields don’t dispaly.
    I would like to know if this is due to my WSDL setup.
    How can I be sure?.
    I would like to look at the WSDL used in this example to be sure but the link does not work. Can you help

    Thanks

  84. Stefan Cameron on September 2nd, 2010

    @faith,

    Thanks for pointing that out. I have posted a second sample form (attached to this post) which uses a different web service. Hopefully that gives you a good comparison point for your form.

  85. TarekAHF on September 14th, 2010

    What if the web service requires authentication (say Simple User Name/Password) ?

    I managed to call a web service that requires authentication, but this is prompting the user to enter the credentials.

    How to call the web service and pass the User Name / Password without prompting the user ?

    How to embed the password inside the PDF, and prevent the user from getting the password ?

    Tarek.

  86. Stefan Cameron on October 1st, 2010

    @TarekAHF,

    LiveCycle Designer 8.2.1 added support for secured web service calls where access to the web service is protected by a username/password authentication layer.

  87. TarekAHF on October 4th, 2010

    Thanks Stefan.

    But, the method shown here http://www.adobe.com/devnet/livecycle/articles/wsdl_binding.html will always prompt the user to enter user name and password. How to embed the credential inside the WSDL connection definition ?

    Tarek.

  88. Stefan Cameron on October 13th, 2010

    @TarekAHF,

    Unfortunately, I don’t think you can define a WSDL Connection with embedded credentials (that wouldn’t be very secure).

    It looks like you could do it using the SOAP object in the JavaScript API for Acrobat. The SOAP.connect() method takes a SOAP.request object which has an authentication parameter where you can supply a username and password but keep in mind that these will be stored in plain text in your form (which is not secure at all). Then you will have to manually execute the SOAP call, get the response data and load it into your form.

  89. Julian on November 11th, 2010

    Hi Stefan,

    I have a question for you, maybe you have experienced this requirements before, and have a few minutes to help me…

    I am using a web service based data connection, with form fields bound to the request and response parameters. Everything works fine, except one thing. I am trying to identify the moment data comes back, as I need to trigger more code inside the form. For instance, i need to make form updates depending on the received response. Change event does not work with anything but direct user actions, and the web service response is treated like an import data action, not followed by change event… Do you know an approach that would allow me to trap or listen for the moment data comes through the web service response?

    Thank you,
    Julian

  90. Stefan Cameron on November 15th, 2010

    @Julian,

    I have exactly what you’re looking for: See my tutorial on pre-processing web service responses.

  91. tarekahf on December 2nd, 2010

    Thanks Stefan for the great replies. I just wish that you can emable email notification for the comment which you are subscribed to.

    Tarek.