Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Jul 15, 2009 04:51 PM|LINK
I have a Web Service written in c# a published using visual studio 2008.
The ws has a webmethod that recieved 3 xml files and 1 txt file as arguments.
I have to make a client in java with eclipse, so, I installed the axis plugin. This plugin generates the proxy classes usin the WSDL of the .net ws
My first problem was how to interoperate between java and c# because the Xmldocument type in c# is slightly different to the Document type in Java. I decided to change the webmethod to recieved strings instead of xml and text files. Then I wrote a code in
java to convert a xml document into a string and there's no problem with the interoperability of the simple types.
I found a problem parsing the xml files into strings, the java methods use the dtd to build the strings but the <!DOCTYPE XMI SYSTEM "UML_EA.dtd"> was not inserted in the string.
In the ws I recieved each string and converting them into xml files again. The files are the same as the original ones but without the DTD declaration, which is a problem because if I want to search a tag element by an ID, since I'm not defining a dtd the
program does not know what an Id is.
Finally a use a non elegant trick, I took each string as I recieved them and then insert the <!DOCTYPE XMI SYSTEM "UML_EA.dtd"> with the string.insert method and now it's working.
I'm learning a lot with this project but I don't have enough time to do an elegant or brilliant implementation because the deadlines are comming for me jejejej