Hi there,
I want to invoke a process from a submit-button in a rendered PDF-File.
I build an xdp with a submit-button that has the control type submit and entered in Submit to URL the URL of a servlet I wrote. In Submit As: I set XML Data(XML).
I rendered the PDF by calling the renderPDFForm method of the WS FormsService and get an PDF that can be opened in with acroread.
By pushing the button I get a request in my servlet with the XML in the Input-Stream.
Now I want to invoke the simple process called UniDortmund I designed in the Workbensh Process Designer. For that with jaxws I consumed the wsdl located at
http://localhost:8080/soap/services/UniDortmund?WSDL .
Now I implemented the following code:
if(request.getHeader("content-type").startsWith("application/xml")){
System.out.println("Got an XML-Stream:");
final String result=convertStreamToString(request.getInputStream());
System.out.println(result);
final UniDortmundService tudoService=new UniDortmundService();
final UniDortmund uniDo=tudoService.getUniDortmund();
SetAuthentication((BindingProvider)uniDo);
// prepare the input arguments
XFARepositoryFormInstance antragProzess=new XFARepositoryFormInstance();
antragProzess.setData(result.getBytes());
antragProzess.setDescription("Coming from my little servlet.");
antragProzess.setName("Antrag");
System.out.println("Invoke Async");
String responseStr=uniDo.invokeAsync(antragProzess);
}
By invoking the process I got the following exception:
16:53:08,933 ERROR [[Antrag]] Servlet.service() for servlet Antrag threw exception
javax.xml.ws.soap.SOAPFaultException: ALC-DSC-127-000: com.adobe.idp.dsc.LongLivedInvocationException: The Long Lived Service UniDortmund can not be invoked synchronously.
at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:70)
at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:109)
at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:567)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:365)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:230)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
at $Proxy81.invokeAsync(Unknown Source)
at edu.tudo.antrag.presentation.ProxyServlet.doGet(ProxyServlet.java:46)
. . .
What am I doing wrong?
Is there a simple example for invoking a webservice made with the process designer?
Is it the wrong way to invoke the process from the submitbutton when I just want to use Acrobat?
Is there a generic servlet in Lifecycle ES that does the job?
Yours
Arne