Page 1 of 1

Web Service Issue

Posted: Sat Jan 05, 2008 7:52 am
by rahul.vk.khandelwal
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi,

I've a web service created using PHP hosted on a linux box at https://www.xyz.com/service/service.php

The folder service has basic authentication enabled so requires username/password to access.

When I try to consume this web service using my .Net code as below.
[syntax="vbnet"]Private Sub btnSync_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSync.Click
        Dim prototypeClient As New Prototype.PrototypeServer.PrototypeSoapServer()
        prototypeClient.PreAuthenticate = True
        prototypeClient.Credentials = New System.Net.NetworkCredential("abc", "xyz")
        Dim xdoc As New Xml.XmlDocument
        xdoc.Load("\Program Files\application\data.xml")
        MsgBox(prototypeClient.syncData(xdoc.InnerXml) & " Record(s) synchronized")
End Sub

It throws an exception saying ....

SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.xyz.com/service/service.php?wsdl'


Can anyone please help me to overcome this issue?

Thanks in advance.

Regards.


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Re: Web Service Issue

Posted: Sun Jan 20, 2008 11:30 pm
by samisa
The problem obviously is because the WSDL generated by PHP does not seem to be valid.

What PHP library are you using for the service? PHP Web services framework had some issues like this in the past with WSDL generation, but they were recently fixed.

Can you post the WSDL here, so that we can figure out what the exact problem is?