on ‎2016 Aug 26 12:33 PM
Hello I'm using PB 12.1 6639 / Win 7 64
Today I have a Problem consuming a webservice using the .NET engine.
The corresponding WSDL and XSD definitions can be found here:
https://finanzonline.bmf.gv.at/fonws/ws/regKasseService.wsdl
https://finanzonline.bmf.gv.at/fonws/ws/regKasseWs.xsd
https://finanzonline.bmf.gv.at/fonws/ws/regKasse.xsd
I try to call the function rkdb and get an exception with the short error message 'Validation error'.
To get closer Information I used Fiddler to look at the produced Soap envelope. Please see the attached file for the SOAP-Message.
From this I can see that the SOAP-message does not contain the full parameter information that I pass to it.
Have a look at the code I use to call the webservice:
// *** Start of code ***
rkdbrequest l_request
rkdbresponse l_response
registrierung_kasse l_kasse
try l_request = create rkdbrequest
l_request.tid = "ws_account"
l_request.benid = "ws_user1
l_request.id = "xau390xkie234AAb"
l_request.erzwinge_asynchron = false
l_request.erzwinge_asynchronspecified = true
l_request.art_uebermittlung = 0
l_kasse = create registrierung_kasse
l_kasse.satznr = as_satznr
l_kasse.kundeninfo = "John Doe"
l_kasse.kassenidentifikationsnummer = "1"
l_kasse.anmerkung = "Cashbox 1"
l_kasse.benutzerschluessel = "xe45...66==" // AES-KEY (Base64-encoded)
l_request.ws_rkdb = create rkdb
l_request.ws_rkdb.ts_erstellung = datetime(today(), now())
l_request.ws_rkdb.items[1] = l_kasse
l_response = l_rkdbservice.rkdb(l_request) // WS-Call to rkdb()
catch (soapexception e1)
Messagebox("e1", "Fehler während der Ausführung der Webservice-Funktion '" + ls_function + "' (Soapexception: '" + e1.text + "')!")
exit
end try
// *** End of code ***
As you can see, the whole information is passed in one object (l_request), that holds an array of any's (named 'items') in the member 'l_request.ws_rkdb'. I assign the object 'l_kasse' to the first item of the items-array. Now the whole information of 'l_kasse' is missing in the soap message.
In debugmode I can see all objects created well and filled with the correct values. I have also attached an Image of the imported webservice types (nvo's).
I really hope someone can help me to find the mistake! Thank you in advance
Regards Martin
Request clarification before answering.
Hi Martin;
Can you tell us ...
1) I assume that your using PB Classic vs PB.Net?
2) What version of MS-Windows are you using?
3) Have you tried your WS call using PB 12.6 (ie download a trial copy)?
4) Is this problem new? That is, did it work before & now just stop working?
5) I assume that your are using the .NET client in your PB Classic application (pbwsclient120.pbd)?
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since you say your using the .Net implementation (which is great) and your TRY..CATCH is catching the "Validation Error" (which seems reasonable) condition ... my guess at this point is that there is a missing or invalid setting inside of L_Request or L_Kasse structures that the rkdb ( ) method is objecting to.
Are you using Fiddlier or the newer version Fiddiler2?
I'm even using Fiddler 4 (latest).
Chris, thank you for that Input, but I don't think, that the values itself in l_kasse-object are the Problem, but that These values are not delivered to the webservice-function, because of they are missing in the SOAP-message (look at the attachment of the message).
In the XML - file you can see, that the members 'fastnr', 'paket_nr' and ts_'erstellung' are included under the rkdb-Tag, but the items-object is missing.
And of course, the Webservice Returns the Validation error, because it doesn't get the enough Input Parameters.
So I would say, the Problem is around PB / .Net-Engine generating the Soap-message. But i have no idea what could be wrong.
Regards Martin
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.