Results 1 to 9 of 9

Thread: [2005] problem accessing xml webservice from SOAP Requests only?

  1. #1

    Thread Starter
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    [2005] problem accessing xml webservice from SOAP Requests only?

    Hello all,
    i have built a web service using visual studio .net 2005, (language : VB).
    this web service contains several method each returning a dataset.

    when i try to access this webservice from any .net platform ( VB.net windows application or any asp.net page). it works very fine.

    the problem is , we are now working with a foreign partner who uses saop requests from PHP on a linux platform to access our webservice. he simply can't. he can only get the schema for the web service which i think he got from the web service description itself.

    is there any attribute that must be implemented on the web service from inside in order to enable access of non .net platforms on the service ?


    thank yoooooooou

    RGDS

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: [2005] problem accessing xml webservice from SOAP Requests only?

    I don't think there is anything special you have to do to enable you web service to be called from SOAP.

    I have written a few web services that have been consumed from VBScripts and from external (non .Net) apps.

    When you say "he simply can't", what do you mean? Is he getting error messages (i.e., invalid XML) or is he just not calling it properly?

    When you browse out to your web service page and look at a specific function, does it have both a SOAP and an HTTP post function?

  3. #3

    Thread Starter
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: [2005] problem accessing xml webservice from SOAP Requests only?

    dear negative


    http://urlaubstours.fox-egypt.com/service.asmx


    here is the link to my service, it is already online. in its description as you can see by yourself, it allows soup 1.1 ad soup 1.2

    thank you for your help

    rgds

  4. #4
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: [2005] problem accessing xml webservice from SOAP Requests only?

    It is a pretty standard web service call, what is your developer saying that he cannot do?

  5. #5

    Thread Starter
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: [2005] problem accessing xml webservice from SOAP Requests only?

    that is copy of his email ( frankly i dont understand him) :

    ---------------------------------------------------------
    have tested your WebService with soapRequests. It works fine, but i receive only an schema not valid data.


    I have send the follow Request:


    <?xml version="1.0" encoding="ISO-8859-1"?>

    <soapenv:Envelope xmlns:typ="http://www.softexsw.info/GetHotelsData" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

    <soapenv:Body>

    <typ:GetHotelsData>

    <GetHotelsData xmlns="http://www.softexsw.info/">

    <Agentname>username1</Agentname>

    <AgentPassword>password1</AgentPassword>

    </GetHotelsData>

    </typ:GetHotelsData>

    </soapenv:Body>

    </soapenv:Envelope>


    And i have receive the follow response:


    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <soap:Body>

    <GetHotelsDataResponse xmlns="http://www.softexsw.info/">

    <GetHotelsDataResult>

    <xs:schema id="Hotels" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">

    <xs:element name="Hotels" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">

    <xs:complexType>

    <xs:choice minOccurs="0" maxOccurs="unbounded" />

    </xs:complexType>

    </xs:element>

    </xs:schema>

    <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" />

    </GetHotelsDataResult>

    </GetHotelsDataResponse>

    </soap:Body>

    </soap:Envelope>

    ------------------End if his message

    in later email, he mentioned that he is using php pages on a linux platform

    that is why i can't help him, i know nothing about webservices outside the .net framework

    thank you again for your time

  6. #6
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: [2005] problem accessing xml webservice from SOAP Requests only?

    Well I tried calling it directly from SOAP and got the same response as your PHP developer.

    I also created my own web service, which returned a dataset object and my SOAP response came back as expected:

    Web Service Code:
    Code:
        [WebMethod]
        public DataSet  HelloWorld() {
            DataSet myDS = new DataSet();
            DataTable myDT = myDS.Tables.Add();
            string[] x= { "1", "2" };
    
            myDT.Columns.Add("Col1");
            myDT.Columns.Add("Col2");
    
            for(int i = 0;i<5;i++)
                myDT.Rows.Add(x);
    
            return myDS;
    
    
        }
    SOAP Response from that call
    Code:
      <?xml version="1.0" encoding="utf-8" ?> 
    - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <soap:Body>
    - <HelloWorldResponse xmlns="http://tempuri.org/">
    - <HelloWorldResult>
    - <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    - <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
    - <xs:complexType>
    - <xs:choice minOccurs="0" maxOccurs="unbounded">
    - <xs:element name="Table1">
    - <xs:complexType>
    - <xs:sequence>
      <xs:element name="Col1" type="xs:string" minOccurs="0" /> 
      <xs:element name="Col2" type="xs:string" minOccurs="0" /> 
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:choice>
      </xs:complexType>
      </xs:element>
      </xs:schema>
    - <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    - <NewDataSet xmlns="">
    - <Table1 diffgr:id="Table11" msdata:rowOrder="0" diffgr:hasChanges="inserted">
      <Col1>1</Col1> 
      <Col2>2</Col2> 
      </Table1>
    - <Table1 diffgr:id="Table12" msdata:rowOrder="1" diffgr:hasChanges="inserted">
      <Col1>1</Col1> 
      <Col2>2</Col2> 
      </Table1>
    - <Table1 diffgr:id="Table13" msdata:rowOrder="2" diffgr:hasChanges="inserted">
      <Col1>1</Col1> 
      <Col2>2</Col2> 
      </Table1>
    - <Table1 diffgr:id="Table14" msdata:rowOrder="3" diffgr:hasChanges="inserted">
      <Col1>1</Col1> 
      <Col2>2</Col2> 
      </Table1>
    - <Table1 diffgr:id="Table15" msdata:rowOrder="4" diffgr:hasChanges="inserted">
      <Col1>1</Col1> 
      <Col2>2</Col2> 
      </Table1>
      </NewDataSet>
      </diffgr:diffgram>
      </HelloWorldResult>
      </HelloWorldResponse>
      </soap:Body>
      </soap:Envelope>

  7. #7

    Thread Starter
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: [2005] problem accessing xml webservice from SOAP Requests only?

    ok then,

    any suggessytions, What did i do wrong ????

    and always thank you for your help and time

  8. #8

    Thread Starter
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: [2005] problem accessing xml webservice from SOAP Requests only?

    Dear negative,
    can you post the original request you that resulted this respond. i need to check it because i dont think the problem is in the service . i think they are doing the request wrong

    thank you again.

  9. #9
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: [2005] problem accessing xml webservice from SOAP Requests only?

    I don't have a copy of it in front of me (it is on my home machine), but I hacked up this app by visual ad to do the HTTP post:

    http://www.vbforums.com/showthread.php?t=334645

    I just made the HTTP post look exactly like the example post in the SOAP example on the web service function page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width