Solved

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

Posted on 2011-02-14
9
1,754 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 

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 143

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
table example 4 32
java stored proc example 9 44
How  can  i  resolve  HTTP Status 404 -? 8 41
return false must be hit after calling certain command 10 31
This tutorial will show you how to add an attribute to an XML (http://en.wikipedia.org/wiki/XML) stream returned from a Windows Communication Foundation (http://en.wikipedia.org/wiki/Windows_Communication_Foundation) (WCF) Web Service.  Some knowled…
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.

791 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