Solved

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

Posted on 2011-02-14
9
1,738 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
Comment Utility
>>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
Comment Utility

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

Author Comment

by:HarishVembu
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 27

Assisted Solution

by:BigRat
BigRat earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
>> 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]
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
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.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now