Kbase P106655: Error 11781 when invoking Web Service written using .Net
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/26/2005 |
|
Status: Verified
FACT(s) (Environment):
OpenEdge 10.0x
Web Services
SYMPTOM(s):
Calling a Web Service that was written using .Net
Error 11781 is returned when attempting to call any method defined by the Web Service
Malformed XML fragment: only white space content allowed outside root element at line <line> and column <column> (11781)
CAUSE:
Microsoft .Net Web Services by default use a 'Wrapped Document-Literal' encoding method. This method requires that all parameters (even simple scalar data types) become complex data types that are defined using XML. What this means for you is that if you are attempting to pass, for example, a zip code to a Web Service you cannot just pass the zip code as a string. You must instead pass the zip code as an element within a specifically defined XML document (see notes below for an example).
FIX:
Modify the code which calls the Web Service so that it properly wraps each parameter in the required XML document. The format of the required XML document can be obtained by using the bprowsdldoc utility against the Web Service. Once the required XML document has been constructed, it can then be send to the Web Service as a SOAP request. SOAP responses from the Web Service will also be XML documents which need to be parsed by the OpenEdge client by using either the DOM or SAX parser in order to obtain each individual parameter.