http url connection for spring web service template

there is always a “NOT FOUND [404]” issue when parsing the response from web service, or sometimes even when sending the web service; when using spring web service template.

the problem then turns out due to the default http url connection provided by JVM. When i change the connnection to spring provided common http message sender based on Jakata common httpClien, it starts working well.

By the way, JVM provided http url connection sender works well on windows machine. Only when i deploy the application to UNIX, it starts complaining the 404 issue.

anyway, with the spring common http message sender, it works well whether windows or UNIX.

Another thing to note is, when using Spring Web Service template. We just need to pass the SOA message content to webServiceTemplate.sendSourceAndReceiveToResult(). as spring web service template will wrap it using the SOAP envelop.

if we provide envelop again, it also throws 404 issues.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s