users@jax-rpc.java.net

RE: RE: SOAPPart content is null

From: Steve Pruitt <SPruitt_at_exstream.com>
Date: Thu, 8 Apr 2004 10:59:57 -0400

My fault. When I copied-paste from TCPMonitor to the email, I accidentally deleted the blank line between the headers and content. I ran it again to verify and the blank line appears.




Shouldn't you have a blank line after the headers? Perhaps that's why
it thinks you have no request body.

> -----Original Message-----
> From: Steve Pruitt [mailto:SPruitt_at_exstream.com]
> Sent: Wednesday, April 07, 2004 4:15 PM
> To: users_at_jax-rpc.dev.java.net
> Subject: SOAPPart content is null
>
>
> 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
>
>

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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