Exception when error getting host connection

Hi,
Sorry, my English is not very good :frowning:
I use a ApplinX generated WebService to go on a BS2000-UTM-Application. If this Application is not reachable (not started) with the Programm soapUI returns a

<Exception>java.lang.Exception: Cannot run path procedure [/Procedures/PartnerAnmelden], error getting host connection, error code 5053
...
</Exception>

This is perfect!
But if I try this Test in Java like this:

            try {
                STOLISServicesStolisServices ws = new STOLISServicesStolisServices(url, new QName("http://tempuri.org/", "STOLIS.Services.StolisServices"));

                StolisServicesPortType stolisServicesPortType = ws.getStolisServicesPort();
                MeldeDaten meldeDaten = stolisServicesPortType.partnerAnmelden(meldungPartnerAnmeldenData);
            } catch (Exception e) {
                throw new BatchTechnicalException("WebServiceCall partnerAnmelden failed! Message: " + e.getMessage());
            }

This Exception will returned:

ERROR AbstractStep - Encountered an error executing the step
org.springframework.batch.retry.ExhaustedRetryException: Retry exhausted after last attempt in recovery path, but exception is not skippable.; nested exception is ch.admin.estv.insieme.schnittstellen.exception.BatchTechnicalException: WebServiceCall partnerAnmelden failed! Message: faultCode argument for createFault was passed NULL
	at org.springframework.batch.core.step.item.FaultTolerantChunkProcessor$5.recover(FaultTolerantChunkProcessor.java:358)
	at org.springframework.batch.retry.support.RetryTemplate.handleRetryExhausted(RetryTemplate.java:405)
	at org.springframework.batch.retry.support.RetryTemplate.doExecute(RetryTemplate.java:274)
	at org.springframework.batch.retry.support.RetryTemplate.execute(RetryTemplate.java:180)
	at org.springframework.batch.core.step.item.BatchRetryTemplate.execute(BatchRetryTemplate.java:213)
	at org.springframework.batch.core.step.item.FaultTolerantChunkProcessor.write(FaultTolerantChunkProcessor.java:371)
	at org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:178)
	at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:74)
	at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:268)
	at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76)
	at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367)
	at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
	at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143)
	at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:242)
	at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:198)
	at org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:348)
	at org.springframework.batch.core.job.flow.FlowJob.access$0(FlowJob.java:1)
	at org.springframework.batch.core.job.flow.FlowJob$JobFlowExecutor.executeStep(FlowJob.java:135)
	at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60)
	at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144)
	at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124)
	at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:103)
	at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:250)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:110)
	at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:105)
	at ch.admin.estv.insieme.schnittstellen.batch.T2StolisImportBatchJobTest.testT2StolisImport(T2StolisImportBatchJobTest.java:49)
	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:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: ch.admin.estv.insieme.schnittstellen.exception.BatchTechnicalException: WebServiceCall partnerAnmelden failed! Message: faultCode argument for createFault was passed NULL
	at ch.admin.estv.insieme.schnittstellen.batch.stolis.StolisAdresseErfassenItemWriter.write(StolisAdresseErfassenItemWriter.java:69)
	at org.springframework.batch.core.step.item.SimpleChunkProcessor.writeItems(SimpleChunkProcessor.java:156)
	at org.springframework.batch.core.step.item.SimpleChunkProcessor.doWrite(SimpleChunkProcessor.java:137)
	at org.springframework.batch.core.step.item.FaultTolerantChunkProcessor$3.doWithRetry(FaultTolerantChunkProcessor.java:284)
	at org.springframework.batch.retry.support.RetryTemplate.doExecute(RetryTemplate.java:231)
	... 52 more

How I can get the same Exception in Java like soapUI it gets (error getting host connection)?
I hope you understand my Problem. Else, my mother tongue is german :wink:

Thx for helping.
Raymond.

PS: I am Junior-Java-Programmer :oops:

Raymond,

afraid the problem is not Applinx but the framework you are using. One wraps the problem in one message, the other in another.

