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.

Got a ALC-DSC-127-000

Avatar

Former Community Member
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
2 Replies

Avatar

Level 8
According to the error message, the uniDo.invokeAsync method is actually trying to make a synchronous call to the LiveCycle process "UniDortmund".



You can change the process to be a short-lived one (using the process properties), or modify the invokeAsync method to make an asynchronous call (which will return a job id)

Avatar

Former Community Member
Hi Michael,

thanks for your answer.

>The problem (as stated in the error) looks like the proxy classes that call the UniDortmund service (uniDo.invokeAsync) is actually making the call synchronously. 

>Since the service is long lived that wont work.



This is a detail of the implementation of the generated method uniDo.invokeAsync. It calls the server synchron because it needs the return-value (Process-ID) from LC.



Is there a small example or HowTo for calling this WebService?



Yours

Arne