1. Diego Vizia
  2. PowerBuilder
  3. Wednesday, 12 June 2019 21:50 PM UTC

Hi.

I'm currently developing an application that consumes a Web Service using PowerBuilder 12.5. All the methods work perfectly fine inside the PowerBuilder IDE, but after deploying, some methods do not work when run from the EXE file. Some give RuntimeError, while some others simply hang forever.

All methods work fine inside the IDE, and the Web Service uses .NET engine. I tried a full build, copying DLL's into the project folder, creating proxies again, redeploying the web service with a different assembly name, and nothing worked. The behaviour is always exactly the same: Some specific methods don't work outside the IDE.

Anyone has any idea what the problem might be?

Thanks in advance.

Accepted Answer
Diego Vizia Accepted Answer Pending Moderation
  1. Friday, 21 June 2019 13:24 PM UTC
  2. PowerBuilder
  3. # Permalink

OK, I didn't find a way to make the Web service method work after deployment with EXE/DLL, but it works if I deploy as PCode and a PBD file.

So I'm just gonna stick with that for my programs from now on, specially considering it also compiles around 20x faster and it's lighter.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 13 June 2019 13:19 PM UTC
  2. PowerBuilder
  3. # 1

Hi Diego;

  Did you deploy the PB run-time via the PB Packager utility?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 18 June 2019 17:19 PM UTC
??????????????????
  1. Helpful
There are no comments made yet.
Diego Vizia Accepted Answer Pending Moderation
  1. Thursday, 13 June 2019 13:55 PM UTC
  2. PowerBuilder
  3. # 2

Thanks for your reply.

Yes, of course I deployed the PB run-time. Every part of the program runs just fine after deployment, and all the methods of the Web Service too, except ONE method which returns run-time error or just hangs for eternity, depending on whether I instantiate the return object before calling the web service or not. I tried doing a full  rebuild, regenerating every object, creating the web service proxy from scratch, etc.. I can't think of anything else to try.

I'll try to post code here for each scenario in hopes we can find the cause.

Comment
There are no comments made yet.
Diego Vizia Accepted Answer Pending Moderation
  1. Thursday, 13 June 2019 14:02 PM UTC
  2. PowerBuilder
  3. # 3

The following code gives RunTime error.

Try
	lr_consulta = Create remito_consultarRemitosReturnType
	lr_consulta = lr_proxy.consultarRemitosEmisor(lr_auth, lr_fechas, li_pto_emision, 995, False, ls_estado, 0, False)
	
	If Not IsNull(lr_consulta.arrayErrores) Then
		lr_errores = lr_consulta.arrayErrores
		For li_iter = 1 To UpperBound(lr_errores)
			MessageBox("Error al consultar remitos", "Error " + String(lr_errores[li_iter].codigo) + ": " + lr_errores[li_iter].descripcion, StopSign!)
		Next
	End If
Catch(SoapException e1)
	MessageBox("Error SOAP", "Error SOAP -> " + e1.Text, StopSign!)
	st_working.Visible = False
	Return
Catch(PBXRuntimeError e2)
	MessageBox("Error PBX Runtime", e2.Text, StopSign!)
	st_working.Visible = False
	Return
Catch(RuntimeError e3)
	MessageBox("Error Runtime", e3.Text, StopSign!)
	st_working.Visible = False
	Return
End Try

 

While the following code just hangs forever.

 

Try
	lr_consulta = lr_proxy.consultarRemitosEmisor(lr_auth, lr_fechas, li_pto_emision, 995, False, ls_estado, 0, False)
	
	If Not IsNull(lr_consulta.arrayErrores) Then
		lr_errores = lr_consulta.arrayErrores
		For li_iter = 1 To UpperBound(lr_errores)
			MessageBox("Error al consultar remitos", "Error " + String(lr_errores[li_iter].codigo) + ": " + lr_errores[li_iter].descripcion, StopSign!)
		Next
	End If
Catch(SoapException e1)
	MessageBox("Error SOAP", "Error SOAP -> " + e1.Text, StopSign!)
	st_working.Visible = False
	Return
Catch(PBXRuntimeError e2)
	MessageBox("Error PBX Runtime", e2.Text, StopSign!)
	st_working.Visible = False
	Return
Catch(RuntimeError e3)
	MessageBox("Error Runtime", e3.Text, StopSign!)
	st_working.Visible = False
	Return
End Try

 

The difference is declaring the return object before calling the web service function or not.

 

The weirdest thing is that all the other functions of the web service work perfectly. The only problem is that specific method from the Web Service.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 13 June 2019 18:16 PM UTC
  2. PowerBuilder
  3. # 4

Great! Also another thought ... make sure that your deployment PC does not have older PB run-time DLL's that might be picked up by your App's EXE.

Comment
There are no comments made yet.
Diego Vizia Accepted Answer Pending Moderation
  1. Thursday, 13 June 2019 20:47 PM UTC
  2. PowerBuilder
  3. # 5

I checked that as well some time ago. There were some other PB versions in the first machine I developed the app in, but now I have a fresh Windows installation with only PB 12.5 installed. I even regenerated all objects and did a full rebuild of the project before deployment, and I'm still having the same issue with that method. So it's not DLL related or a conflict with previous versions.

At first, I thought it might be a problem on the web service side, not mine, but whatever works in the IDE should work in the deployed app as well, so the problem lies definitely on my side. There are a couple strange things I'd like to point out.

  • Every method I tried from that web service works fine, except the method consultarRemitosEmisor, which just hangs and crashes the app.
  • That very same method (consultarRemitosEmisor) works perfectly fine inside the IDE. All the other methods work fine too, obviously.

The web service in question is an invoice web server, which is part of an app I'm developing for a client, and they need to start implementing emitting invoices from the web service in around 10-15 days from now. Moreover, that particular method that doesn't work is the one that returns a list of all invoices, so it's crucial for the whole app. Without that method working, the whole process breaks and I won't be able to sell the app, so any help would be immensely appreciated.

Thanks!

Comment
There are no comments made yet.
Diego Vizia Accepted Answer Pending Moderation
  1. Tuesday, 18 June 2019 15:13 PM UTC
  2. PowerBuilder
  3. # 6

I'm still running the same issue, and nothing I tried has changed the web service method's behaviour in any way.

Any further help from anyone?

This is important, thank you.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.