1 Reply Latest reply on Nov 25, 2015 1:27 PM by BKBK

    Webservice newbie question

    jmcconathy Level 1

      I am setting up a web service on my Coldfusion 10 server.

       

      I created this CFC...

       

      <cfcomponent>

         <cffunction name="helloWorld" returnType="string" access="remote">

            <cfreturn "Hello World!">

         </cffunction>

      </cfcomponent>

       

      I try to call it like this...

       

      <cfset wsURL = "http://txedtylvms031/cf-bin/Components/hello.cfc?wsdl">

      <cfinvoke

        webservice = "#wsURL#"

        method = "helloWorld"

        returnVariable = "result">

      <cfoutput> <H1> #result# </H1></cfoutput>

       

      I get this error

       

      Cannot perform web service invocation helloWorld.

      The fault returned when invoking the web service operation is:

      org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed

      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)

      at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:124)

      at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:68)

      at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.j ava:354)

      at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)

      at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java :229)

      at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

      at cfbin.components.CfBinComponentsHelloCfcStub.helloWorld(CfBinComponentsHelloCfcStub.java: 189)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce... ''

       

      The error occurred in D:/Inetpub/wwwroot/cf-bin/Jay/jwshello.cfm: line 5

      3 : webservice = "#wsURL#"

      4 : method = "helloWorld"

      5 : returnVariable = "result">

      6 : <cfoutput> <H1> #result# </H1></cfoutput>

      7 :

       

       

      I am new to webservices in CF and not sure how to resolve.

      I have done some searching but nothing has helped me understand my issue here.

      Any thoughts would be appreciated