none
Problems connecting to SOAP endpoint RRS feed

  • Question

  • Running SQL Server 2005 SP3. I have a SOAP Endpoint created, and am trying to connect to it via Android. I have been trying to fix things on the Android end, but it is now seeming like there are problems on the server side. Here is my SOAP Endpoint:

    CREATE ENDPOINT [DroidTest2] 
    	AUTHORIZATION [MYDOMAIN\cgtyoder]
    	STATE=STARTED
    	AS HTTP (PATH=N'/dt2', PORTS = (SSL, CLEAR), AUTHENTICATION = (NTLM, KERBEROS, INTEGRATED), SITE=N'*', CLEAR_PORT = 88, SSL_PORT = 444, COMPRESSION=DISABLED)
    	FOR SOAP (
    WEBMETHOD 'DroidFunction'( NAME=N'[pubs].[dbo].[DroidFunction]'
    , SCHEMA=DEFAULT
    , FORMAT=ROWSETS_ONLY), BATCHES=DISABLED, WSDL=N'[master].[sys].[sp_http_generate_wsdl_defaultcomplexorsimple]', SESSIONS=DISABLED, SESSION_TIMEOUT=60, DATABASE=N'pubs', NAMESPACE=N'http://tempuri.org', SCHEMA=STANDARD, CHARACTER_SET=XML)
    GO
    
    
    'DroidFunction' is a simple function which takes a string (varchar(20)) and returns another string (varchar(30)).

    I can get the WSDL in a browser by going to http://localhost:88/dt2?wsdl or https://localhost:444/dt2?wsdl and using HTTP authentication. However, when I use SOAP validation utilities such as soapUI or Web Service Studio, it complains about the WSDL not being formed correctly. (soapUI can't even connect to the endpoint, but it has no problem with this public sample: http://www.w3schools.com/webservices/tempconvert.asmx.)

    Are there known issues here that I am missing? What should I try next? (I realize that this is deprecated in Server 2008; I have a ton of time invested here that I would prefer not go to waste but if writing an ASP.NET web app is the only way I am going to be able to connect, then...)

    Friday, June 3, 2011 9:39 PM

Answers

  • See http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/7619d2e0-a5eb-4379-b027-234103e7f171 for more detail and the answer to my problems.
    • Marked as answer by cgtyoder Monday, August 22, 2011 7:20 PM
    Monday, August 22, 2011 7:20 PM

All replies

  • Hello,

    Have you tried to use the parameter "WSDL=DEFAULT" instead of "WSDL='sp_somewhat...'"?


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing
    Monday, June 6, 2011 11:46 AM
  • Yes, I did that - what is above is what comes up when I do a 'drop & create' in SQL Mgt Studio.
    Monday, June 6, 2011 11:56 AM
  • When I test the WSDL on Web Service Studio Express, I get the error:

    The root element of a W3C XML Schema should be <schema> and its namespace should be 'http://www.w3.org/2001/XMLSchema'.

    This happens whether I use the sp_http_generate_wsdl_defaultcomplexorsimple or sp_http_generate_wsdl_defaultsimpleorcomplex WSDL.

    Tuesday, June 7, 2011 1:50 PM
  • Well, I got past part of the problem. Foolishly, I believed that performing a "Script Endpoint as -> DROP And CREATE To -> New Query Editor Window" would in fact give you the same parameters as when the endpoint was created. Sadly, it does not. I created it with the SOAP option 'LOGIN_TYPE = MIXED', but that did not appear in the CREATE ENDPOINT call when I ran the above (MIXED is not the default; WINDOWS is).

    So now I am passing the XML (below) to it (I also changed the WSDL to sp_http_generate_wsdl_defaultsimpleorcomplex; PORTS is now only SSL, and AUTHENTICATION is now only BASIC), and I am getting a 500 Internal Server Error. Here is the XML being sent:

    <v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:d="http://www.w3.org/2001/XMLSchema" 
    xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
    
    <v:Header>
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken>
    <wsse:Username>cgtyoder</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">sooperSekrit</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </v:Header>
    
    <v:Body>
    <DroidFunction xmlns="http://tempuri.org" id="o0" c:root="1">
    <inputString i:type="d:string">Hello Ya</inputString>
    </DroidFunction>
    </v:Body>
    </v:Envelope>\r\n
    
    

    Does there appear to be any problem with that? (I am also authenticating in the http header.) Thanks for any input.

    Wednesday, June 8, 2011 5:24 PM
  • Is there any reference for the protocol for how a client should communicate with this XML Web Services Endpoint? I can't find any details.
    Friday, June 10, 2011 8:40 PM
  • So, because this feature is deprecated, does that mean there is no priority subscriber support here?
    Monday, June 13, 2011 2:17 PM
  • See http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/7619d2e0-a5eb-4379-b027-234103e7f171 for more detail and the answer to my problems.
    • Marked as answer by cgtyoder Monday, August 22, 2011 7:20 PM
    Monday, August 22, 2011 7:20 PM