Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report Service string/integer problem #50

Open
JoeKuhns opened this issue Jan 30, 2020 · 5 comments
Open

Report Service string/integer problem #50

JoeKuhns opened this issue Jan 30, 2020 · 5 comments

Comments

@JoeKuhns
Copy link

JoeKuhns commented Jan 30, 2020

Hi All,
On about 60% of our reports I get the following error when using the new report service.

`

Type: SoapFault

Message: java.lang.String cannot be cast to java.lang.Integer

Filename: /Library/Server/Web/Data/Sites/Default/stockit2/application/vendor/robgridley/pace-api/src/Soap/SoapClient.php

Line Number: 48

Backtrace:

	<p style="margin-left:10px">
		File: /Library/Server/Web/Data/Sites/Default/stockit2/application/vendor/robgridley/pace-api/src/Soap/SoapClient.php<br />
		Line: 48<br />
		Function: __call			</p>
	

		<p style="margin-left:10px">
		File: /Library/Server/Web/Data/Sites/Default/stockit2/application/vendor/robgridley/pace-api/src/Services/ReportService.php<br />
		Line: 17<br />
		Function: __call			</p>
	

	
		<p style="margin-left:10px">
		File: /Library/Server/Web/Data/Sites/Default/stockit2/application/vendor/robgridley/pace-api/src/Report/Builder.php<br />
		Line: 135<br />
		Function: executeReport			</p>`

I am calling the reports like so....

$fred = $this->pace->report(10443)->baseObjectKey((int)$shipid)->get();

I can run many reports, default or custom, but not all. I even took the one report I really need and in crystal one by one deleted each field and element, and kept trying it until it was empty and I still got the error. Any thought or ideas? Maybe a way to get a more descriptive error message? I get that something in the line is getting a string when it wants an integer, but I have no idea where.

Thanks as usual.

@robgridley
Copy link
Owner

It looks like any report which has an integer base object key is affected. The API client isn't enforcing the type, but the WSDL for the report service specifies the type as string. This looks like a Pace bug.

You can work around it by duplicating the report, removing the base object, then passing the key via a parameter instead.

@JoeKuhns
Copy link
Author

Thanks Rob, that makes sense now. I should be able to get this to work. Should this be noted in the readme so others don't pull their hair out?

@JoeKuhns
Copy link
Author

So, I hate to say this, but I have reports with the same baseObject key that work. So it must be something else. I have 2 reports that are similar, so I am going to take the working one and slowly rebuild it to match the non working one and see when it fails. I'll let you know.

@JoeKuhns
Copy link
Author

Okay, possibly another clue. If I take a report that works and in Pace duplicate it, and change nothing, just dup it. The duped one fails.

@JoeKuhns
Copy link
Author

Hi Rob et al...
Anyone have other thoughts on this. I have tried everything I can think of, and not matter what I do, these don't work... I still get the Java integer error. Thanks.
Screen Shot 2020-07-10 at 2 29 18 PM
Screen Shot 2020-07-10 at 2 34 06 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants