spring-ws

How to Parse SoapFaultClientException in spring-ws

微笑、不失礼 提交于 2019-12-07 17:20:32
问题 I am using spring-ws-2.3.1, While creating client for webservices sometime i am getting SoapFaultClientException like below, <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>There was a problem with the server so the message could not proceed</faultstring> <faultactor>InvalidAPI</faultactor> <detail> <ns0:serviceException xmlns:ns0="http://www.books.com/interface/v1"> <ns1:messageId xmlns:ns1="http://www.books.org/schema/common/v3_1">5411</ns1:messageId>

Spring WS WSDL automatic exposure : xsd import are not followed

百般思念 提交于 2019-12-07 06:04:34
问题 I'm trying to dynamically generate WSDL for a Spring WS web service, based on multiple xml schemas. I have a multiple xsd files, all of them are "connected" using xsd:import elements. Spring WS reference says : If you want to use multiple schemas, either by includes or imports, you will want to put Commons XMLSchema on the class path. If Commons XMLSchema is on the class path, the above element will follow all XSD imports and includes, and will inline them in the WSDL as a single XSD. This

How to remove empty header from SOAP message?

…衆ロ難τιáo~ 提交于 2019-12-07 03:32:36
问题 I am using Spring-WS for consuming Webservice which compains if SOAP envelop has empty header element. I figured out that default SOAPMessage implementation adds one. How can I remove it? Thanks in advance 回答1: http://docs.oracle.com/javaee/5/tutorial/doc/bnbhr.html: The next line is an empty SOAP header. You could remove it by calling header.detachNode after the getSOAPHeader call. So here is the solution in plain SAAJ: MessageFactory messageFactory = MessageFactory.newInstance("SOAP 1.2

How to build SOAP client in Spring?

我与影子孤独终老i 提交于 2019-12-06 20:27:24
问题 I am able to send requests to the web service using javax.xml.soap.* , I would like to covert the code to use webServiceTemplate . I am struggling with creating request and result objects. (sample Ive found is related to xml not SOAP) I am also wondering if there is any advantages of using webServiceTemplate over java.xml.soap . If there is not am I doing it correctly? Given that I need to get connected to 20 web services. The only service it has is findEvents as follows: <soapenv:Envelope

Spring-ws or Axis2 or Something else for “Contract-First” approach to WS

陌路散爱 提交于 2019-12-06 12:02:35
Everyone's saying "Contract-First" approach to design WS is more inclined to SOA style design. Now, if we take the available open-source frameworks available to achieve that we have Spring-ws and also Axis2 (which supports both styles). I have a task to design SOA based e-commerce app. where loose coupling, quick response, security and scalability are the key points. So it is very important to choose the right framework from the start. Based on past experiences, which of them or something else do you guys think to be a more appropriate option for my requirements. That is a tough question. I

javax.xml.bind.JAXBException: doesn't contain ObjectFactory.class o jaxb.index

左心房为你撑大大i 提交于 2019-12-06 11:55:12
I've a Java Spring Web application that I need to use as SOAP client. I'm using Maven and I've got a main module (WAR) with my custom code and a child module (JAR dependency) with the WSDLs (I've two WSDL) generated classes. As you can see in the title when I run the application an error occurs javax.xml.bind.JAXBException: doesn't contain ObjectFactory.class or jaxb.index This is the ApplicationContext.xml of the main module: <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/> <bean id="webServiceTemplate" class="org.springframework.ws.client.core

Sign SOAP request on client-side with Spring

痞子三分冷 提交于 2019-12-06 10:46:09
I have read the Spring doc regarding Securing your Web services with Spring-WS but it looks for me as if the article is just regarding server side and not client side. Indeed, it is working fine for server side with Wss4jSecurityInterceptor but I need to sign a request to an external Web service. So, first question. Am I right and chapter 7 of Spring Web Services documentation just apply to server side? Second. It is possible, to add security, like signed headers, to SOAP requests on client side with Spring in a way similar (simple, elegant) to how it is done on server side? I have found this

SoapFaultMappingExceptionResolver never gets hit with regular java exception

与世无争的帅哥 提交于 2019-12-06 05:48:32
问题 Can anyone tell me why I cant catch a regular Java exception with my resolver so I can transform it before the response is sent back? It never gets hit with a breakpoint. If its not possible, how can I? SoapFaultMappingExceptionResolver public class LisSoapFaultTranslatorExceptionResolver extends SoapFaultMappingExceptionResolver { @Override protected void customizeFault(Object endpoint, Exception ex, SoapFault fault) { SoapFaultDetail detail = fault.addFaultDetail(); } } Bean <sws:annotation

Spring boot 2.1.1 to 2.1.2: Error creating bean with name 'payloadRootAnnotationMethodEndpointMapping'

不问归期 提交于 2019-12-06 05:35:42
问题 Migrating from spring boot 2.1.1 to 2.1.2 caused the following error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payloadRootAnnotationMethodEndpointMapping' defined in class path resource [org/springframework/ws/config/annotation/DelegatingWsConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.ws.server.endpoint

Stream MTOM Web Services in Spring Web Services Framework

佐手、 提交于 2019-12-06 03:22:17
问题 I would like to send large files from the server to the client using MTOM and Spring WS. I realize that this isn't the best approach for this type of thing, but it's a requirement. I have MTOM set up and it works great for small files around 50mb. I am experiencing out of memory errors for larger files and by changing different heap space sizes, I can send slightly larger files, but nothing close to 1gb. 1GB is my test case for this. How can I stream or chunk the MTOM service from the server