Hi David,
Welcome to MSDN newsgroup.
As for the calling webservice in JSP application, I think you'd consider
the following options:
1. If you're calling the webservice through JSP's serverside code(java
code), I think you have to lookup some JAVA specific webservice sdk which
can help create webservice proxy classes which simplified webservice
consuming... Elsewise, you have to use the java specific http request
component to manually send SOAP XML http request to the .net webservice
.....
2. If you're calling the webservice through webpage's clientside script
code, using the XML HTTP component as you mentioned should be ok.
Based on the code you provided, you directly send the following XML as SOAP
messageto target .net webservcie:
"<OrderDetails
xmlns='http://www.domain.com'><orderno>123456</orderno></OrderDetails>"
This is not correct since SOAP webservcie message should include the
complete SOAP envelope which contains soap headers(optional) and soap boday
(required).... To determine the correct XML soap message you should
send, I suggest you use some TCP or HTTP trace tools to trace the soap
message ( you can consuming the webservcie through .net client app first
to capture such SOAP message). And the Trace Utility in SOAP toolkit 3.0
is a good http trace tools:
#SOAP Toolkit 3.0
http://www.microsoft.com/downloads/d...0DD-CEEC-4088-
9753-86F052EC8450&displaylang=en
When you has captured the soap message , you can define a XML template file
or string that you can use to easily build a SOAP request message....
Hope helps. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "David Lozzi" <Da********@nospam.nospam>
References: <uL**************@TK2MSFTNGP11.phx.gbl>
Subject: Re: Consume web service using HTTP
Date: Mon, 16 Jan 2006 17:03:47 -0500
Lines: 75
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Message-ID: <#J**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: c-24-63-42-200.hsd1.ma.comcast.net 24.63.42.200
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
microsoft.public.dotnet.framework.webservices:1337 3
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
This is what I have so far in my classic asp page
Dim objSrvHTTP
Dim objXMLSend
Dim objXMLReceive
set objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
set objXMLSend = Server.CreateObject("MSXML2.DOMDocument")
set objXMLReceive = Server.CreateObject("MSXML2.DOMDocument")
objXMLSend.async = false
objXMLSend.loadXML "<OrderDetails
xmlns='http://www.domain.com'><orderno>123456</orderno></OrderDetails>"
objSrvHTTP.open
"POST","http://localhost/prgnrt/orderstatus.asmx/OrderDetails",false
objSrvHTTP.send objXMLSend
objXMLReceive = objSrvHTTP.responseText
Response.ContentType = "text/xml"
Response.Write(objSrvHTTP.responseText)
and I get this error:
Request format is invalid: text/xml.
The web service details are:
HTTP POST
The following is a sample HTTP POST request and response. The placeholders
shown need to be replaced with actual values.
POST /prgnrt/orderstatus.asmx/OrderDetails HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Content-Length: length
orderno=stringHTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0"?>
xmlThanks!!
--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com
"David Lozzi" <Da********@nospam.nospam> wrote in message
news:uL**************@TK2MSFTNGP11.phx.gbl...
Howdy,
I wrote a web service in .Net for my customer. My customer has another
vendor who now has to consume it but they are not using Visual Studio.
Most of their pages are jsp, and they said they need to consume this web
service using HTTP. The developer's IDE is Notepad. Yeah, weird I know.
How is this done? I guess if I can get it to run ASP, IDE independant,
that should make them happy. Any references you can point me to?
Thanks!!
--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com