Resolved Validation error in WebService

Hi everybody !

OE12.5, Win10

I try to login to a WebService and get a validation-error, which I don't understand: "Invalid content was found starting with element tid....".

1660404583763.png

My value for "tid" is "1000103u3032", which should be ok reguarding https://finanzonline.bmf.gv.at/fonws/ws/session.xsd
1660404800797.png

I attached a small demo-program and a PEM-file (the extension ".TXT" has to be removed), because this WebService requires at least a root-certificate.

I hope somebody can show me what I'm doing wrong.

TIA, Wolf
 

Attachments

  • ConnectToWebService.p
    3.3 KB · Views: 3
  • www-bmf-gv-at_1.pem.txt
    2.1 KB · Views: 2

Cecil

19+ years progress programming and still learning.
Try this:

Code:
assign
    lc_request =       '<ns0:loginRequest xmlns:ns0="https://finanzonline.bmf.gv.at/fon/ws/session">'
               +           '<ns0:tid>1000103u3032</ns0:tid>'
               +           '<ns0:benid>webserv99</ns0:benid>'
               +           '<ns0:pin>webserv99</ns0:pin>'
               +           '<ns0:herstellerid>ATU15155506</ns0:herstellerid>'
               +       '</ns0:loginRequest>'
.

This is what I did:
  • Removed the XML declaration header.
  • Included the namespaces 'ns0:' to each element.
  • I removed the 'SPACE' character from the herstellerid element value so that it conforms to the XSD regex.
Response Output
1660432661428.png

I would strongly recomend that you use the ABL SAX-Writer (or X-DOCUMENT) to create the XML payload.

I have seen it too many time where hand crafted XML string failed because of malformed XML or incorrect encodeing of text strings.

Let the SAX-WRITER handle all the hard work for you.
 
Last edited:

Cecil

19+ years progress programming and still learning.
Also. from the proenv session try this:
Code:
bprowsdldoc https://finanzonline.bmf.gv.at/fonws/ws/sessionService.wsdl
 
Top