[Biogeosdi] OMWS getAlgorithms

Javier de la Torre jatorre at gmail.com
Mon Jul 9 13:19:30 CEST 2007


Hey all,

Finally I had to hack two things to handle incorrect messages from  
OMWS. I could not find where the metadata about the algorithms is  
stored so I hack in the biogeosdi code... that is what I made:

         //HACK BECUASE OMWS IS RETURNING INVALID XML
         $rawXml = str_replace("&oldid","&oldid",$rawXml);
         $rawXml = str_replace("& Shawe","& Shawe",$rawXml);
         $rawXml = utf8_encode($rawXml);
         //HACK FINISHED

The first two are to handle the not scaped parethesis. The third one  
is to encode the result as UTF8 because if not is not valid XML  
without a encoding definition, which the response does not include.  
If the encoding is not defined I think the default is UTF8 and this  
seems to be latin1, but in any case I would really recommend being  
explicit about the encoding bein used.

Cheers.



More information about the tdwg-content mailing list