Should be ?
I am needing to tie type of processing into an ejb, I
can flip a property on the config and have it use a
utility to read in an xml file and deserialize to the
Axis generated classes, unknown to the presentation
side of things...
Yet, How ?
Thus fare I have the following, yet the response
objects are empty when I call a getter:
DeserializerFactory df =
BaseDeserializerFactory.createFactory(Class.forName("org.apache.axis.encoding.ser.BeanDeserializerFactory"),
_OTA_AirLowFareSearchRS.class,
_OTA_AirLowFareSearchRS.getTypeDesc().getXmlType());
org.apache.axis.encoding.Deserializer des =
(org.apache.axis.encoding.Deserializer)
df.getDeserializerAs(Constants.AXIS_SAX);
SAXParserFactory parserFactory =
SAXParserFactory.newInstance();
parserFactory.setNamespaceAware(true);
SAXParser parser =
parserFactory.newSAXParser(); parser.setProperty("
http://xml.org/sax/properties/lexical-handler",handler);
XMLReader xmlReader = parser.getXMLReader();
xmlReader.setContentHandler((ContentHandler)
des);
FileReader reader = new FileReader(new
File("//var//tmp/goodResponse/goodResponse.xml"));
InputSource is = new InputSource(reader);
xmlReader.parse(is);
if (des.getValue() != null){
System.out.println("Got Value!@");
return des.getValue();
}else{
System.out.println("This Value! [EMAIL PROTECTED]");
return null;
}
--- "Pridemore, Russell (MAN-Corporate)"
<[EMAIL PROTECTED]> wrote:
> Should be fairly straightforward to modify the
> tcpmon code
> included with axis to provide the caching behavior
> for when
> the host is unreachable...
>
> Russ
>
> -----Original Message-----
> From: aa bb [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 24, 2004 4:13 PM
> To: [EMAIL PROTECTED]
> Subject: How to Serialize/Deserialize to/from
> file(For testing)
>
>
> I have seen this posting here, yet with on
> definitive
> answers.
> So, I figured we could put something together...
>
> Here is the situation:
> We are a consumer of a WS and the providers test
> systems are like a yoyo always up and down. In order
> to keep our development team moveing Iam needing to
> perform this type of task...
> I can obtain a good response, capture it to file by
> serializing it and then have the developers use the
> file and deserialize it and continue developing
> while
> the yoyo is down..
>
> Can any one help ?
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Friends. Fun. Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/