Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9242765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:39:07+00:00 2026-06-18T08:39:07+00:00

I am new to web services and I need to write simple spring-ws client

  • 0

I am new to web services and I need to write simple spring-ws client that will comunicate with server over SSL. The situation is:

  • My client works well with http on my localhost ws server on my Glassfish (problem is remote server and https)
  • Remote server works correctly. I will work just with data it sends me
  • I have server’s https address
  • I have client certificate from server provider

I thought it’ll be easy to find a simple tutorial for such task but I have problem to find something like that. Is it really so unusual or is it problem in me? Do you know some good tutorial/book for create this? It could be some simple quick steps, I really just need to connect to that server and get data from it.

I am using:

  • STS 3.0.0.M3
  • JDK 1.7
  • Client as Java Application (later probably as dynamic web app)
  • Generated classes from server’s wsdl (JAXB)
  • I folowed this tutorial for creating my client http://justcompiled.blogspot.sk/2010/11/web-service-client-with-spring-ws.html

EDIT: More details on the topic

I changed the client from tutorial I mentioned to work with my webservice I created on localhost (No SSL). It worked well, Requests and Responses was correct. Then I changed it to work with remote server. I generated new classes and set new address of the server in ApplicationContext. First error was missing commons-logging libraries. I added it. Then new error appeard (short version of that error):

org.springframework.ws.client.WebServiceIOException: I/O error: java.security.cert.CertificateException: No name matching certificatename found; nested exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No name matching certificatename found

I added my certificate to cacerts in my jdk using keytool. It didn’t help. I found something about that error and tried to add code from last post in here:

http://www.coderanch.com/t/557677/sockets/java/CertificateException-No-name-matching-hostname

It shouldn’t be very secure but I tried it. The new error was:

Exception in thread "main" org.springframework.ws.client.WebServiceTransportException: Internal Server Error [500]
at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:663)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:587)
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:537)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:384)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:378)
...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:39:09+00:00Added an answer on June 18, 2026 at 8:39 am

    I resolved the problem. I finally got access to our WS server so I could check the logs. It showed that the certificate wasn’t problem at all. The message arrived to the server correctly. The problem started when the server tried to parse my message, this failed and server then returned error 500 with error in the log:

    Unable to create envelope from given source

    Me and my colleague discovered that the server is running on Java 6 but our application is on Java 7, we tried to move our application on Java 7 private server and everything worked well. After some search we discovered that probably the parsers xalan.jar and xerces.jar are the problem, updating them could also resolve that. Anyway, using same version of Java should be the solution.

    Sadly I cannot go down to Java 6 and server cannot go up to Java 7 (details are not important). So I created completely new client using Axis and to be honest, I am very happy I made this decission. It has worked since start and it’s much easier to use. If anyone is interested, here is the tutorial I folowed (there is also of how to use generated code in the end which I needed)

    http://px.pats.no/px/Eclipse_tutorial.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to write an app that allows any number of web clients to
I am new to web services in iphone. I need to get data from
I'm trying to write a simple web service client to interact with my simple
I've got a Web Service, that need a SOAP request to do a simple
So I am trying to write a simple web service that gets the current
I am attempting to write truly RESTful web services over HTTP using ASP.NET MVC
I am new to Java web service and need to be familiar with REST
I am new to WebLogic and J2EE. I need to build a webservice that
I am totally new to web services and cannot get mine to work. My
I am new to web services and below I am sharing my understanding so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.