Forums & Blog

A SmarterTools-sponsored community.
Welcome to Forums & Blog Sign in | Join | Help
in Search

webservice wsdl errors on 4.0 (works fine on 2.6)

Last post 09-24-2007 10:54 AM by thertel. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 04-24-2007 12:58 PM

    Indifferent [:|] webservice wsdl errors on 4.0 (works fine on 2.6)

    Hi all!

     We have been running Smartermail v2.6 on our four servers for some time now, and we recently hit our license limit.  So we upgraded to 4.0 Professional on three of our servers (leaving 2.6 on one, that was nowhere near the limits). 

     
    The problem has come up that our Web service calls are no longer functioning on the 4.0 mail servers!  Specifically the Domain Administration (though I haven't tried the others -- I expect they would fail as well, since I'm getting a fairly generic error message). 

    I'm using ColdFusion to generate the request:

     
            <cfinvoke
                webservice="http://[ourServerIPhere]/Services/svcDomainAdmin.asmx?wsdl"
                method="GetAllDomains"
                returnVariable="domains"
            >
                <cfinvokeargument name="authUserName" value="#username#" />
                <cfinvokeargument name="authPassword" value="#password#" />
            </cfinvoke>

     
    This works fine on our 2.6 Smartermail instance, but on all of our 4.0 instances, I get the following error:

     
    Name: http://[ourServerIPhere]/Services/svcDomainAdmin.asmx?wsdl. WSDL: http://[ourServerIPhere]Services/svcDomainAdmin.asmx?wsdl. java.util.zip.ZipException: unknown compression method It is recommended that you use a web browser to retrieve and examine the requested WSDL document for correctness. If the requested WSDL document can't be retrieved or it is dynamically generated, it is likely that the target web service has programming errors.

    It looks like something has changed since the 2.6 and 4.0 versions as far as the Web Services go.  Is this a bug, or am I doing something incorrectly?  I've checked the 4.0 documentation, and it's exactly the same as the 2.6 docs -- there's no difference in the way I should be calling the remote functions.  Any ideas?

    Thanks! 

    Jonathon 

  • 04-26-2007 11:16 AM In reply to

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    My guess is there might be some sort of conflict going on with the HTTP compression that comes with SmarterMail 4.x and Coldfusion and the webservices. Try turning off the HTTP compression in the web.config file. To do that, search for <httpCompress preferredAlgorithm="default" compressionLevel="normal"> and change "normal" to "none". Then give it a shot. If that works, you can just turn off compression for certain paths such as web services.
    James Lance
    SmarterTools
  • 04-30-2007 1:19 PM In reply to

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    Thanks! I'll give that a try and get back to you -- Is this the web.config file that I should be looking for?

     C:\Program Files\SmarterTools\SmarterMail\MRS\web.config

     

    I typically don't play with configuration files -- I tend to do more harm than good when I do, so I'm a bit unfamiliar with this territory :)
     

  • 04-30-2007 1:23 PM In reply to

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    That's the one.
    James Lance
    SmarterTools
  • 05-01-2007 9:41 AM In reply to

    • tsingh
    • Not Ranked
    • Joined on 03-28-2007
    • Posts 8

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    This is what  i used to connect Coldfusion 7 to the SmarterMail 4.1 Server. I rather the CFHTTP because it gives you the most flexibility as far a sending and dealing with connection issues and stuff.

     

    <cfsavecontent variable="sendvar"><?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <GetAllDomains xmlns="http://tempuri.org/">
          <AuthUserName>admin</AuthUserName>
          <AuthPassword>PASSWORD HERE</AuthPassword>
        </GetAllDomains>
      </soap:Body>
    </soap:Envelope>
    </cfsavecontent>
    <cfhttp url="http://DOMAINNAMEHERE/Services/svcDomainAdmin.asmx" method="post" charset="utf-8" throwonerror="yes" timeout="100">
        <cfhttpparam type="Header" name="Accept-Encoding" value="deflate;q=0">
        <cfhttpparam type="Header" name="TE" value="deflate;q=0">
        <cfhttpparam type="header" name="SOAPAction" value="http://tempuri.org/GetAllDomains">
        <cfhttpparam type="XML" value="#sendvar#">
    </cfhttp>

    Filed under: , ,
  • 05-01-2007 10:31 AM In reply to

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    Thanks!  Apparently I'll have to start using cfhttp as well -- that did the trick (on two of the three anyway, there must be something funky about the third server). 

    How do you typically go about parsing the HTTP result -- create an XML object out of it and go from there? 
     

  • 05-01-2007 10:37 AM In reply to

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    James -- I did update the web.config file, but it didn't seem to have any effect.  Do I have to reboot the server for my updates to take effect?
  • 05-01-2007 10:42 AM In reply to

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    No, you wouldn't need to reboot. IIS should immediately notice any changes to the Web.Config.

     

    I thought that might have been the problem due to the "ZipException". The only thing that could be zipping anything is the compression module. 

    James Lance
    SmarterTools
  • 05-01-2007 10:42 AM In reply to

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    meddlingwithfire:
    James -- I did update the web.config file, but it didn't seem to have any effect.  Do I have to reboot the server for my updates to take effect?

    Try restarting the SM service. 

    EDIT:  Sorry, I misread the thread.  Disregrad that. 

  • 05-01-2007 10:49 AM In reply to

    • tsingh
    • Not Ranked
    • Joined on 03-28-2007
    • Posts 8

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    basically yes.  here is a snippet about parsing the GetAllDomains. I should note that this code is not written to handle errors. this was just me playing when I deployed the Smartermail 4.

    <cfscript>
       domainlist=structNew(); // store all domains here
        existingdomains=xmlparse(cfhttp.FileContent);
        existingdomains=existingdomains["soap:Envelope"]["soap:Body"]["GetAllDomainsResponse"];
        for(idxd=1;idxd LTE arraylen(existingdomains["GetAllDomainsResult"]["DomainNames"]["string"]);idxd=idxd+1){
            domainlist[existingdomains.GetAllDomainsResult.DomainNames.string[idxd].xmltext]="hi";
        }
    </cfscript>

    <cfdump var="#domainlist#"> 

     

    off topic a little another reason i like the cfhttp is that i can use SSL to encrypt the calls 

  • 05-01-2007 3:09 PM In reply to

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    Cool -- That code helps me a lot!  I've always been a bit of a putz trying to get things out of XML.  Arrays, and Lists, and Functions I'm great with -- but the whole XPath and child/parent aspects confuse me!

    I am getting results now for all of my servers too!  I was using an incorrect port for that last "funnky" server (doh!).

     Thanks to everyone for your help and suggestions!
     

  • 09-24-2007 10:54 AM In reply to

    Re: webservice wsdl errors on 4.0 (works fine on 2.6)

    Can someone give me the syntax to exclude the services directory from HTTP compression in the web.config file?

Page 1 of 1 (12 items)