Skip to content
Advertisement

Tag: jaxb

wsimport – Two declarations cause a collision, same line given

Trying to use wsimport to generate a client for a SOAP endpoint. The WSDL and all XSD files used are local copies. This is the command being executed: Which gives this error: Note the line number is the same for the reported collision. Here’s the schema: I’ve tried removing the type definition, but it’s referenced in a slew of other

Error creating bean with name ‘org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter’

I am trying out a simple spring web service application. I have configured the application correctly but when i try access the wsdl file i get the following error: Here are my configuration files: ws-config.xml web.xml app-config.xml downloadMessageRequest.xsd Edit pom.xml Answer Do you have spring-expression in your Maven dependencies ? If you are not using Maven, check your WEB-INF/lib folder.

Is it possible to generate a XSD from a JAXB-annotated class?

I’ve written a number of classes using JAXB for serialization and I was wondering if there was a way to generate a XSD file for each of these objects based on the annotations. Is there a tool for this? Something like generate-xsd com/my/package/model/Unit.java would be awesome. Does anything exist to do this? Answer Yes, you can use the generateSchema method

IllegalAnnotationException: Two classes have the same XML type name

I am developing web service under JBoss 5 and Java 1.6. What could possibly cause this exception? Below is my simplified web service code. And below is the full stack trace. Answer I found the cause of my problem. This problem occurs because JAX-WS generates a class for each method and the class name is constructed by concatenating methodName +

Handling nested elements in JAXB

I am wondering if it is possible to have JAXB not to create Java object for XML elements that serve as wrappers. For example, for XML of the following structure I do not want an object for <wrapper> to be created at all. So for a class like the <entity> element should be unmarshalled directly into the entity field. Is

XML Schema to Java Classes with XJC

I am using xjc to generate Java classes from the XML schema and the following is an excerpt of the XSD. For the most part the generated classes are fine but for the above block I would get something like: with the following comment above it: I have placed a comment at the end of the two line in question.

Advertisement