Solved

Calling a JAX-WS based web service from Classic ASP client

Posted on 2011-02-14
9
1,747 Views
Last Modified: 2012-08-13
Hi/Hello

Context:

Calling a JEE6 based JAX-WS web service from Classic ASP client .

Problem:
I could not call the JAX-WS from my classic ASP page.

Error : I am simply getting 404 error when accessing this web service from ASP client hosted on IIS server.

Do I need to build SOAP request message and pass in the parameters?

Based on your reply I will be asking subsequent questions.


Thanks & Best Regards

Harish

JSimpCalcWebService.java
wsclient.txt
NumberFormater.java
0
Comment
Question by:HarishVembu
  • 4
  • 3
9 Comments
 
LVL 27

Assisted Solution

by:BigRat
BigRat earned 250 total points
ID: 34898573
>>Do I need to build SOAP request message and pass in the parameters

Yes. Providing that JSimpCalcWebService is actually installed as a web service. That may be the result of the 404, rather than a 500 Bad Request.
0
 

Author Comment

by:HarishVembu
ID: 34902997

Some additional information.

I am trying hit the Java Web Service (JAX-WS) from a different machine. The web service is deployed on Glassfish 3 server.

404 is somewhat puzzling . Let me check again

@BigRat - Did you check the classic ASP code for calling JAX-WS web service??

Let me know

Thanks & Best Regards

Harish
0
 
LVL 27

Assisted Solution

by:BigRat
BigRat earned 250 total points
ID: 34909281
http://www.aspfree.com/c/a/ASP/Consuming-a-WSDL-Webservice-from-ASP/

is a good example of how to do it in conventional ASP without all the SOAP stuff.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:HarishVembu
ID: 34909780
Thanks Big Rat,

I had already gone through the above link.

I am attaching a modified ASP file with SOAP request as reference . ASP is complaining on the line

xmlhttp.send SOAPRequest

when the page is submitted.

Would someone be able to go through the ASP code and suggest any modification needed in it to connect to JAX-WS web service.

Any suggestions/assistance would be much appreciated.


Thanks & Best Regards

Harish
WSSOAPClient.txt
0
 
LVL 27

Assisted Solution

by:BigRat
BigRat earned 250 total points
ID: 34914851
Yes, no problem.

xmlhttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded"

No, the content is text/xml or the newer application/xml.
0
 

Author Comment

by:HarishVembu
ID: 34917011
Yes Big Rat that's what I did exactly before and it worked. Anyway thanks for reiterating it.

Question : Is this way of sending xml over http through XMLHttp request object is similar to that of a REST POST call?

Also what's the advantages of MS-SOAP toolkit to this approach through XMLHttp request.

Let me know.

Thanks & Best Regards

Harish
0
 
LVL 27

Accepted Solution

by:
BigRat earned 250 total points
ID: 34917254
>> Is this way of sending xml over http through XMLHttp request object is similar to that of a REST POST call?

Yes, but from what I have seen the method seems overly complicated. take this example as an example :-

http://stackoverflow.com/questions/1460197/how-do-i-call-rest-webserivce-with-a-post-method-and-send-xml-data-in-c

>>Also what's the advantages of MS-SOAP toolkit to this approach through XMLHttp request.

I have no idea because I have never used it.

It is some years now since a chap called Don Box from DevelopMentor invented a simple method to access a web service instantiated as an object. His idea was very simple: An XML file would be posted to a web URL. The XML file would consist of a header, denoting the fact that it was such a request, and a body which was essentially a name of an object, a name of a method and perhaps a few parameters. Don called this SOAP for SIMPLE Object Access Protocol. Ever since then everybody else has been complicating it - as if it were too simple.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 35829852
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question