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

  • SEARCH
  • Home
  • 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 8135977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:35:48+00:00 2026-06-06T10:35:48+00:00

I’ve developed a basic CXF JAX-WS web service. Some details of web service, interface:

  • 0

I’ve developed a basic CXF JAX-WS web service.
Some details of web service, interface:

import javax.jws.WebService;


@WebService(name = "MesseSEI", targetNamespace = "http://default_package/")
public interface MesseSEI {

public String ResponseMesse(String input);
}

Service implementation:

import javax.jws.WebService;

@WebService(targetNamespace = "http://default_package/", endpointInterface = "MesseSEI", portName = "MessePort", serviceName = "MesseService")
public class Messe implements MesseSEI {

public String ResponseMesse(String input){
    return input + " is a good input!";
}
}

In order to invoke the web service within HTML page I use Jquery.

Jquery part is like this:

var URL = 'http://localhost:8080/Messe/services/MessePort?wsdl';
var soapMessage='<?xml version="1.0" encoding="utf-8"?>';
soapMessage +='<soapenv:Envelope xmlns:q0="http://default_package/"     xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org    /2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">';
soapMessage +='<soapenv:Body>';
soapMessage +='<q0:ResponseMesse>';
  soapMessage +='<arg0>Dolar</arg0>';
soapMessage +='</q0:ResponseMesse>';
 soapMessage +='</soapenv:Body>';
soapMessage +='</soapenv:Envelope>';
function CallService()
{
    $.ajax({
        url: URL,
        type: "POST",
        dataType: "xml",
        data: soapMessage,
    dataProcess: false,
    cache: false,
        success: function(data) { 
        alert("Success: " + data); 
        },
    complete: function(msg){
    alert(msg.status +" " + msg.statusText + " " +msg.readyState + " " + msg.redirect);
    }
    });


    return false;
}

First in Ajax call when using:

contentType: "application/xml; charset=utf-8",

in the server side Request type is displayed as OPTIONS instead of POST. By removing contentType from ajax call the request is being received normally by web service. It just give response with status 200 OK and SoapEnv is sent properly. However, in the jquery part the response can not be received, to say error call back function is invoked and within there, I just see the status of the message as 0.

While searching for similar issues, I encountered that it may be related to CORS problem but I’ve added:

jQuery.support.cors = true;

in my code.

To be clear my problem now is that, web service receives the request and sent response back with the correct SOAPenv but I guess in the client part (namely ajax jquery call) response is never received, so it just gives status as 0, and statusText as UNDEFINED.

I hope I clearly mentioned about my problem, any suggestions is appreciated. Thanks in advance.

Edit: Here are the Inbound and Outbound messages displayed in web service:

INBOUND MESSAGE

ID: 16
Address: http://localhost:8080/Deneme/services/DeepThoughtPort?wsdl
Encoding: UTF-8
Http-Method: POST
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Headers: {Accept=[application/xml, text/xml, */*; q=0.01], accept-charset=[ISO-8859-1,utf-8;q=0.7,*;q=0.7], accept-encoding=[gzip, deflate], accept-language=[en-us,en;q=0.5], cache-control=[no-cache], connection=[keep-alive], Content-Length=[299], content-type=[application/x-www-form-urlencoded; charset=UTF-8], host=[localhost:8080], origin=[null], pragma=[no-cache], user-agent=[Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]}
Payload: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://ws.skispike.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><q0:messe><arg0>Dolar</arg0></q0:messe></soapenv:Body></soapenv:Envelope>

OUTBOUND MESSAGE

ID: 16
Encoding: UTF-8
Content-Type: text/xml
Headers: {}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:messeResponse xmlns:ns2="http://ws.skispike.com/"><return>Dolar is a good input!</return></ns2:messeResponse></soap:Body></soap:Envelope>
  • 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-06T10:35:49+00:00Added an answer on June 6, 2026 at 10:35 am

    After lots of painful days, I solved my problem and I guess it will be helpful to post here. The problem is indeed Cross Domain problem. Adding:

    jQuery.support.cors = true;
    

    only do not solve the problem. In order to handle the CORS problem you need to do the following:

    In my case I publish my webservice under the Tomcat. In tomcat by following the instructions in: http://software.dzhuvinov.com/cors-filter-installation.html the problem is solved. Do not forget to add .jar to both tomcat’s /lib directory and into your service project classpath.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have some data like this: 1 2 3 4 5 9 2 6
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

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.