I'm thinking this feature of OpenBD does not work.
I have tried it on both the "Nightly Build" and "Stable Release"
Either it is broken or I simply don't know how to implement it.
So here's a simple test:
<cfcomponent>
<cffunction name="read_wsdl" returntype="string" access="remote">
<cfset retstr = "">
<cffile action="read" file="#expandpath('/api.wsdl')#"
variable="retstr">
<cfreturn retstr>
</cffunction>
</cfcomponent>
If I save this as api.cfc and bring it up in a browser as:
localhost:8080/api.cfc?wsdl
I get this:
<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://api.cfc" xmlns:intf="http://api.cfc" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/"xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" targetNamespace="http://api.cfc">
<!-- WSDL created by 3.1 -->
<wsdl:message name="read_wsdlRequest"></wsdl:message>
<wsdl:message name="read_wsdlResponse">
<wsdl:part name="read_wsdlReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="api">
<wsdl:operation name="read_wsdl">
<wsdl:input message="impl:read_wsdlRequest" name="read_wsdlRequest"/>
<wsdl:output message="impl:read_wsdlResponse" name="read_wsdlResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="api.cfcSoapBinding" type="impl:api">
<wsdlsoap:binding style="rpc" transport="
http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="read_wsdl">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="read_wsdlRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://na_svr" use="encoded"/>
</wsdl:input>
<wsdl:output name="read_wsdlResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://api.cfc" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="apiService">
<wsdl:port binding="impl:api.cfcSoapBinding" name="api.cfc">
<wsdlsoap:address location="http://localhost:8080/api.cfc"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Then if I save the wsdl with: wget localhost:8080/api.cfc?wsdl and rename
the output to api.wsdl I can then call:
http://localhost:8080/api.cfc?method=get_wsdl it returns the wsdl as a
string.
However if I then change the api.cfc file to:
<cfcomponent wsdlfile="#expandpath('/api.wsdl')#">
<cffunction name="read_wsdl" returntype="string" access="remote">
<cfset retstr = "">
<cffile action="read" file="#expandpath('/api.wsdl')#"
variable="retstr">
<cfreturn retstr>
</cffunction>
</cfcomponent>
The result is:
<http://openbd.org/manual/>*OpenBD Internal Server Error*
Need some help? Visit our manual http://openbd.org/manual/
<http://openbd.org/manual/>
*The page you were executing caused an internal server error*
Request /api.cfc
File Trace
Type Internal
Tag Context
Stack Trace
java.lang.NullPointerException
at com.naryx.tagfusion.expression.function.expandPath.expand(Unknown
Source)
at com.naryx.tagfusion.expression.function.expandPath.execute(Unknown
Source)
at com.naryx.tagfusion.cfm.parser.CFFunctionExpression.Eval(Unknown
Source)
at com.naryx.tagfusion.cfm.parser.runTime.runExpression(Unknown Source)
at com.naryx.tagfusion.cfm.tag.cfTag.getEvaluatedConstant(Unknown
Source)
at com.naryx.tagfusion.cfm.tag.cfTag.getMetaData(Unknown Source)
at com.naryx.tagfusion.cfm.tag.cfCOMPONENT.tagLoadingComplete(Unknown
Source)
at com.naryx.tagfusion.cfm.tag.cfTag.normalise(Unknown Source)
at com.naryx.tagfusion.cfm.tag.cfTag.normalise(Unknown Source)
at com.naryx.tagfusion.cfm.file.cfFile.readFile(Unknown Source)
at com.naryx.tagfusion.cfm.file.cfFile.(Unknown Source)
at com.naryx.tagfusion.cfm.file.cfmlFileCache.loadFile(Unknown Source)
at com.naryx.tagfusion.cfm.file.cfmlFileCache._getCfmlFile(Unknown
Source)
at com.naryx.tagfusion.cfm.file.cfmlFileCache.getCfmlFile(Unknown
Source)
at com.naryx.tagfusion.cfm.engine.cfSession.getFile(Unknown Source)
at com.naryx.tagfusion.cfm.engine.cfSession.getUriFile(Unknown Source)
at com.naryx.tagfusion.cfm.engine.cfSession.getRequestFile(Unknown
Source)
at com.naryx.tagfusion.cfm.xml.ws.cfcHandler.setupService(Unknown
Source)
at com.naryx.tagfusion.cfm.xml.ws.cfcHandler.generateWSDL(Unknown
Source)
at
org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:33)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:104)
at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:454)
at
org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.apache.axis.transport.http.AxisServlet.processQuery(AxisServlet.java:1233)
at
org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:249)
at com.naryx.tagfusion.cfm.cfcServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:336)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
com.newatlanta.filters.SearchEngineFriendlyURLFilter.doFilter(Unknown Source)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Expanded Debug Details - Click to expand the detailed variables
cffile <http://localhost:8080/api.cfc?wsdl#>
cfthread <http://localhost:8080/api.cfc?wsdl#>
cgi <http://localhost:8080/api.cfc?wsdl#>
client <http://localhost:8080/api.cfc?wsdl#>
cookie <http://localhost:8080/api.cfc?wsdl#>
form <http://localhost:8080/api.cfc?wsdl#>
request <http://localhost:8080/api.cfc?wsdl#>
server <http://localhost:8080/api.cfc?wsdl#>
session <http://localhost:8080/api.cfc?wsdl#>
url <http://localhost:8080/api.cfc?wsdl#>
3.1 @ 10:00:46.453 Monday, 11 July 2016
This error has been logged to
bderror-2016-07-11-100046_3496000005972833432.html. Please contact the
Administrator
On Friday, July 8, 2016 at 12:50:08 PM UTC-6, John Moss wrote:
>
> I'm having a real struggle when I try to put a cfc on a host behind the
> google load balancer:
>
> The REST invokation of the methods in the file work just fine, but the
> SOAP does not work.
> I can add the service reference to the api in Visual Studio and it sees
> all of the methods, so it successfully reads the WSDL file I think.
> When I make any call to any of the methods it does not work though.
> Looking at the wsdl generated, it looks like the path to the servers
> behind the load balancer needs to be modified.
> The https is http and the port might need to be changed to 8080 so ok, I
> didn't want to have to do this but I thought it would be relatively simple
> to "wget" the wsdl file and modify it, then add it to the <cfcomponent>
> like so: <cfcomponent name="myapi"
> wsdlfile="#expandpath('/wsdl')#/myapi.wsdl>
>
> It doesn't seem to ever be able to find the file I specify--I even added a
> mapping "/wsdl" to see if that made a difference.
> What I get is: *The tag produced the following error: WSDLFILE attribute
> contains invalid value. Cannot locate: /USR/LOCAL/SITE1/API/24/MYAPI.WSDL*
>
> The location where it says it cannot locate the file is the exact location
> of the file except it is in upper-case where there are no upper-case
> characters in the path.
>
> I have tried various ways to do this to no avail.
>
> Does anyone out there have experience with this they could share?
>
> Thanks!
> -John Moss
>
--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en
---
You received this message because you are subscribed to the Google Groups "Open
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.