Solved

URGENT!!!  Must get webservice working with ASP in Days!!!

Posted on 2006-11-16
3
4,856 Views
Last Modified: 2008-04-08
500 points got me no response on this issue,  I'm running out of time.

I have searched extensively though Google and Experts Exchange and have not quite found the answer to this problem.  There was mention of an error like this in EE but I could not find any with something completely resolved.

Here is the scenario:

I have a .NET 2.0 c# web service that is installed under a path on our server that requires a client certificate to reach both the service and the website that will use the service (this is a client requirement and can not go away). The website however is in classic ASP, so I am having to use MSSOAP 3.0 to call the service from the ASP page. Here is the code on the ASP page:  

Dim oSOAP
Set oSOAP = Server.CreateObject("MSSOAP.SoapClient30")
oSOAP.ClientProperty("ServerHTTPRequest") = True
oSOAP.mssoapinit("http://www.myURL/web_parser/service.asmx?wsdl")

guidname1 = oSOAP.GetXMLField(guidstring, "Name1")
guidname2 = oSOAP.GetXMLField(guidstring, "Name2")
guidaddress1 = oSOAP.GetXMLField(guidstring, "Address1")
guidaddress2 = oSOAP.GetXMLField(guidstring, "Address2")
guidcity = oSOAP.GetXMLField(guidstring, "City")
guidstate = oSOAP.GetXMLField(guidstring, "State")
guidzip = oSOAP.GetXMLField(guidstring, "Zip")
guidhomephone = oSOAP.GetXMLField(guidstring, "HomePhone")
guidworkphone = oSOAP.GetXMLField(guidstring, "WorkPhone")
guidssn1 = oSOAP.GetXMLField(guidstring, "SSN1")
guidssn2 = oSOAP.GetXMLField(guidstring, "SSN2")
guiddln1 = oSOAP.GetXMLField(guidstring, "DLN1")
guiddln2 = oSOAP.GetXMLField(guidstring, "DLN2")

oSoap = Nothing


Here is the error message I'm receiving:
WSDLReader error '80020009'

WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason is: A connection with the server could not be established HRESULT=0x1: Incorrect function. - WSDLReader:Loading of the WSDL file failed HRESULT=0x80070057: The parameter is incorrect. - Client:One of the parameters supplied is invalid. HRESULT=0x80070057: The parameter is incorrect.

/orderapp/order.asp, line 119  

Line 119 is this line:
oSOAP.mssoapinit("http://www.myURL/web_parser/service.asmx?wsdl")


Now.  Is this because the ASP which is sitting on a root directory below the myURL.net path is reading the webservice also under that path and the webservice can not work correctly in the HTTPS environment without the client certificate installed on the server?  (Actually,  I've moved the webservice to a virtual directory on my server without the client certificate requirement and I'm still getting the error above)

A quick look at the event veiwer on the Server shows that the request can not access the wsdl file. Is this because the path in the ASP page is using the URL requiring the client certificate and the Server itself does not have the certificate?

So I've tried to change the ASP page and hardcode the path to the WSDL file, assuming the server could read the direct path and bypass the requirement of the certificate,  changing the code to this:
     
Dim oSOAP
          Set oSOAP = Server.CreateObject("MSSOAP.SoapClient30")
          oSOAP.ClientProperty("ServerHTTPRequest") = True
          oSOAP.mssoapinit("C://myservicepath/mywsdlfile.wsdl")
                   
               guidname1 = oSOAP.GetXMLField(guidstring, "Name1")
               guidname2 = oSOAP.GetXMLField(guidstring, "Name2")
               guidaddress1 = oSOAP.GetXMLField(guidstring, "Address1")
               guidaddress2 = oSOAP.GetXMLField(guidstring, "Address2")
               guidcity = oSOAP.GetXMLField(guidstring, "City")
               guidstate = oSOAP.GetXMLField(guidstring, "State")
               guidzip = oSOAP.GetXMLField(guidstring, "Zip")
               guidhomephone = oSOAP.GetXMLField(guidstring, "HomePhone")
               guidworkphone = oSOAP.GetXMLField(guidstring, "WorkPhone")
               guidssn1 = oSOAP.GetXMLField(guidstring, "SSN1")
               guidssn2 = oSOAP.GetXMLField(guidstring, "SSN2")
               guiddln1 = oSOAP.GetXMLField(guidstring, "DLN1")
               guiddln2 = oSOAP.GetXMLField(guidstring, "DLN2")
               
          oSoap = Nothing

This did on appearance get past line 119.  Here is my error now:

Connector error '800a1527'

Connector:Connection time out. HRESULT=0x800A1527 - Client:An unanticipated error occurred during the processing of this request. HRESULT=0x800A1527 - Client:Sending the Soap message failed or no recognizable response was received HRESULT=0x800A1527 - Client:Unspecified client error. HRESULT=0x800A1527

/orderapp/order.asp, line 121


SO  does this mean that the ASP page did initialize the WSDL?  If so why can it not call the webmethod "oSOAP.GetXMLField"  which takes the guidstring  which is the name of the XML file its trying to read, and the "Feild" string which is the node name in the XML document of which I want the value to return?

This is considered Urgent because we have to have this ready to go in a matter of days, otherwise I'd be writing a .NET website right now.  Any help would be great!
0
Comment
Question by:icserve
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
carlmahon earned 500 total points
ID: 17969452
I would think that you first thought of using the web address is correct.

Since the script runs on the same server, is the DNS correctly set to loop back to a site on the same server? I have seen issues where firewalls will block such requests and the only way around is to use internal DNS.

Also since you are using HTTPS do you need to change
oSOAP.mssoapinit("http://www.myURL/web_parser/service.asmx?wsdl")
to
oSOAP.mssoapinit("https://www.myURL/web_parser/service.asmx?wsdl")

Other thought being that the http is not configured for that script.
0
 
LVL 1

Author Comment

by:icserve
ID: 17981170
First an apology.

I changed the line of code on the web URL for privace sake,  But yes we have the correct URL in the oSOAP.mssoapinit line of code where it is including the "https"  instead of the posted "http".


I just found out by the system's admin we're using an internal DNS so I'm going to try putting in the direct IP address on the code.  I'll post the results.

0
 
LVL 1

Author Comment

by:icserve
ID: 17983304
I have figured out the issue I was having.  Carlmahon definately pointed me in the right direction.   The issue was the IP address of the URL strings.  


First I went ahead and made a virtual directory and placed the webservice onto a IP address on our webserver not requiring the client certificate.   This allowed the webpage which does require the certificate to access the service for XML parsing.

Once I change the following line:
oSOAP.mssoapinit("https://www.myURL/web_parser/service.asmx?wsdl")


to

oSOAP.mssoapinit("http://IPA.DDR.E.SS/webservice/service.asmx?wsdl")

The XML document was parsed correctly and the values I needed were placed in the correct HTML objects for the Order Entry website in classic ASP

If I assign the points for this,  then Points to carlmahon.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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