Well, there's one other difference: both the CFARGUMENT's have "required"
and "default". If you think about it, these are mutually exclusive. If you
must specify an arg, then there's no need for a default. Of course, it's CF
that shouldn't allow them, and I don't know that they should result in the
behavior you've seen (the duplicate xsd), but why not at least try removing
the default attribute?

(I seem to recall some other issue with these attributes being used
together, in the past, but don't recall the details.)

You might want to also declare the type for the cfargs, since it appears
both should be numeric. No sense letting mistakes in the input hurt you. But
do add that only after you remove the default. Let's see (And let us know)
which, if any, work.

If not, you might try adding a cfargument to the working methods, with the
attributes like the others, to see if they fail. That would at least confirm
that it's the CFARGUMENT.

/charlie


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Gerry Gurevich
Sent: Tuesday, May 26, 2009 9:39 PM
To: [email protected]
Subject: [ACFUG Discuss] Web Service Problem

I'm trying to publish a web service for other users to consume.  I'm
running into a problem with the returned soap envelope.  Please note
that I can consume these services with CFINVOKE. That is not the
problem. I'm trying to consume them on another platform.  Any help
would be greatly appreciated.

Here are more details and the cfc is listed below.

The WSDL definition comes out just fine.  And the two hello calls work
out just as expected.  However when I try to call the add or echo
functions, I get the following error:

 -- Attribute "xsd" bound to namespace "http://www.w3.org/2000/xmlns/";
was already specified for element "soap:Envelope"

The only difference that I can determine is that the add and echo
functions have parameters while the hello methods do not.  Here is a
sample SOAP message with the error:

<?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";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding"; ><soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";><SI:echo
xmlns:SI="http://ws.hero.ncea";><in
xsi:type="xsd:anyType">123</in></SI:echo></soap:Body></soap:Envelope>

Note that there is a duplicate entry for xmlns:xsd in the soap envelope.

Here is a listing for my web service:  simple.cfc

 <cfcomponent output="false">

       <cffunction name = "hello" output="no" returntype="string"
access="remote">
            <cfreturn 'Hello World'>
      </cffunction>

      <cffunction name = "hello2" output="no" returntype="string"
access="remote">
            <cfset strOut="Hello World">
            <cfreturn strOut>
      </cffunction>

      <cffunction name = "add" output="no" returntype="numeric"
access="remote">
            <cfargument name="add1" required="yes" default="0" hint="" />
            <cfargument name="add2" required="yes" default="0" hint="" />
            <cfset var sum = "">
            <cfset sum=arguments.add1+arguments.add2>
            <cfreturn sum>
      </cffunction>

      <cffunction name = "echo" output="no" returntype="string"
access="remote">
            <cfargument name="in" required="yes" default="0" hint="" />
            <cfreturn '#arguments.in#'>
      </cffunction>
</cfcomponent>


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=gin.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------






-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to