We are experiencing an exceedingly hard to track down issue where we are seeing ClassCastExceptions sometimes when trying to iterate over a list of unmarshalled objects. The important bit is sometimes, after a reboot the particular code works fine. This seems to point in the direction of concurrency/timing/race condition. I can confirm t...
I am developing a contract-first web service based on Spring-WS. I'm relying on Castor marshaling, and I have run into the following issue.
Requests are being accepted when the "xmlns" namespace is defined in the Envelope tag, such as:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="h...
I've used wsdl2ruby to generate a client for a web service. When a service method raises one of the exceptions defined in the WSDL I'd like to access the exception object's attributes. From what I can tell the exception object has been marshalled into a SOAP::Mapping::Object that's referenced by the detail attribute of the SOAP::FaultErr...
If I get the following json from a RESTful client, how do I elegantly unmarshal the java.util.Date? (Is it possible without providing (aka. hard-coding) the format, that's what I mean by elegantly...)
{
"class": "url",
"link": "http://www.empa.ch",
"rating": 5,
"lastcrawl" : "2009-06-04 16:53:26.706 CEST",
"checksum" : "837261...
I am using JAXB to unmarshall an XML file into a Java object -- standard stuff. Once JAXB has completed this, I'd like a method to be called on the newly created object.
Is there a mechanism to do this? I'd prefer the object, not an external entity, do this to keep construction in one place.
Thanks.
...
Hi,
suppose I have this class:
public class A {
private HashMap<String, B> map;
@XmlElement
private void setB(ArrayList<B> col) {
...
}
private ArrayList<B> getB() {
...
}
}
When trying to unmarshall an xml document to this class using JaxB I notice that instead of calling the setB() method...
I've created an XML schema by annotating an existing Java domain model class, now when I try to use JAXB to unmarshall the representation received within my restlet webservice I'm getting a host of errors no matter what I seem to try. I'm new to both restlets and JAXB so pointing me in the direction of a decent example of using both woul...
I am using JAXB to unmarshal an XML file into a Java object model. Works great, except for one thing. I've been using parseMethod and printMethod to convert simple strings to a type of my choice, e.g.:
<someElement tag='Bismarck' name='Dagwood' />
<someElement tag='Pierre' name='Herb' />
where the "tag" attribute, instead of being unm...
Hi,
We are facing an issue in our production env. We have searched the net high and low and we were not able to come up with any answers.
This error(stacktrace below) occurs when an ejb lookup is made from managed server 1 to manager server 2. Virtual ip is used for the lookup. It occurs intermittently and at random intervals. We are no...
Hi.
We have an XML that needs to be converted to an object and vice versa. Something like Xstream does. Until now we were using Xstream to marshall and unmarshall the object/xml.
However the problem is that an object that corresponds to XML in xstream, needs to have all the tags as attributes; else if XML contains any extra tags which ...
Greetings! I have a server returning XML content to my client that looks like this:
<string xmlns="...">foobar</string>
I'm new to JAXB and have gotten a lot of stuff working, except this. I thought it would be pretty easy to marshal and unmarshal this to and from a String. It took a while, but I finally figured out how to marshal thi...
I'm trying to implement Sun Tutorials RMI application that calculates Pi. I'm having some serious problems and I cant find the solution eventhough I've been searching the entire web and several javaskilled people.
I'm hoping you can put an end to my frustrations.
The crazy thing is that I can run the application from the cmd on my deskt...
Hi,
I have an RMI client/server set-up on two machines that works fine in a simple situation when the server doesn't require a client-side defned class. However, when I need to use a class defined on the client side I am unable to have the server unmarshall those classes. I suspect this is an issue with my java.rmi.server.codebase prop...
Hi Friends,
I am new to RMI technology.
When I am running the rmi client program, I am getting the exception : java.rmi.UnmarshalException: unrecognized method hash: method not supported by remote object.
I am using jdk1.5
The argument of the remote method is the Serialized object.
These are the server code...
This is the Remote Inte...
Hello Folks,
json support is one of the new features of delphi 2009 and delphi 2010. I want to know if it's there any simple function to marshalling/unmarshalling directly between string and object like in superobject library.
Example:
MyKnownObject := FromJSON('{name:"francis", surname:"lee"}');
...
Hello,
Let's suppose I store an XML string into a variable
String resp = new String("<?xml version=\"1.0\" encodin...");
and the schema definition related to this XML in another one:
String xsd = new String("<xs:schema xmlns="http://schema-...");
do you think there is a way to validate and unmarshall 'resp'
into objects (using JAXB...
Is there a way to get by this?
For example, my XML:
<group>
<idExt>new group idext</idExt>
<user-id>1</user-id>
<parent-id>2</parent-id>
</group>
when unmarshalling, goes without errors, but when I change order:
<group>
<user-id>1</user-id>
<parent-id>2</parent-id>
<idExt>new group idext</idExt>
</gro...
I have a MyBean annotated
@XmlRootElement
public class MyBean ...
Marshalling/Unmarshalling MyBean w/o problems, e.g.
JAXBContext jaxbCtx = JAXBContext.newInstance(MyBean.class);
Marshaller m = jaxbCtx.createMarshaller();
m.marshal(myBean, writer);
How can I use JAXB to marshall/unmarshall a Collection or List?
My attempt results ...
Hi,
I'm trying to register my castor mapping files with spring and I appear to be getting a null pointer exception.
In my application context I have:
<bean id="xmlContext" class="org.castor.spring.xml.XMLContextFactoryBean">
<property name="mappingLocations">
<list>
<value>DistributionSamplerMappings.xml</value>...
I am using JAXB to unmarshal an XML file into an object tree. The root object is non-null, but all of it's members are null even though there is data in the XML file. My object classes were generated with Axis2 from wsdls. I have the ObjectFactory class, the jaxb.index class, the package.info annotation, etc.
My problem is the same a...