Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
CF_Geliebter #1
webservice could not generate stub object
Hi,
I am trying to make a simple web service. the .cfc file works as .cfc?wsdl
browsing. when I invoke it as component name, it's work fine too. but when I
try to invoke it as webservice then it shows error "Could not generate stub
object for web service invocation." Here I am giving a sample example.
1. [url]http://localhost/_com/testws.cfc?wsdl[/url]
<cfcomponent output="yes" >
<cffunction name="getServiceValue" returntype="string" access="remote" >
<cfreturn "this is the first web service output.">
</cffunction>
</cfcomponent>
2. [url]http://localhost/_test/testinvoke.cfm[/url]
<cfinvoke webservice=" [url]http://localhost/_com/Dataview.cfc?WSDL[/url] "
method="getServiceValue" returnvariable="returnedText"/>
<!--- <cfinvoke component="_com.testws" method="getServiceValue"
returnvariable="returnedText"/> ---->
<cfoutput> #variables.returnedText# </cfoutput>
Error :
Could not generate stub objects for web service invocation.
Name: [url]http://localhost/_com/Dataview.cfc?WSDL[/url] . WSDL:
[url]http://localhost/_com/Dataview.cfc?WSDL[/url] . org.xml.sax.SAXException: Fatal
Error: URI=null Line=1: Content is not allowed in prolog. 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.
Do you have any idea to resolve it?
Thanking in advance.
CF_Geliebter Guest
-
WebService stub generation
Hello, As many people which try to use the AS3 stub generation from WSDL, I have problems because the generated code is not working with... -
webservice.htc and custom object array. only first object is deserialized in the result.value
Hello I've been using webservice.htc for 6 months or so with great results. recently i came into the following problem that I am not sure how to... -
Could not generate stub objects for web serviceinvocation
When I try to connect to a webservice I get thi error message: Could not generate stub objects for web service invocation Does anyone know what... -
COM object in webservice
Is there some sort of restriction for instantiating a COM object in a ..NET webservice? I have a method inside my webservice that instantiates a... -
could not COM object in webservice
Hello, thanks in advance.. Problem I have a I created a c# windows class library SLR.License which has only method GenLicKey, which inturn... -
CF_Geliebter #2
Re: webservice could not generate stub object
Could any of you help me on above problem?
thx...
CF_Geliebter Guest
-
Tom Jordahl #3
Re: webservice could not generate stub object
There is something wrong with the WSDL that is being retrieved by cfinvoke.
The key is the error: "Content is not allowed in prolog." There is
something in the WSDL XML that isn't XML. Check 'view source' in a browser.
--
Tom Jordahl
Macromedia Server Development
Tom Jordahl Guest
-
CF_Geliebter #4
Re: webservice could not generate stub object
Hi Tom,
Thank you very much for the answer. here is the view source I have attached
here. I don't see any wrong in the XML. I am not so good. could you please
have a look on this? Thanking you in advance again .
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://_com"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://_com"
xmlns:intf="http://_com"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="http://rpc.xml.coldfusion"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Macromedia ColdFusion MX version 7,0,0,91690-->
<wsdl:types>
<schema targetNamespace="http://rpc.xml.coldfusion"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="CFCInvocationException">
<sequence/>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getServiceValueRequest">
</wsdl:message>
<wsdl:message name="getServiceValueResponse">
<wsdl:part name="getServiceValueReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="CFCInvocationException">
<wsdl:part name="fault" type="tns1:CFCInvocationException"/>
</wsdl:message>
<wsdl:portType name="testws">
<wsdl:operation name="getServiceValue">
<wsdl:input message="impl:getServiceValueRequest"
name="getServiceValueRequest"/>
<wsdl:output message="impl:getServiceValueResponse"
name="getServiceValueResponse"/>
<wsdl:fault message="impl:CFCInvocationException"
name="CFCInvocationException"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="testws.cfcSoapBinding" type="impl:testws">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getServiceValue">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getServiceValueRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://_com" use="encoded"/>
</wsdl:input>
<wsdl:output name="getServiceValueResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://_com" use="encoded"/>
</wsdl:output>
<wsdl:fault name="CFCInvocationException">
<wsdlsoap:fault
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
name="CFCInvocationException" namespace="http://_com" use="encoded"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="testwsService">
<wsdl:port binding="impl:testws.cfcSoapBinding" name="testws.cfc">
<wsdlsoap:address location="http://localhost/_com/testws.cfc"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
CF_Geliebter Guest
-
Tom Jordahl #5
Re: webservice could not generate stub object
Perhaps you are using a DevNet edition that puts a watermark in the output?
I have no problems with that WSDL.
--
Tom Jordahl
Macromedia Server Development
Tom Jordahl Guest



Reply With Quote

