saaj

During an SSL SOAP request: SSLHandshake.consume ignores value of com.sun.jndi.ldap.object.disableendpointidentification

百般思念 提交于 2020-12-15 05:55:05
问题 Clarification A: Since this is an SSL question, I hope I can lower the obvious security red flags and potentially save the time of our resident SSL security experts, by stating the following: This SSL communication is between a test machine and a product deployment that is not ready for final security work (ie: after initial testing is complete, a security team will fix all the certificates, ports, settings, etc...) At this point, both test client and test target machines are far less

Spring WS unavailable upon requesting connection

不问归期 提交于 2020-01-07 02:22:11
问题 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 [http://mymachine:8080/test-service/HistoryService] 2011-07-20 18:25:33,868 DEBUG [org.springframework.ws.soap.saaj.support.SaajUtils] - SOAPElement [com.sun.xml.internal.messaging.saaj.soap.ver1_1.Envelope1_1Impl] implements SAAJ 1.3 2011

Use default namespace in valid SOAP SAAJ envelope

别等时光非礼了梦想. 提交于 2019-12-22 05:07:13
问题 Are these two soap messages valid ? The different part is the namespace attribute xmlns="http://www.sigvalue.com/acc". The first soap is a sample, the second one generated by java code to make the same soap message. <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetNGPList xmlns="http://www.sigvalue.com/acc"> <UserData>

Use default namespace in valid SOAP SAAJ envelope

蓝咒 提交于 2019-12-22 05:07:11
问题 Are these two soap messages valid ? The different part is the namespace attribute xmlns="http://www.sigvalue.com/acc". The first soap is a sample, the second one generated by java code to make the same soap message. <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetNGPList xmlns="http://www.sigvalue.com/acc"> <UserData>

jaxp object caching for MessageFactory

青春壹個敷衍的年華 提交于 2019-12-19 19:08:49
问题 Can the javax.xml.soap.MessageFactory be reused? I.e. msgFactory = MessageFactory.newInstance(); Can I cache msgFactory and reuse it to create new SOAPMessages as needed? Also should the msgFactory.createMessage(); be synchronized if it is ok to reuse msgFactory in the code? UPDATE: Also in single threaded-code, could I store msgFactory to create SOAPMessages over and over, so as not to create a new instance of MessageFactory each time Thanks 回答1: There's nothing in the javadoc to say that

jaxp object caching for MessageFactory

我的梦境 提交于 2019-12-19 19:04:12
问题 Can the javax.xml.soap.MessageFactory be reused? I.e. msgFactory = MessageFactory.newInstance(); Can I cache msgFactory and reuse it to create new SOAPMessages as needed? Also should the msgFactory.createMessage(); be synchronized if it is ok to reuse msgFactory in the code? UPDATE: Also in single threaded-code, could I store msgFactory to create SOAPMessages over and over, so as not to create a new instance of MessageFactory each time Thanks 回答1: There's nothing in the javadoc to say that

NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces

时间秒杀一切 提交于 2019-12-18 14:46:05
问题 Trying to retrieve the SOAP body from a SOAP response, but getting this error: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. Document doc = soapResMsg.getSOAPBody().extractContentAsDocument(); -- Exception is thrown here org.dom4j.io.DOMReader d4Reader = new org.dom4j.io.DOMReader(); org.dom4j.Document d4doc = d4Reader.read(doc); Using Saaj1.4 What would be a fix for this? 回答1: I faced the same problem. In my case, fix

Add child elements to custom SOAP header in Spring-WS

旧时模样 提交于 2019-12-18 02:41:43
问题 I am calling a SOAP webservice with Spring-WS. The webservice in question requires me to pass some information in the SOAP header as shown here: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <CustomHeaderElement> <clientID>xyz</clientID> <wsdlVersion>1.0</wsdlVersion> <serviceType>ExampleService_v1</serviceType> </CustomHeaderElement> </soapenv:Header> <soapenv:Body> ... </soapenv:Body> </soapenv:Envelope> I've figured out how to had the top

CXF SOAP JAX-WS WSS4JInInterceptor change namespace and cause Unmarshalling error

↘锁芯ラ 提交于 2019-12-12 04:50:34
问题 I'm using WSS4JInInterceptor in my endpoint to validate the authorization. I have that in my endpoint Here it's my SOAP message <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header> <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:UsernameToken wsu:Id=

ZIP file corrupt fetching from SOAP attachment

倾然丶 夕夏残阳落幕 提交于 2019-12-11 11:24:34
问题 I am using a web service that helps me to fetch files from a message hub. File type can either be XML or ZIP. For ZIP files, the content type is binary. I have this piece of code : private String extractPayload(String filePath, AttachmentPart attach){ FileOutputStream fileStream = null; try { DataHandler handler; handler = attach.getDataHandler(); File f = new File(filePath); fileStream = new FileOutputStream(filePath); handler.writeTo(fileStream); fileStream.flush(); } catch (Exception ex) {