Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How to troubleshoot a web service query

Avatar

Former Community Member
I just did a very simple test that takes only a few seconds. I created a data connection to a local web service by entering the WSDL URL. Instantly and nicely it shows up in the data view.



I dragged the simplest of the web service functions into an empty form and instantly get a nice query form with input and output fields and a button that is meant to activate the web service query.



I went into preview mode and clicked on the button, but nothing happened. What now? I was actually surprised that nothing happened, because the much more difficult setup was so exceedingly easy. (:-)



The web service supports SOAP 1.1 and SOAP 1.2. Is one of these compatible?



Hans-Georg
9 Replies

Avatar

Former Community Member
Webservice must return: 'document literal' xml!



If it is a .NET webservice.. you probably returning a .NET custom "object" - this is not compatible in the style you want to use it (you would have to fiddle to make it display results)



Ensure pure, bare, vanilla xml is being returned by the webservice.

Avatar

Former Community Member
>If it is a .NET webservice.. you probably returning a .NET custom "object" - this is not compatible in the style you want to use it (you would have to fiddle to make it display results)



Thanks, Luigi! I believe this is a .NET webservice, but I used it only for testing. The web service I will end up using is programmed in Java, probably on the basis of Apache CXF.



Do you mean fiddle with the PDF file or fiddle with the web service server? I can fiddle with the PDF file, using LiveCycle Designer, if only I can find the needed information and if the effort is within limits, considering that I only want to test.



What exactly do you mean by 'document literal' xml? I expect adherence to the SOAP standard, and the SOAP payload is pure and clean XML.



Do you actually have a web service query function running on Adobe Reader?



But the original question remains---assume I do it all and it doesn't work, how can I troubleshoot it and find out how and why exactly it doesn't work? I need a way to get information about why it doesn't work. The current situation, that I make a PDF file and click on the web service button and nothing happens, is, of course, unacceptable.

Avatar

Former Community Member
document literal, google that - but chances are, your xml is document literal - dont spend too much time on that.



Yes i have a PDF making webservice calls.

-> Quick and Short

1) put drop-down on empty dynamic pdf form

2) create dataconnection to webservice (that returns a list)

3) Enable "Show Dynamic Properties"

4) On the drop-down - OBJECT-binding tab - Click "Specify Item Values"

5) Select data connection

6) For Items: make sure it ends with [*]

EG: connectionData.dcSchemes.Body.SchemesResponse.SchemesResult.details.SchemeDetails[*]

7) select Text - Value (done)



"

assume I do it all and it doesn't work, how can I troubleshoot it and find out how and why exactly it doesn't work?

"

Thats coding experience, googling, messing around - get one that is working and then compare differences to one that is not working!

Eliminate areas that are 100% working.



Use your PDF J-Console (Ctrl-J) to see results of

console.println().... track steps of the click button's execute call - before and after!

Ensure your webservice is returning as desired

Avatar

Former Community Member
execute the webservice call yourself.. so you can track...



xfa.connectionSet.<<DATACONNECTION_NAME>>.execute(0);

Avatar

Former Community Member
Luigi, thanks again! I hope we're getting closer. There are a few points I don't understand. You wrote:



>1) put drop-down on empty dynamic pdf form



I didn't do that, because I don't know what it means. Instead I created a data connection from a WSDL, which worked very well, and dragged the entire data connection into an empty form, which I had set to preview as a dynamic form in forms properties.



>3) Enable "Show Dynamic Properties"



If you mean to make this a dynamic form in the preview setting, that's what I've done. Otherwise I don't see any "Show Dynamic Properties" option.



>4) On the drop-down - OBJECT-binding tab - Click "Specify Item Values"



No drop-down here. I don't know what you mean by that.



LiveCycle Designer inserted all web service fields nicely into the form with all binding settings apparently properly set. The form consists of input fields (just one in this case), a few output fields, and the button at the end, which was automatically set to execute the data connection function. Superficially it looks to me as if LiveCycle Designer did everything right.



What I've done next is to re-route the web service calls through a TCP monitor on localhost to see what it does. (I did that by modifying the WSDL file and regenerating the data connection.)



The result is that the button does nothing. I can click on it as much as I like---it never sends any SOAP request to the desired TCP port, in this case localhost:8080. This LiveCycle Designer preview is as dead as it can be.



When I add another button next to the generated one and put the code you proposed into its click event, I get, "xfa.connectionSet.d3WsInfoLocalhost has no properties" from the debugger. It doesn't seem to find the data connection this way. d3WsInfoLocalhost is the name I gave the data connection.



Since the generated button (control type execute) issues no warning and no error message either, the whole thing is already severely defective, and all I'm now looking for is a workaround. Normally I can't work with that kind of software. If it refuses to do anything, the least I have to expect is an error message. Close to giving up, but since I didn't understand several of your points I thought I should ask before pulling the plug.

Avatar

Former Community Member
Are you using Reader or Acrobat? If you are using Reader ...you will have to Reader Extend the form using LiveCycle Server Reader Extensions to allow Web Services to work.

Avatar

Former Community Member
I used Reader, because the end users, of course, only have the Reader. Just a second, let me try Acrobat---indeed, it works on the spot! Thanks, that shows me at least that I haven't made any mistake.



Could you briefly explain to me what exactly "Reader Extend the form using LiveCycle Server Reader Extensions" means? How do I do that?



Adobe is a gruesome company. I begin to hate them for setting traps into which every user in my situation inevitably falls and for making me feel stupid. What they obviously should have done is pop up a dialog box stating why the button does not work.

Avatar

Former Community Member
The basic Reader has a certain set of functionality. Reader Extensions allows you to enhance your Reader to gain functionality for the use of your document. To do this you must Reader Extend your form. There is a server based product family called LiveCycle that has a component called Reader Extensions which will allow you to turn on specific functionality in Reader for your document. Web Service interaction is one of those options. There is a subset of Reader Extensions exposed in an Acrobat menu but Web Service interaction is NOT one of them.



There are trial versions of LiveCycle available on the DevNet site. Note that you will need a server class machine to run livecyle. It comes with a turnket install that includes a JBOss install for an app server and MySQL for a database. Make sure that you also download the trail Reader Extensions certificate as well.

Avatar

Former Community Member
Thank you for the information.



Of course I cannot install a server machine, merely to enable a function in Adobe Reader. That is so far out of the acceptable effort-to-effect ratio range that I can't even think about it. Will have to use a different solution, probably not involving Adobe software.



Consider that it is far cheaper and quicker if I program a web service client myself than if I have to buy and install an entire server, hardware and software. I'm wondering what Adobe is up to.



But thanks again for your assistance. Without your help it might have taken me a lot longer to find out.