Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Webservice newbie question

$
0
0

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


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>