Matthew,
Looks like there was a firewall rule breaking communication with port
7090. Once I cleared that up, I was able to execute this code:
<cfset args = StructNew()>
<cfset args.body.query = "water">
<cfset args.body.recordSchema = "dc">
<cfinvoke
webservice="http://linkdev.library.utoronto.ca/alan/srw-sample-service.wsdl"
method="searchRetrieveOperation"
argumentCollection="#args#"
returnVariable = "x"
>
</cfinvoke>
<cfoutput>
#x.version#<br>
#x.numberOfRecords#<br>
</cfoutput>
and get back these results:
1.1
10000
Now I just have to figure out how to address the records in the
structure returned to Cold Fusion.
Thanks for your help with this.
Alan
Matthew J. Dovey wrote:
>Odd, as far as I can tell, the WSDL you have is correct, and clearly
>gives port 7090, which makes me suspect a problem with ColdFusion. I
>don't have CF, so can't do much testing of this myself.
>
>Matthew
>
>
>
>>-----Original Message-----
>>From: Z39.50 Next-Generation Initiative [mailto:[log in to unmask]]
>>On Behalf Of Alan Darnell
>>Sent: 02 April 2004 22:50
>>To: [log in to unmask]
>>Subject: Re: Cold Fusion and Web Services
>>
>>Some more progress with the new draft schema and this CF code:
>>
>>----
>><cfset args = StructNew()>
>><cfset args.body.query = "water">
>><cfinvoke
>>
>>webservice="http://linkdev.library.utoronto.ca/alan/srw-sample
>>-service.wsdl"
>> method="searchRetrieveOperation"
>> argumentCollection="#args#"
>> >
>>----
>>
>>But I'm now seeing this error:
>>
>>Could not perform web service invocation "searchRetrieveOperation"
>>because AxisFault faultCode: {http://xml.apache.org/axis/}HTTP
>>faultSubcode: faultString:
>>(404)Not Found faultActor:
>>faultNode: faultDetail: {}string: return code: 404
>><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML
>>2.0//EN"> <HTML><HEAD> <TITLE>404
>>Not Found</TITLE> </HEAD><BODY>
>><H1>Not Found</H1> The requested URL /voyager was
>>not found on this server.<P> <HR>
>><ADDRESS>Web Server at z3950.loc.gov Port
>>80</ADDRESS> </BODY></HTML>
>>
>>I know that the service resides on port 7090 of z3950.loc.gov
>>and have used that in the WSDL file, but something seems to
>>be forcing it to port 80:
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><!-- ZiNG SRU/SRW WSDL Specification -->
>><!-- Version 1.1 -->
>><!-- 17 Feb 2004 -->
>>
>><definitions
>>xmlns:srw-bindings="http://www.loc.gov/zing/srw/srw-bindings/"
>>xmlns="http://schemas.xmlsoap.org/wsdl/"
>>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>>xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>>targetNamespace="http://www.loc.gov/zing/srw/srw-sample-service/"
>>name="SRW">
>> <import namespace="http://www.loc.gov/zing/srw/srw-bindings/"
>>location="http://samantha.oucs.ox.ac.uk:8080/srw1-1/srw-bindin
>>gs.wsdl"/>
>> <service name="SRWSampleService">
>> <port name="SRW" binding="srw-bindings:SRW-SoapBinding">
>> <soap:address location="http://z3950.loc.gov:7090/voyager?"/>
>> </port>
>> <port name="ExplainSOAP"
>>binding="srw-bindings:Explain-SoapBinding">
>> <soap:address location="http://z3950.loc.gov:7090/voyager?"/>
>> </port>
>> <port name="ExplainHTTPGet"
>>binding="srw-bindings:Explain-HTTPGetBinding">
>> <http:address location="http://z3950.loc.gov:7090/voyager?"/>
>> </port>
>> </service>
>></definitions>
>>
>>Alan
>>Matthew J. Dovey wrote:
>>
>>
>>
>>>Alan,
>>>
>>>It appears to be a bug in the more recent versions of Axis
>>>
>>>
>>in handling
>>
>>
>>>simple XML schema types in global elements!
>>>
>>>Try using the new draft schemas at
>>>http://samanatha.oucs.ox.ac.uk:8080/srw1-1
>>>
>>>Matthew
>>>
>>>
>>>
>>>
>>>
>>>>-----Original Message-----
>>>>From: Z39.50 Next-Generation Initiative
>>>>
>>>>
>>[mailto:[log in to unmask]] On Behalf
>>
>>
>>>>Of Alan Darnell
>>>>Sent: 02 April 2004 00:32
>>>>To: [log in to unmask]
>>>>Subject: Re: Cold Fusion and Web Services
>>>>
>>>>Matthew,
>>>>
>>>>I'm using the 27 February version which includes this
>>>>
>>>>
>>relevant chunk:
>>
>>
>>>> <xsd:element name="term" type="termType" nillable="false"/>
>>>><xsd:complexType name="termType">
>>>> <xsd:all>
>>>> <xsd:element ref="value"/>
>>>> <xsd:element ref="numberOfRecords" minOccurs="0"/>
>>>> <xsd:element ref="displayTerm" minOccurs="0"/>
>>>> <xsd:element ref="whereInList" minOccurs="0"/>
>>>> <xsd:element ref="extraTermData" minOccurs="0"/>
>>>> </xsd:all>
>>>> </xsd:complexType>
>>>> <xsd:element name="value" type="xsd:string" nillable="false"/>
>>>><xsd:element name="displayTerm" type="xsd:string"
>>>>
>>>>
>>nillable="false"/>
>>
>>
>>>><xsd:element name="whereInList">
>>>> <xsd:simpleType>
>>>> <xsd:restriction base="xsd:string">
>>>> <xsd:enumeration value="first"/>
>>>> <xsd:enumeration value="last"/>
>>>> <xsd:enumeration value="only"/>
>>>> <xsd:enumeration value="inner"/>
>>>> </xsd:restriction>
>>>> </xsd:simpleType>
>>>> </xsd:element>
>>>>
>>>>Alan
>>>>
>>>>Matthew J. Dovey wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Alan,
>>>>>
>>>>>Can you check the date of the srw-types.xsd file you are using. It
>>>>>should be 27 February. An earlier version had a missing
>>>>>
>>>>>
>>>>>
>>>>>
>>>>definition for
>>>>
>>>>
>>>>
>>>>
>>>>>the whereInList type.
>>>>>
>>>>>Matthew
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>-----Original Message-----
>>>>>>From: Z39.50 Next-Generation Initiative
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>[mailto:[log in to unmask]] On Behalf
>>>>
>>>>
>>>>
>>>>
>>>>>>Of Alan Darnell
>>>>>>Sent: Thursday, April 01, 2004 11:52 PM
>>>>>>To: [log in to unmask]
>>>>>>Subject: Cold Fusion and Web Services
>>>>>>
>>>>>>I'm wondering if anyone has any experience using the Web Services
>>>>>>support in Cold Fusion MX against and SRW Web Service. The
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>WSDL file
>>>>
>>>>
>>>>
>>>>
>>>>>>I point to is based on "srw-sample-service.wsdl", where I've used
>>>>>>"http://z3950.loc.gov/voyager" as the location attribute for
>>>>>>"soap:address". I point to this WSDL file from Cold Fusion
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>using the
>>>>
>>>>
>>>>
>>>>
>>>>>>CFINVOKE tag and try to call the method searchRetrieveOperation as
>>>>>>follows:
>>>>>>
>>>>>><cfinvoke
>>>>>>
>>>>>>webservice="http://test.library.utoronto.ca/srw-sample-ser
>>>>>>
>>>>>>
>>vice.wsdl"
>>
>>
>>>>>> method="searchRetrieveOperation"
>>>>>> returnVariable="myrecords">
>>>>>> <cfinvokeargument name="version" value="1.1">
>>>>>> <cfinvokeargument name="query" value="water"> </cfinvoke>
>>>>>>
>>>>>>
>>>>>>All the dependent WSDL files are included but Cold Fusion
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>stops with
>>>>
>>>>
>>>>
>>>>
>>>>>>this error:
>>>>>>
>>>>>>17:38:17.017 - Application Exception - in
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>D:\web-dir\lc_search.cfm :
>>>>
>>>>
>>>>
>>>>
>>>>>>line 6
>>>>>> []coldfusion.jsp.CompilationFailedException: Errors
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>reported
>>>>
>>>>
>>>>
>>>>
>>>>>>by Java compiler:
>>>>>>Found 1 semantic error compiling
>>>>>>"C:/CFusionMX/stubs/WS-2014337397/gov/loc/www/zing/srw/TermT
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>ype.java":
>>>>
>>>>
>>>>
>>>>
>>>>>> 44. public gov.loc.www.zing.srw._whereInListType0
>>>>>>getWhereInList() {
>>>>>> <--------------->
>>>>>>*** Error: Type gov/loc/www/zing/srw/_whereInListType0 was
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>not found.
>>>>
>>>>
>>>>
>>>>
>>>>>>.
>>>>>>Any help would be appreciated.
>>>>>>
>>>>>>Alan
>>>>>>
>>>>>>---
>>>>>>
>>>>>>Alan Darnell
>>>>>>University of Toronto
>>>>>>P: 416 946 7706
>>>>>>
>>>>>>
>>>>>>----
>>>>>>WSDL file
>>>>>>
>>>>>><?xml version="1.0" encoding="UTF-8"?>
>>>>>><!-- ZiNG SRU/SRW WSDL Specification -->
>>>>>><!-- Version 1.1 -->
>>>>>><!-- 17 Feb 2004 -->
>>>>>>
>>>>>><definitions
>>>>>>xmlns:srw-bindings="http://www.loc.gov/zing/srw/srw-bindings/"
>>>>>>xmlns="http://schemas.xmlsoap.org/wsdl/"
>>>>>>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>>>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>>xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>>>>>>xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>>>>>>targetNamespace="http://www.loc.gov/zing/srw/srw-sample-service/"
>>>>>>name="SRW">
>>>>>><import namespace="http://www.loc.gov/zing/srw/srw-bindings/"
>>>>>>location="srw-bindings.wsdl"/>
>>>>>><service name="SRW">
>>>>>> <port name="SRW" binding="srw-bindings:SRW-SoapBinding">
>>>>>> <soap:address location="http://z3950.loc.gov/voyager"/>
>>>>>> </port>
>>>>>> <port name="ExplainSOAP"
>>>>>>binding="srw-bindings:Explain-SoapBinding">
>>>>>> <soap:address location="http://z3950.loc.gov/voyager"/>
>>>>>> </port>
>>>>>> <port name="ExplainHTTPGet"
>>>>>>binding="srw-bindings:Explain-HTTPGetBinding">
>>>>>> <http:address location="http://z3950.loc.gov/voyager"/>
>>>>>> </port>
>>>>>></service>
>>>>>></definitions>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
|