File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes WebServices and legacy systems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "WebServices and legacy systems" Watch "WebServices and legacy systems" New topic
Author

WebServices and legacy systems

gianni ipez
Ranch Hand

Joined: Jan 02, 2007
Posts: 65
Hello,
in my factory we use a legacy system that works as middleware.
It can get htpp requests and through a workflow system interact with other systems, database, servers, etc.
Unfortunately it does not support web services technology.
The system accepts in input xml sent via http-post from caller systems, and convalidate them through a dtd.
We fake webservice on a handmade way: we homebuild a wsdl
and after some tries we refine the dtd construction seeing the xml that arrives from the caller.
The problem is when the number of caller is major than one, because the xml that arrive to the system are slightly different and can violate the dtd.
For instance the header can change, the namespace can be <SOAP-ENV:ENVELOPE> or <soapenv:envelope>
This is enough to break the dtd and cause the system to raise an error
I don't know if I have explained well the problem.
How can we solve this problem? Is it advisable to build a some kind of bridge between "the world" and our system? how?
Any suggestion is welcome.
Thanks in advance
Gianni
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
There is a section in the book "Designing Web Services with the J2EE Platform" that may be of interest to you, if you have not already seen it:
http://java.sun.com/blueprints/guidelines/designing_webservices/html/integration6.html#1059700

If the above is not applicable, then:
How are you processing the XML from the incoming requests?
If you are receiving valid XML and use some XML processing framework to process the XML, then I do not see why you should have problems?
Best wishes!
gianni ipez
Ranch Hand

Joined: Jan 02, 2007
Posts: 65
Hello,
thank you for the answer and for the link.
the xml is validated through a dtd validator (operation done by the legacy system automatically).
The fact is that we distribute a wsdl to several companies, and we get several xml depending on the system that elaborate the Wsdl.
Some of them are not recognized as valid by the dtd validator.
Hope I have clarified a bit the issue...
Gianni
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Have you considered using an adapter service in front of the legacy system?
The adapter service would be responsible for accepting requests in all different formats and, if needed, transform them to a format accepted by the legacy system.
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WebServices and legacy systems