Questions tagged [saaj]

SOAP with Attachments API for Java

From Wikipedia:

The SOAP with Attachments API for Java or SAAJ provides a standard way to send XML documents over the Internet from the Java platform. SAAJ enables developers to produce and consume messages conforming to the SOAP 1.1 specification and SOAP with Attachments note.


Related links

173 questions
117
votes
4 answers

How to do a SOAP Web Service call from Java class?

I'm relative new to the webservices world and my research seems to have confused me more than enlighten me, my problem is that I was given a library(jar) which I have to extend with some webservice functionality. This library will be shared to other…
jpz
  • 1,181
  • 3
  • 8
  • 4
29
votes
7 answers

Unable to create SAAJ meta-factory after packaging as JAR

For testing an application I am creating SOAP messages. This works when run directly from Eclipse (Oxygen.1a) but after packaging as runnable jar (option: package required libraries into generated jar) I get the following…
Hakello
  • 457
  • 1
  • 5
  • 10
23
votes
6 answers

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

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 =…
Java Guy
  • 3,391
  • 14
  • 49
  • 55
18
votes
3 answers

Setting socket read timeout with javax.xml.soap.SOAPConnection

I am using the javax.xml.soap API (javax.xml.soap.SOAPConnectionFactory, javax.xml.soap.SOAPConnection, and friends) to make a web service call to a remote server, for the most part with great success. However, sometimes there is a problem and the…
Samuel Edwin Ward
  • 6,526
  • 3
  • 34
  • 62
18
votes
1 answer

What's the difference between MTOM and the attachment features provided by SAAJ?

SAAJ: SOAP with Attachments API for Java MTOM: SOAP Message Transmission Optimization Mechanism My simple understanding: they deal with SOAP attachments, with MTOM being the more optimized version of SAAJ. Is this correct? Are they simply 2…
Jops
  • 22,535
  • 13
  • 46
  • 63
16
votes
4 answers

Add child elements to custom SOAP header in Spring-WS

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:
Mike Deck
  • 18,045
  • 16
  • 68
  • 92
16
votes
3 answers

Creating one non-thread-safe object per thread and using happens-before guarantee

I want to use SOAPConnectionFactory and MessageFactory classes from SAAJ with multiple threads, but it turns out that I can't assume they are thread-safe. Some related posts: javax.xml.soap.MessageFactory's instance is thread-safe? jaxp object…
Ruslan
  • 3,063
  • 1
  • 19
  • 28
9
votes
1 answer

Joining SAAJ and JAXB

I'm creating a web service withoug axis. I'm using SAAJ, JAXB and Servlet. I can marshall and unmarshall a class with JAXB correctly. But how can I use together SAAJ and JAXB for SOAP communication. I want put the JAXB converted xml text to SOAP…
kodmanyagha
  • 932
  • 12
  • 20
8
votes
4 answers

Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found

I am trying to upgrade my project to java 15. While trying to launch the server I'm getting error during bean creation. util-context.xml:
hemantSingh
  • 83
  • 1
  • 1
  • 4
8
votes
2 answers

Use default namespace in valid SOAP SAAJ envelope

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.
Frank
  • 1,315
  • 7
  • 24
  • 43
8
votes
1 answer

Java SAAJ Basic Authentication

I have a basic SOAP service endpoint, actually SAP ECC, presenting a service. I have tested the service using SOAPUI 4.5, and it works ok using HTTP Auth, preemptive by the looks of things. I see an outbound "Authorization:Basic BASE64" and the…
Ben
  • 141
  • 1
  • 1
  • 5
7
votes
3 answers

SOAPExceptionImpl Bad response: 404Not Found if i don't do soapMessage.writeTo(System.out);

I'm creating a Soap client in java and I'm getting a strange error. Abstract client public abstract class AbstractSoapClient { private ServerContext context; private String path; private static final String WSSE = ""; private…
6
votes
2 answers

Unable to create SAAJ meta-factory in Java 17

I'm getting the following error while starting my spring boot application Caused by: org.springframework.ws.soap.SoapMessageCreationException: Could not create SAAJ MessageFactory: Unable to create SAAJ meta-factoryProvider…
DarkCrow
  • 785
  • 2
  • 8
  • 29
6
votes
1 answer

Problems creating SAAJ object model in SOAP request

I have a JMeter test case which contains SOAP requests with various files attached to these. So same request is sent with different files. It is working properly with some files, but it gives HTTP 500 error code with following…
plaidshirt
  • 5,189
  • 19
  • 91
  • 181
6
votes
1 answer

jaxp object caching for MessageFactory

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…
Cratylus
  • 52,998
  • 69
  • 209
  • 339
1
2 3
11 12