JAXB « Web Service « Spring Q&A





1. How to handle rpc/literal webservice with JAXB2 and Spring-WS    stackoverflow.com

We need to access a legacy webservice that uses the RPC/literal webservice style and also to provide webservice endpoints for it. If you use webservices of document/literal style with Spring ...

2. Jaxb2Marshaller and primitive types    stackoverflow.com

Is it possible to create a web service operation using primitive or basic Java types when using the Jaxb2Marschaller in spring-ws? For example a method looking like this:

@Override
@PayloadRoot(localPart = "AddTaskRequest", namespace ...

3. Jersey implementing ContextResolver in Spring    stackoverflow.com

So I am writing a Spring(2.5( + Jersey(1.1.4.1) and trying to create a JSONConfiguration using a ContextResolver. Here is the code:

package com.rhigdon.jersey.config;

import com.sun.jersey.api.json.JSONConfiguration;
import com.sun.jersey.api.json.JSONJAXBContext;

import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;
import javax.xml.bind.JAXBContext;

@Provider
public final class JAXBContextResolver ...

4. JAXB and Jersey list resolution?    stackoverflow.com

I have the following XSD defined to generate some jaxb objects. It works well.

<xsd:element name="Person" type="Person" />

<xsd:complexType name="Person">
    <xsd:sequence>
        <xsd:element name="Id" ...

5. post xml to Spring REST server returns Unsupported Media Type    stackoverflow.com

I'm trying to create a simple spring based webservice that supports a "post" with xml content. In spring, I define an AnnotationMethodHandler:

<bean id="inboundMessageAdapter" class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
        <property ...

6. No endpoint mapping found for..., using SpringWS, JaxB Marshaller    stackoverflow.com

I get this error: No endpoint mapping found for [SaajSoapMessage {http://mycompany/coolservice/specs}ChangePerson] Following is my ws config file:

<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
    <description>An endpoint mapping strategy that looks for @Endpoint and @PayloadRoot annotations.</description>
</bean>
<bean ...

7. Spring WS WebServicesTemplate/Jaxb2Marshaller client view raw xml?    stackoverflow.com

Is it possible to view the request and the response for a Spring WS client using WebServicesTemplate and Jxb2Marshaller as the marshaling engine? I simply wan to to log the xml, not ...

8. thread safety when using spring WebServiceTemplate and Jaxb2Marshaller    stackoverflow.com

I am using spring WebServiceTemplate as a web service client programmatically i.e. without instantiating a spring container. I am using Jaxb2Marshaller for marshaling/unmarshaling. In my application, I create a single instance ...

9. How to transform exceptions into return codes using Spring-WS?    stackoverflow.com

I'm currently facing a problem with error codes and messages using Spring WS. We are using Spring WS 2.0 with a JAXB2 binding and the @Endpoint and @PayloadRoot annotations for convenience. Our endpoint ...





10. Generic return object for a collection of objects in RESTful Spring3 app    stackoverflow.com

I am looking for a generic way of returning a set of objects in my REST service. I use the Spring3 message-converters and the @ResponseBody annotation. Some sites say that JAXB2 has ...

11. 406 Not Acceptable in Spring MVC application (OSGi, Virgo Web Server) using Jackson, Rome and JAXB2    stackoverflow.com

I just started learning the Virgo Web Server. I'm trying to work with Jakcson JSON in Spring MVC application. At this stage I can not get a GET request serialized object. The server returns ...

12. Why doesn't JAXB allow annotations on getters that all pull from the same member variable?    stackoverflow.com

Why does example A work, while example B throws a "JAXB annotation is placed on a method that is not a JAXB property" exception? I'm using JAX-WS with Spring MVC. Example A

package com.casanosa2.permissions;

import ...

13. Is it required to generate java classes to use spring-ws client    stackoverflow.com

I want to use spring ws to create the webservice client. I have seen some documentation. In all using jaxb marshalling and unmarshalling. But to start of need to create java classes ...

14. spring ws not finding the adaptor when using annotated endpoints    stackoverflow.com

I am using Java 6 and spring-ws to create a very simple web service which receives 2 parameters in the form of a BusquedaRequest Jaxb object and returns the same object. The ...

15. Spring Converter - cyclic issue    stackoverflow.com

I have a issue where, I have a converter class say called aConverter as such:

@XmlRootElement(name = "aConverter")
public class aConverter implements ConverterBase{

      private A a;
   ...

16. How jaxb marshaller and unmarshallers uses generated classes    stackoverflow.com

I have generated classes using wsimport/wsconsume for my webservice. I am using JAXB marshaller and unmarshaller support. Can any one tell me how these marshaller/unmarshaller uses gnereated classes? say it is ...





17. JAXB: How to use auto-generated classes from Spring?    stackoverflow.com

I am using xjc to generated Java classes from an XSD. The resulting classes only include getter methods for collection types, e.g. List, but no setter methods. How can i use ...

18. java : spring rest WS - Unable to locate object to be marshalled in a model    stackoverflow.com

Getting the exception while trying to run rest ws in spring mvc 3.0 with jaxb

javax.servlet.ServletException: Unable to locate object to be marshalled in model: {org.springframework.validation.BindingResult.employees=org.springframework.validation.BeanPropertyBindingResult: 0 errors, ...

19. JAXB + Spring WS : "No adapter for endpoint" while using JAXBElement    stackoverflow.com

I have a web service that I am trying to implement using Spring and Jaxb. I already have a handful of working services using both of these - but ...

20. posting xml to a spring REST endpoint is not getting unmarshalled into the relevant Java object    stackoverflow.com

I have a project where xsd are given. I use the xjc compiler to generate the Java classes. And then I annotate the class with XmlRootElement attribute. I have configured the ...

21. which spring ws jaxb annotation to change xml element name    stackoverflow.com

I am using a sping ws endpoint with jaxb marshalling/unmarshalling to proudce a list of Organisation objects (our local type). The endpoint is SOAP 1.1, no parameters supplied on the request ...

22. Spring WS with JAXB2Marshaller - javax.activation.DataHandler NoClassDefFoundError    stackoverflow.com

We are trying to implement a JAXB2Marshaller to our webservice project, but we get a java.lang.NoClassDefFoundError on the class javax.activation.DataHandler, however the dependency to activation artifact exists and we ...

23. install and use jersey on Eclipse    stackoverflow.com

In my Web service I use eclipse, java 1.5, spring. now I want to use jersey for REST and downloaded the jersey as a bundle jar from this address: http://jersey.java.net/nonav/documentation/latest/chapter_deps.html How ...

24. How a Spring WebApp manages different clients' request?    stackoverflow.com

probably there are a lot of people who will smile reading this question... Here's my problem. I have a Spring 3 web application acting both as a client and server. It gets some ...

25. Spring 3, ReST, @ResponseBody and @ExceptionHandler    stackoverflow.com

I have been trying to get exception handling working in my simple Spring 3 based ReST web services. Based on everything I have seen, there is a bug that prevents this ...

26. Why is JAXB trying to bind Spring's ApplicationContext?    stackoverflow.com

I'm working on a Spring application that exposes a JAX-WS web service. The web service implementation has a dependency on some spring-managed object in my service-layer and looks like this

@WebService
public class ...

27. Spring RESTFul webservice using Hibernate and JAXB failing to unmarshall XML    stackoverflow.com

I've set up a test Spring webservice using a single entity for my XML un/marshalling and domain entity. I'm using maven with embedded Jetty and an embedded H2 database just to ...

28. Webservice-Client: Common approach with Spring WS, JAXB and just one WSDL file?    stackoverflow.com

I would like to use Spring WS to build a Webservice-Client with JAXB for marshalling and unmarshalling the Java classes. But what I have is just one WSDL file. When I understand ...

29. Returning an int whenusing webServiceTemplate.marshalSendAndReceive    stackoverflow.com

I'm using Spring WebServiceTemplate class to to create and instantiate a request object of a JAXB generated class, call the marshallSendAndReceive method with it and then to cast the response object ...

30. Spring Webservice Template using Exception Missing Envolope tag    stackoverflow.com

I am using Spring webservice Template for consuming web service. I am using SOAP version: 1.0. and spring-ws-core version: 2.0.2.RELEASE When I checked with SOAP UI, I got a response (FAULT, but that's ...

31. Spring WS unavailable upon requesting connection    stackoverflow.com

I've got a Spring WS which I'm able to call successfully for 2 requests. Here is the output:

2011-07-20 18:25:33,743 DEBUG [org.springframework.ws.client.core.WebServiceTemplate] -    Opening [org.springframework.ws.transport.http.HttpUrlConnection@1696452] to   ...

32. Spring WS with webServiceTemplate.marshalSendAndReceive returns Received error for request, Service Unavailable : Not Found [404]    stackoverflow.com

I'm trying to ammend an existing SOAP Webservice that uses Spring-WS and JAXB on Tomcat. I've created the new WAR file with my changes and deployed it in the webapps foder ...

33. JAXB :Need Namespace Prefix to all the elements    stackoverflow.com

I am Using Spring WebServiceTemplate to make webservice call which uses JAXB to generate request XML. My requirement needs all the elements (including root) to have a namespace prefix (there is ...

34. generating code from XSD    stackoverflow.com

I am using JAXB plugin to generated java code from XSD. One element is any:

<xs:complexType name="element">

        <xs:sequence>
        ...

35. Spring Dependency not working with Webservices    stackoverflow.com

I have exposed a service in application as Webservice, but it is not getting handal to a Dao which is injected through Dao, any one has any idaa? Stack

Sep 23, ...

36. Java Spring Web Service Client Fault Handling    stackoverflow.com

I have written a web service client (using Java Spring and JAXB Marshaller) that works with the UPS web service. When I send a valid request everything works well. When I ...

37. WebServiceTemplate send raw XML as content    stackoverflow.com

I am using Spring-WS with JAXB. Have the next code:

WebServiceTemplate template = (WebServiceTemplate) ctx.getBean("requestWsTemplate");
ObjectFactory f = new ObjectFactory();
Request r = f.createRequest();
r.setContent("<age>25</age>");
template.marshalSendAndReceive(r);
the <age> tag gets escaped to &lt;age&gt; Is there a way to send ...

38. How to set Jaxb2Marshaller list of XmlAdapters in Spring bean through XML?    stackoverflow.com

I'm trying to define a Jaxb2Marshaller bean in Spring-WS to use a custom adapter that extends XmlAdapter. I have the following in an XML file:

<bean id="jaxb2Marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
    <property ...

39. Debugging Spring-WS request from MessageDispatcher to Endpoint?    stackoverflow.com

Is there a way to debug step-by-step what happens on a web service request in Spring-WS from the time the request is sent to the MessageDispatcher until it reaches my Endpoint ...

40. Empty SOAP response - using JBoss 4.2, Jaxb2, Java 1.6    stackoverflow.com

I am trying to deploy a spring-ws SOAP webservice in JBoss 4.2 (JDK 1.6, spring 3.0, spring-ws 2.0). I am using JAXB2 as O/X binding. Setup is fine, beans found and ...

41. XmlJavaTypeAdapter does work when referencing through spring from another project    stackoverflow.com

I have two projects, one reference the other using maven. The structure is as below, the service is simple cxf service, it wires dao thru spring. When I run a junit ...

42. How do I make JaxWsPortProxyFactoryBean use JAX-WS 2.1?    stackoverflow.com

I'm working on a project that delivers web services using Jersey, which has a dependency on JAXB 2.1. I have to add a feature that fetches data from another web service. ...

43. Jersey JAXB how to implement a MessageBodyWriter for List    stackoverflow.com

I am trying to implement a MessageBodyWriter for List. with this implementation i have a null pointer exception on line ; marshaller.marshal(o, entityStream);

@Provider
@Produces(MediaType.APPLICATION_XML) 
public class MyListProvider implements MessageBodyWriter<List<Instrument>> {

   ...

44. JAXB List annotation jersey -Strange IllegalAnnotationException    stackoverflow.com

i have a strange example with annotations of List interfaces annotation and Jersey. The example i have done a class containing a list Interface attribute and a method returning that list. It ...

45. Spring-WS 1.5.9 JaxB marshaller and primitive type in request    forum.springsource.org

Hey! Is there a way to receive primitive types in request parameters of SOAP webservice endpoint? I have such method: Code: protected Response request(String, double, String, String) and when I send ...

46. JAXB "No adapter for endpoint" while using JAXBElement    forum.springsource.org

JAXB "No adapter for endpoint" while using JAXBElement I have a web service that I am trying to implement using Spring and Jaxb. I already have a handful of working services ...

47. Issues Consuming a Web Service using RestTemplate and JAXB    forum.springsource.org

Issues Consuming a Web Service using RestTemplate and JAXB I am trying to "consume" a web service, however I have something set up incorrectly and am receiving an error when I ...

48. Web Service Client: Jaxb2 and Jaxb1    forum.springsource.org

Web Service Client: Jaxb2 and Jaxb1 Hello all, I am having what I believe to be a compatibility issue. I have a J2EE project that acts as a client to 2 ...

49. Spring WS 2.0.2 client, SAAJ (SwA), JAXB, Weblogic 10.3.x problem    forum.springsource.org

Spring WS 2.0.2 client, SAAJ (SwA), JAXB, Weblogic 10.3.x problem There are a lot of questions associated with this combination of technologies on the web. But there is not answers. I ...

50. Webservice-Client: Common approach with Spring WS, JAXB and just one WSDL file?    forum.springsource.org

Webservice-Client: Common approach with Spring WS, JAXB and just one WSDL file? Hello, I would like to use Spring WS to build a Webservice-Client with JAXB for marshalling and unmarshalling the ...

51. Spring WS, JAXB and WSDL file    forum.springsource.org

Hi, Can anyone please suggest me a good tutorial where i can try the Spring WS with jaxb and wsdl file. As i am new to JAXB. Thanks

52. how to add xsl stylesheet to spring REST and JAXB?    forum.springsource.org

how to add xsl stylesheet to spring REST and JAXB? I'd like to add this stylesheet to the top of some of my spring REST responses. Any way of doing this? ...

53. RestTemplate / JAXB issue    forum.springsource.org

Hi I am using RestTemplate and JAXB as a message converter. (org.springframework.oxm.jaxb.Jaxb2Marshaller) I am calling: Code: // I have a POJO named API which is generated by xjc from a xsd ...

54. StaxEventItemWriter with jaxb2 marshaller how to suppress namespace    forum.springsource.org

Nov 11th, 2011, 06:53 PM #1 xzhou View Profile View Forum Posts Private Message Junior Member Join Date Nov 2011 Posts 3 StaxEventItemWriter with jaxb2 marshaller how to suppress namespace Hi, ...

55. StaxEventItemWriter with jaxb2 Marshaller, how to suppress namespace?    forum.springsource.org

Nov 11th, 2011, 08:35 PM #1 xzhou View Profile View Forum Posts Private Message Junior Member Join Date Nov 2011 Posts 3 StaxEventItemWriter with jaxb2 Marshaller, how to suppress namespace? Hi, ...

56. Response from JAXB endpoint is missing root element    forum.springsource.org

I created an endpoint by extending org.springframework.ws.endpoint.AbstractMarshallin gPayloadEndpoint with org.springframework.oxm.jaxb.Jaxb1Marshaller as the marshaller/unmarshaller. Within the invokeInternal(Object requestObject) method of the endpoint, I create a response object. When the response is rendered ...

57. Can't find jaxb-xjc 1.0.7 jar for 'oxm' generate-sources    forum.springsource.org

Neither Maven nor Google can find the 1.0.7 version of the jaxb-xjc jar file required in the 'oxm' module necessary to generate the WS request sources. Where did you find it? ...

58. Problems with AbstractMarshallingPayloadEndpoint and JAXB2    forum.springsource.org

Hi, I'm using version 1.0-rc2 to create a web service that marshalls/unmarshalls messages using JAXB2. I ran xjc against the schema and got classes like: Code: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MyClass_Type") public ...

59. Spring WS / JAXB / DataSet    forum.springsource.org

Spring WS / JAXB / DataSet I am attempting to call a web service using the marshalSendAndReceive method. It looks as if the request is marshalling correctly using JAXB, the issue ...

60. AXIOM and JAXB    forum.springsource.org

AXIOM and JAXB I am receiving errors when using AxiomSoapMessageFactory as my messageFactory along with JAXB. The same code works great when using SAAJ as my factory, but do to other ...

61. Spring-Ws - JAXB marshallling    forum.springsource.org

Jan 11th, 2008, 07:58 PM #1 harshi View Profile View Forum Posts Private Message Senior Member Join Date Nov 2007 Posts 120 Spring-Ws - JAXB marshallling Hi, I am using marshalling ...

62. Bug in Oracle JAXB destroys spring-ws?    forum.springsource.org

Bug in Oracle JAXB destroys spring-ws? I think I have found a bug in the Oracle JAXB-implementation (JAXB1) which blocks spring-ws. Before I report it to Oracle, I'd like some feedback ...

63. Using Spring-WS with JAXB2    forum.springsource.org

Using Spring-WS with JAXB2 Hi ! I have a question concerning integration of spring-ws with JAXB2. I use : commons-httpclient commons-httpclient 3.1 org.springframework.ws spring-oxm 1.5.0 org.springframework.ws ...

64. Webservice client with JAXB2 and namespace    forum.springsource.org

Webservice client with JAXB2 and namespace problem Hi, I have a client using Spring WS, all is working fine. it is fantastic !!!! I use WebServiceTemplate plus JAXB2 to marshal an ...

65. java.lang.IllegalStateException: No adapter for endpoint and Jaxb2 Marshallers    forum.springsource.org

java.lang.IllegalStateException: No adapter for endpoint and Jaxb2 Marshallers Hi all. I've been getting the dreaded java.lang.IllegalStateExceptions with an endpoint that uses Jaxb2 to marshal. (As seen in Airline Service) Now, the ...

66. disadvantage of contextPath property of JAXB marshaller    forum.springsource.org

To specify multiple packages in contextPath, you need to sepearte them with ':'. We have to develop lot of web services around 100 and each one of them are in different ...

67. JAXB2 marshaller throws Unexpected ParseException    forum.springsource.org

JAXB2 marshaller throws Unexpected ParseException Hello All.. I am trying to marshall a JAXB Object using JAXB2 marshaller and validate it against an xsd. During this process of validation, the parser ...

68. Mappipng unaware @Endpoint implementation (JAXB2)    forum.springsource.org

Mappipng unaware @Endpoint implementation (JAXB2) Hi, As it's currently implemented, Endpoint implmentation that uses mapping IS compile-time dependent on the mapping type used. In other words, the Endpoint implementation does not ...

69. Spring WS + JAXB2 problem    forum.springsource.org

Spring WS + JAXB2 problem hi everyone, I'm trying to use spring ws with jaxb2 marshalling/unmarshalling. I have successfully created a webservice with xml parser, but its not what i need. ...

70. Query on JAXB2 Marshaller    forum.springsource.org

Query on JAXB2 Marshaller Hi, I'm planning to use JAXB2 for marshalling and using Spring OXM framework for this. So, as i understand i would need to generate the java classes ...

71. Jaxb2 context and marshaller on JDK1.5    forum.springsource.org

Jaxb2 context and marshaller on JDK1.5 Hi all, I developed a simple webservice with a jaxb2 marshaller (initially using JDK 1.6) and every went smooth and simple Then a new requirement ...

72. Marshaller, CDATA and JAXB    forum.springsource.org

I need to serialize XML fragments in a CDATA block. I'm using JAXB and Spring OXM, the JAXB FAQs has a comment about CDATA (See: jaxb.dev.java.net/faq/index.html#marshalling_cdata) but I can't use the ...

73. Need Spring-WS client which using JAXB marshaller    forum.springsource.org

74. ERROR about     forum.springsource.org

I gotta "cvc-complex-type.2.4.c" error from the console after Tomcat (6.x, JDK1.6) started while I'm using XML Schema-based configuration of JAXB2: Code: The matching wildcard is strict, but no declaration can be ...

75. No Adaptor found - Endpoint annotation and JAXB elements    forum.springsource.org

No Adaptor found - Endpoint annotation and JAXB elements Hi, I am trying to make use of Endpoint annotation from Spring WS and have hit a blocker I did refer to ...

76. Spring WS - Jaxb2 Issue    forum.springsource.org

Code: This works fine for all un-marshall invocations.. But for my marshalling invocations I'm seeing the marshalling request has some incorrect element names in the outgoing XML.. For ...

77. Client WS attachment with JAXB2 and Spring WS    forum.springsource.org

Client WS attachment with JAXB2 and Spring WS Hi, I am writing a client to consume a server web service having an attachment. I am using Spring WS and JAXB2. The ...

78. Validating JAXB2 against a WSDL with an inline schema    forum.springsource.org

Hi, I'm writing a client against a webservice which supplies a WSDL with an inline schema as opposed to importing a .xsd I don't have any control over how the people ...

79. JAXB Marshaller Types    forum.springsource.org

JAXB Marshaller Types Hi I am using spring-ws 1.5.6 with the JAXB marshaller. I have followed the examples and declared a AddCustomerRequest in messages.xsd and added an age parameter and declared ...

80. automatic wsdl generation and jaxb    forum.springsource.org

Hi, Yes that is entirely possible, the solution depends on the detail of what you actually want. If you want a WSDL for each XSD you need multiple WSDLDefinitions. If you ...

81. Simple example of @Endpoint and JAXB    forum.springsource.org

I wrote up a brief how-to for implementing a web service using the @Endpoint annotation and JAXB: http://xocoatl.blogspot.com/2009/08/...pring-web.html The tutorial and samples were helpful, but it took me a little while ...

82. Missing some response content with AbstractMarshallingPayloadEndpoint/JAXB2    forum.springsource.org

Sep 10th, 2009, 09:31 AM #1 lukasz.bielak View Profile View Forum Posts Private Message Junior Member Join Date Oct 2006 Posts 5 Missing some response content with AbstractMarshallingPayloadEndpoint/JAXB2 Hello, we got ...

83. SOAP attachment : swaref and jaxb2 with spring-ws    forum.springsource.org

SOAP attachment : swaref and jaxb2 with spring-ws hello, I have been trying to use swaref (attachment profile 1.x attachment profile 1.x in order to send a file as a SOAP ...

84. SOAP attachment : swaref and jaxb2 with spring-ws    forum.springsource.org

hello, Is the "attachment profile 1.0" supported by spring-ws, on the server side ? The marshalling process beeing held by the Jaxb2Marshaller (As a matter of fact, Jaxb is supporting swaref). ...

85. Rest & jaxb    forum.springsource.org

I set up a really simple Spring 3.0 REST + Hibernate + JAXB application. I hit a bit of a snag with the Hibernate Proxy not supporting annotations. I fixed it ...

86. Bean Definition for Marshaller - org.springframework.oxm.jaxb.JaxbSystemException    forum.springsource.org

Bean Definition for Marshaller - org.springframework.oxm.jaxb.JaxbSystemException Hi, Petclinic Roo is running fine for me. I added a marshaller/unmarshaller to translate to/from XML to POJO object from HTTP messages. In my webmvc_config.xml, ...

87. Logging JaxB marshalled/unlarshalled payload    forum.springsource.org

I am using MarshallingWebServiceOutboundGateway to communicate with external service provider. When using XMLbeans, the request/response were being logged in a readable format, but as soon as I shifted to JaxB, all ...

88. spring-ws client for spring-ws + jaxb web service    forum.springsource.org

I have a Spring-WS web service deployed on JRE6 that uses the Jaxb2Marshaller for OXM marshalling. Our build spits out the spring-ws client jar that uses JAXB 2.0. We have a ...

89. Grails CXF plugin - JAXB cycle error    forum.springsource.org

Grails CXF plugin - JAXB cycle error Hi all, I am fairly new to Grails and CXF. I have a simple parent-child relationship and I want to expose some methods through ...

90. "argument type mismatch" issue with Spring WS and JAXB marshelling    forum.springsource.org

Sep 24th, 2010, 02:33 AM #1 arunpjohny View Profile View Forum Posts Private Message Junior Member Join Date Oct 2007 Location Bangalore Posts 22 "argument type mismatch" issue with Spring WS ...

91. Integrating Spring 3 + GenericDAO + Hibernate + CXF JAX-RS (JAXB) + Generic Interface    forum.springsource.org

Integrating Spring 3 + GenericDAO + Hibernate + CXF JAX-RS (JAXB) + Generic Interface Hello, Not sure if this forum is that I need. If not, I apologize. First of all, ...