Forums Register Login

?? Sending undefined objects from Server??

+Pie Number of slices to send: Send
I have a problem, and I'm not sure that a solution exists for it. So please, if you have an idea post it!!
The idea here is that the client receives an XML file from which it parses out information and puts into a Javabean. It sends this object using SOAP to the server. The server pulls out the information, compares it to data from another XML file, then sends a object (bean) back to the client (made up of information from their XML file) using SOAP. Okay...that's the easy part!
The difficulty, if the server (a customer) adds or removes fields from their database, then the fields in the object will change. We want to have a very flexible service that won't have to be updated every time that a customer changes the information that they are sending back.
I really don't see it as something that is going to be able to be done because the beans have pre-defined get/set methods that exist for the variables in the bean. These methods are used for extracting the information from the bean when the bean is received.
Any ideas? Don't you have to have an agreement between the client and server on the XML content? There has to be a cooperation - doesn't there?
Thanks for any ideas you might have on this!
+Pie Number of slices to send: Send
There has to be cooperation, BUT you could define the return as an XML Element and be completely general.
Bill
+Pie Number of slices to send: Send
Thanks for the lead Bill...now for a followup question (I've only been doing SOAP for a few weeks now) I can't seem to get the client and service to work right with the XML Element as the return object.
In the client I have this code:
Response response = call.invoke( url, "" ); // invoke the service
.....
Parameter result = response.getReturnValue(); // response was OK
Element e = (Element)result.getValue();
....
On the server side:
DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder();
....
URL url = new URL ("http://127.0.0.1:7001/soap/DataFolder/leadfile2.xml");
InputStream is = url.openStream ();
Document d = xdb.parse(is);
e = d.getDocumentElement ();
return e;//It should be returning this element
It compiles fine, but when it runs I'm getting the following error:
Fault= SOAP-ENV:Server, java.lang.ClassCastException: weblogic.apache.xerces.dom.DeferredElementNSImpl
Any ideas on what I am doing wrong here? Is it how I am trying to retrieve the element on the client side? I can't find much information on this type of manipulation out there.
Thanks,
Can you smell this for me? I think this tiny ad smells like blueberry pie!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1060 times.
Similar Threads
Why bytecodes???
Which technology to use??
getting null response while calling glue webservice
SOAP response is losing Body content data
long post IBM.158
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:07:15.