I get null when I get the content from a SOAPPart. My code snippet is
mf = MessageFactory.newInstance();
MimeHeaders headers = getHeaders(req);
InputStream is = req.getInputStream();
SOAPMessage msg = mf.createMessage(headers, is);
SOAPPart spx = msg.getSOAPPart();
Source src = spx.getContent();
After executing the last line src is null. getHeaders gets the headers from the request so I can fulfill the createMessage interface. Can anyone see why getContent() returns null? I dumped the MIME Headers on my SOAPPart and there is a single header: Content-Type: text/xml
My incoming SOAP request is:
POST /myservices/UserService HTTP/1.1
SOAPAction: login
Content-Type: text/xml; charset="utf-8"
Content-Length: 223
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.4.2_02
Host: localhost
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<LoginRequest>
<User>spruitt</User>
<Password>xxx</Password>
</LoginRequest>
</SOAP-ENV:Body></SOAP-ENV:Envelope>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net