spring-ws

how to get soap response from webServiceTemplate

旧巷老猫 提交于 2020-01-04 13:48:49
问题 I need to get a soap response using "webServiceTemplate". Currently in my existing architecture it's using function "public boolean sendSourceAndReceiveToResult(String uri, Source requestPayload, Result responseResult) { } " but this is returning only boolean value, but is there any way to capture the soap response? I tried with "marshalSendAndReceive" functions but its not working. Could you please suggest how can I get the soap response using webServiceTemplate functions, or will I have to

propagate spring security from webapp to soap webservice

不想你离开。 提交于 2020-01-04 13:35:09
问题 I have the following situation: we have several webapplications, all using Spring Security to do authentication/authorization. We want to create a webservice that will be used by all those webapplications. Communication will hapen over https. I want the security context of the webapp to propagate to the webservice, so that @Secured annotations on methods in the webservice implementation work correctly. I've looked at spring ws security, and have succesfully implemented authentication using

Spring WS interceptors with injected DAO's @Transactional not working

元气小坏坏 提交于 2020-01-04 05:58:18
问题 We have a legacy XML based configuration spring-ws application that contains endpointInterceptors that have DAOs injected to obtain configuration from the database. These DAOs have the hibernate sessionFactory injected. When we have upgraded to spring 4.2.0.RELEASE (from spring 3.2.5.RELEASE) and spring-ws 2.2.1.RELEASE (from spring-ws 2.1.4.RELEASE) I noticed that the DAO was not a proxy object and it seemed that the intercetor was going to the AnnotationActionEndpointMapping class instead

Hibernate session handling in spring web services

半世苍凉 提交于 2020-01-03 04:55:27
问题 I am using spring-ws with Jaxb2Marshaller, PayloadRootAnnotationMethodEndpointMapping and GenericMarshallingMethodEndpointAdapter to configure my web services via the @Endpoint and @PayloadRoot annotations. When I try to use the DAO's of my project I am able to load objects from the database but as soon as I try to access properties inside my service that should be lazily loaded I get a org.hibernate.LazyInitializationException - could not initialize proxy - no Session. In my spring-mvc web

Spring-ws using custom schema for SOAP Faults

三世轮回 提交于 2020-01-03 03:11:09
问题 I am working on creating a web service using Spring-WS. And i am using the validation framework provided by Spring-WS to validate the request. When there are validation errors, the web service returns a SOAP fault with the validation errors in the detail element of the SOAP Fault. I'd like to know if there is a way we can send a custom response(message with my own schema) instead of a SOAP Fault response? If so, i'd be grateful if you can describe how i can achieve this. I have checked the

Is there a way to expose a static XSD in Spring WS 2?

北城余情 提交于 2020-01-02 12:40:47
问题 If, for example orders.wsdl imports Orders.xsd, how can it be configured using static-wsdl <sws:static-wsdl id="orders" location="/WEB-INF/wsdl/orders.wsdl"/> such that Orders.xsd can be viewed in the browser like http://host/context/Orders.xsd Dynamic wsdl supports it. <sws:dynamic-wsdl id="orders" portTypeName="Orders" locationUri="http://localhost:8080/ordersService/"> <sws:xsd location="/WEB-INF/xsd/Orders.xsd"/> </sws:dynamic-wsdl> But static-wsdl doesn't have the sws:xsd property. 回答1:

Java Spring Web Service Client Fault Handling

随声附和 提交于 2020-01-02 05:00:08
问题 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 send an invalid request (weight > 150 lbs) then the UPS web service responds with a SOAP Fault. The client application just fails with a org.springframework.oxm.UnmarshallingFailureException: JAXB unmarshalling exception; nested exception is javax.xml.bind.UnmarshalException: unexpected element (uri:"http://schemas.xmlsoap

How to change “SOAP-ENV” default prefix of Spring-WS

≡放荡痞女 提交于 2020-01-02 03:44:06
问题 I've created a web service using Spring-WS. To maintain compatibility with the old system, I need to change namespace prefix from SOAP-ENV to soap . I know that SOAP-ENV and soap are just namespace prefixes. As long as they refer to the correct namespace ( "http://schemas.xmlsoap.org/soap/envelope/" ), it should be fine. But the old system hard coded the parser code to expect only soap namespace prefix. Current response: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap

spring-boot-starter-ws performance when run as jar

走远了吗. 提交于 2020-01-01 11:37:25
问题 We've noticed in our that SOAP web-services seem to run faster when run as spring-boot:run as opposed to packaging up the JAR as we do for deployment and running java -jar mySpringApp.jar The speed up is in the order of 2-3x so obviously we would like this for our live environment. To validate that this wasn't something in our app I've tried this with the sample app from the spring guide git source https://github.com/spring-guides/gs-soap-service.git Testing this with JMeter shows the same

Spring-WS WSA header contains hardcoded mustUnderstand attribute

邮差的信 提交于 2019-12-31 05:41:08
问题 When sending WSA headers with Spring-WS, the wsa:To field always contains the attribute mustUnderstand="true". By looking at the source code, I found that this attribute is hardcoded in AbstractAddressingVersion.java. Based on the W3 standard the mustUnderstand attribute is not mandatory I think. Is there a reason why Spring-WS hardcodes it? We have difficulties when integrating Spring-WS with some other SOAP stacks because of this attribute. 回答1: If you file a JIRA here, we can make it