I will start with a brief explanation of what I'm trying to do first and then explain my difficulties.
I have a main form that is based on a main xsd schema and displayed to the user as a form guide. I have created a wsdl data connection on this form in which I will use to invoke another LiveCycle process called "Print".
1. IPAddress as string (I am aware there are problems in accessing the clients IP and am looking for a way to access it still)
2. OutputForm as string (There are three types of forms the user can print based on the data entered on the form guide so based on a dropdown list I can determine this value ... no problems there!!)
3. XmlData as xml (The 3 forms that can be printed are all based on the same xsd, so I was wondering if I can take the xml based on what the user has entered on screen, I'm guessing its something like /process_data/..., and pass this xml as an input from the main form's invoke of the Print service??
When I create the wsdl data connection using the following url:
It creates correctly and gives me an invokeRequest, invokeResponse and an invoke button. What I'd like to do is add a button to the form guide (possibly the invoke button if thats correct) that invokes the Print process with the correct parameters.
The part I'm struggling with is how to pass the parameters?
In the process any variables that are marked as input will be exposed in the web service. When you open the WSDL in the Designer you can bind this parameters to fields on the form. Any variables mark as output will be returned to the caller. They can also be bound to fields on the form.
You will have to create a hidden field and use the command fieldaname.rawValue = xfa.datasets.saveXML() to put the data into the field. Then you can bind that field as an input parm to your WS.
I suggest that you hide the invokeBtn for your service and use a regular button as the indication that th euser is done. That way you can put the data into that field, then invoke your service by using invokeBtn.execEvent("click") when you are ready.
Paul,<br /><br />Thanks, that will solve my problem for the XMLData parameter. The only outstanding issue then is the IP which I'm struggling with.<br /><br />In the Print service a PCL file gets created and saved to a location on the server. The printing system we have here requires a PCL file named as <client ip address>.pcl so thats why this is a requirement.<br /><br />Thanks again for the help!
Where is the information for the IP printer address?
Hi Paul,<br /><br />I am currently working with James (for the moment.) If my understanding is correct then the following should answer your question. <br /><br />We are not concerned with the IP of the printer. We have a Java application running on the server to watch a folder for a PCL with the requesting client IP address as the name: <client ip address>.pcl. This routes the PCL to the client where there is another small Java application listening and routes the PCL to the default Windows printer.<br /><br />Therefore the only IP address we are concerned with is the requesting client.<br /><br />Kind Regards,<br />Garreth
Unfortunately there is no way to get that programmatically from the PDF unless you embed it into the data that is merged. If the info is stored in a DB or LDAP server some where we could make a Web Service call to retrieve it (I know that is not ideal but that is all there is).