Hi Tanya,
I spoke with my Senior Engeneer. He means, that the SOAP-Response is not complete and the faultstring and the Reason are missing!
He answered:

Look also: SOAP Version 1.2 Part 1: Messaging Framework (Second Edition)

Is this a Bug? Or why I dont become the faultcode and the faultreason elements??? It’s very importent for us.

This is the whole response:

<SOAP>
   <SOAP>
      <SOAP>
         <detail>
            <Exception>java.lang.Exception: Cannot run path procedure [/Procedures/PartnerAnmelden], error getting host connection, error code 5053
	at com.sabratec.applinx.server.core.flow.GXRuntimeContextFactory.createNewUser(Unknown Source)
	at com.sabratec.applinx.server.core.flow.GXRuntimeContextFactory.getServiceSessionUser(Unknown Source)
	at com.sabratec.applinx.server.core.flow.GXRuntimeContextFactory.startPathContext(Unknown Source)
	at com.sabratec.applinx.server.core.flow.GXRuntimeContextFactory.createRuntimeContext(Unknown Source)
	at com.sabratec.applinx.server.core.flow.GXFlowWrapperProcedure.executeFlow(Unknown Source)
	at com.sabratec.applinx.server.core.flow.GXFlowWrapperProcedure.execute(Unknown Source)
	at com.sabratec.applinx.server.runtime.webservices.GXWSServerLogic.execute(Unknown Source)
	at com.sabratec.applinx.server.runtime.webservices.GXApplinXLocalAdapter.execute(Unknown Source)
	at com.softwareag.applinx.wsstack.GXApplinXLocalMessageReceiver.invokeBusinessLogic(Unknown Source)
	at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
	at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
	at com.softwareag.wsstack.deployment.server.SAGAdminServlet.doPost(SAGAdminServlet.java:37)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
	at java.lang.Thread.run(Thread.java:619)</Exception>
         </detail>
         <SOAP>
      </SOAP>
   </SOAP>
</SOAP>

Raymond,

am a bit confused:

in your first message you present a problem of an undeployed web service (the not yet existing url) - when trying to run that web service you received 2 different messages from 2 different frameworks. That happened BEFORE the ApplinX is involved, the message is from the framework, we have no control over it.

in your second message the error is a not existing path. What could cause that problem is, for example, creating a procedure group with a certain path, using it in the WS, after which changing the procedure group (say, deleting that path) and still attempting to use it.

Did I understand the problems correctly or is it something else?

No,

the main problem is: We are receving not Correct SOAP Fault. We just receive Fault with details. This is the reason why SpringFramework throws exception without Fault Reason and Failt Code.

If ApplinX WS would response with SOAP Fault with Code and Reason Elements the problem will be solved. In Applinx Fault message we receive just a detail element, not more.
http://www.w3.org/TR/soap12-part1/#soapfault

Thank you in advance!

Raymond,

which ApplinX version is it exactly?

Do you meen this:
applinx-wsstack.jar (Software AG.) ApplinX WS-Stack client 8.1.1.0001.0158 November 25 2009 ???

Raymond,

we seem to be talking about different things.

Please run that by me again:

in your first post you gave an example of using 2 different frameworks with 2 different problems and asked why the results are different.

in your 2nd post you gave a wrong SOAP resonse that indicates a completely different problem.

Which of those 2 posts are the problem?

Hi Tanya,
The problem is simple, the SOAP-Response we get from the web service is not complete, the faultstring and the Reason elements are missing.

This is what we get when an error occurs:

java.lang.Exception: Cannot run path procedure [/Procedures/PartnerAnmelden], error getting host connection, error code 5053

According to SOAP Version 1.2 Part 1: Messaging Framework (Second Edition) (the Code element and the Reason element are mandatory) the response we should get looks like follows:

[color="red"] [/color]example content[color="red"] [/color]example content[color="red"] [/color]example content[color="red"] [/color] java.lang.Exception: Cannot run path procedure [/Procedures/PartnerAnmelden], error getting host connection, error code 5053

In the response we get from the web service the mandatory tags (marked in red) are always missing, this is the only problem we have. I hope you understand my problem now.

Regards