I'm trying to run the JSF/AJAX example by Tor Norbye (
http://blogs.sun.com/roller/page/tor/20050709). Here is what I've done.
- downloaded and installed the AJAX Textfield component (
http://developers.sun.com/prodtech/javatools/jscreator/ea/jsc2/reference/samplecomps/ajax-components-0.96.complib.zip)
and installed it into Java Studio Creator EA2 standard tools
- downloaded his web service project file (
http://mediacast.sun.com/details.jsp?id=190)
- downloaded and installed NetBeans 4.1 IDE
- opened, compiled and deployed the web service project via NetBeans 4.1 IDE
- added the web service to JSC EA2
- the web service two methods 'define' and 'matchPrefix' work when tested through JSC's build in test interface
The application does not work. The NetBean's localhost:24848 output window shows the error at the bottom of this post.
When I look at the generated WSDL is JSC it shows this:
<?xml version="1.0" encoding="UTF-8"?><definit
ions xmlns="
http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:DictionaryS
ervice/wsd
l" xmlns:ns2="urn:DictionaryS
ervice/typ
es" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" name="DictionaryService" targetNamespace="urn:Dicti
onaryServi
ce/wsdl">
<types>
<schema xmlns="
http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:DictionaryS
ervice/typ
es" xmlns:soap11-enc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:Dicti
onaryServi
ce/types">
<complexType name="define">
<sequence>
<element name="String_1" type="string" nillable="true"/></sequenc
e></comple
xType>
<complexType name="defineResponse">
<sequence>
<element name="result" type="string" nillable="true"/></sequenc
e></comple
xType>
<complexType name="matchPrefix">
<sequence>
<element name="String_1" type="string" nillable="true"/></sequenc
e></comple
xType>
<complexType name="matchPrefixResponse"
>
<sequence>
<element name="result" type="string" nillable="true" minOccurs="0" maxOccurs="unbounded"/></s
equence></
complexTyp
e>
<element name="define" type="tns:define"/>
<element name="defineResponse" type="tns:defineResponse"/
>
<element name="matchPrefix" type="tns:matchPrefix"/>
<element name="matchPrefixResponse"
type="tns:matchPrefixRespo
nse"/></sc
hema></typ
es>
<message name="DictionaryServiceSEI
_define">
<part name="parameters" element="ns2:define"/></me
ssage>
<message name="DictionaryServiceSEI
_defineRes
ponse">
<part name="result" element="ns2:defineRespons
e"/></mess
age>
<message name="DictionaryServiceSEI
_matchPref
ix">
<part name="parameters" element="ns2:matchPrefix"/
></message
>
<message name="DictionaryServiceSEI
_matchPref
ixResponse
">
<part name="result" element="ns2:matchPrefixRe
sponse"/><
/message>
<portType name="DictionaryServiceSEI
">
<operation name="define">
<input message="tns:DictionarySer
viceSEI_de
fine"/>
<output message="tns:DictionarySer
viceSEI_de
fineRespon
se"/></ope
ration>
<operation name="matchPrefix">
<input message="tns:DictionarySer
viceSEI_ma
tchPrefix"
/>
<output message="tns:DictionarySer
viceSEI_ma
tchPrefixR
esponse"/>
</operatio
n></portTy
pe>
<binding name="DictionaryServiceSEI
Binding" type="tns:DictionaryServic
eSEI">
<soap:binding transport="
http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="define">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></
operation>
<operation name="matchPrefix">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></
operation>
</binding>
<service name="DictionaryService">
<port name="DictionaryServiceSEI
Port" binding="tns:DictionarySer
viceSEIBin
ding">
<soap:address location="
http://gpintarxplt.hrbinc.hrblock.net:28080/DictionaryService/DictionaryService" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"/
></port></
service></
definition
s>
That all looks ok to me.
Here is the error message I see displayed in NetBeans output window:
...
[#|2005-08-30T09:25:53.980
-0500|WARN
ING|sun-ap
pserver-pe
8.1_02|com
.sun.faces
.el.impl.C
oercions|_
ThreadID=1
9;|Attempt
to apply operator "-" to null value|#]
[#|2005-08-30T09:25:54.030
-0500|SEVE
RE|sun-app
server-pe8
.1_02|java
x.enterpri
se.system.
container.
web|_Threa
dID=19;|We
bModule[/a
jax-auto-c
omplete-w-
web-servic
e-1a]Error
Description
java.rmi.RemoteException: HTTP transport error: java.net.MalformedURLExcep
tion: no protocol: REPLACE_WITH_ACTUAL_URL; nested exception is:
HTTP transport error: java.net.MalformedURLExcep
tion: no protocol: REPLACE_WITH_ACTUAL_URL
at webservice.dictionaryservi
ce.Diction
aryService
SEI_Stub.m
atchPrefix
(Dictionar
yServiceSE
I_Stub.jav
a:134)
at webservice.dictionaryservi
ce.diction
aryservice
.Dictionar
yServiceCl
ient.match
Prefix(Dic
tionarySer
viceClient
.java:36)
at ajaxautocompletewwebservic
e1a.Page1.
ajaxTextFi
eld1_compl
ete(Page1.
java:207)
at sun.reflect.NativeMethodAc
cessorImpl
.invoke0(N
ative Method)
at sun.reflect.NativeMethodAc
cessorImpl
.invoke(Na
tiveMethod
AccessorIm
pl.java:39
)
at sun.reflect.DelegatingMeth
odAccessor
Impl.invok
e(Delegati
ngMethodAc
cessorImpl
.java:25)
at java.lang.reflect.Method.i
nvoke(Meth
od.java:32
4)
at com.sun.faces.el.MethodBin
dingImpl.i
nvoke(Meth
odBindingI
mpl.java:1
26)
at com.sun.j2ee.blueprints.bp
catalog.aj
ax.compone
nts.AjaxPh
aseListene
r.getCompl
etionItems
(AjaxPhase
Listener.j
ava:137)
at com.sun.j2ee.blueprints.bp
catalog.aj
ax.compone
nts.AjaxPh
aseListene
r.handleAj
axRequest(
AjaxPhaseL
istener.ja
va:86)
at com.sun.j2ee.blueprints.bp
catalog.aj
ax.compone
nts.AjaxPh
aseListene
r.afterPha
se(AjaxPha
seListener
.java:57)
at com.sun.faces.lifecycle.Li
fecycleImp
l.phase(Li
fecycleImp
l.java:235
)
at com.sun.faces.lifecycle.Li
fecycleImp
l.execute(
LifecycleI
mpl.java:9
0)
at javax.faces.webapp.FacesSe
rvlet.serv
ice(FacesS
ervlet.jav
a:197)
at sun.reflect.GeneratedMetho
dAccessor1
55.invoke(
Unknown Source)
at sun.reflect.DelegatingMeth
odAccessor
Impl.invok
e(Delegati
ngMethodAc
cessorImpl
.java:25)
at java.lang.reflect.Method.i
nvoke(Meth
od.java:32
4)
at org.apache.catalina.securi
ty.Securit
yUtil$1.ru
n(Security
Util.java:
249)
at java.security.AccessContro
ller.doPri
vileged(Na
tive Method)
at javax.security.auth.Subjec
t.doAsPriv
ileged(Sub
ject.java:
500)
at org.apache.catalina.securi
ty.Securit
yUtil.exec
ute(Securi
tyUtil.jav
a:282)
at org.apache.catalina.securi
ty.Securit
yUtil.doAs
Privilege(
SecurityUt
il.java:16
5)
at org.apache.catalina.core.A
pplication
FilterChai
n.internal
DoFilter(A
pplication
FilterChai
n.java:257
)
at org.apache.catalina.core.A
pplication
FilterChai
n.access$0
00(Applica
tionFilter
Chain.java
:55)
at org.apache.catalina.core.A
pplication
FilterChai
n$1.run(Ap
plicationF
ilterChain
.java:161)
at java.security.AccessContro
ller.doPri
vileged(Na
tive Method)
at org.apache.catalina.core.A
pplication
FilterChai
n.doFilter
(Applicati
onFilterCh
ain.java:1
57)
at com.sun.web.ui.util.Upload
Filter.doF
ilter(Uplo
adFilter.j
ava:179)
at org.apache.catalina.core.A
pplication
FilterChai
n.internal
DoFilter(A
pplication
FilterChai
n.java:210
)
at org.apache.catalina.core.A
pplication
FilterChai
n.access$0
00(Applica
tionFilter
Chain.java
:55)
at org.apache.catalina.core.A
pplication
FilterChai
n$1.run(Ap
plicationF
ilterChain
.java:161)
at java.security.AccessContro
ller.doPri
vileged(Na
tive Method)
at org.apache.catalina.core.A
pplication
FilterChai
n.doFilter
(Applicati
onFilterCh
ain.java:1
57)
at org.apache.catalina.core.S
tandardWra
pperValve.
invoke(Sta
ndardWrapp
erValve.ja
va:263)
at org.apache.catalina.core.S
tandardPip
eline.invo
ke(Standar
dPipeline.
java:551)
at org.apache.catalina.core.S
tandardCon
textValve.
invokeInte
rnal(Stand
ardContext
Valve.java
:225)
at org.apache.catalina.core.S
tandardCon
textValve.
invoke(Sta
ndardConte
xtValve.ja
va:173)
at org.apache.catalina.core.S
tandardPip
eline.invo
ke(Standar
dPipeline.
java:551)
at org.apache.catalina.core.S
tandardHos
tValve.inv
oke(Standa
rdHostValv
e.java:161
)
at org.apache.catalina.core.S
tandardPip
eline.invo
ke(Standar
dPipeline.
java:551)
at org.apache.catalina.core.S
tandardEng
ineValve.i
nvoke(Stan
dardEngine
Valve.java
:132)
at org.apache.catalina.core.S
tandardPip
eline.invo
ke(Standar
dPipeline.
java:551)
at org.apache.catalina.core.C
ontainerBa
se.invoke(
ContainerB
ase.java:9
33)
at org.apache.coyote.tomcat5.
CoyoteAdap
ter.servic
e(CoyoteAd
apter.java
:185)
at com.sun.enterprise.web.con
nector.gri
zzly.Proce
ssorTask.p
rocess(Pro
cessorTask
.java:653)
at com.sun.enterprise.web.con
nector.gri
zzly.Proce
ssorTask.p
rocess(Pro
cessorTask
.java:534)
at com.sun.enterprise.web.con
nector.gri
zzly.Proce
ssorTask.d
oTask(Proc
essorTask.
java:403)
at com.sun.enterprise.web.con
nector.gri
zzly.Worke
rThread.ru
n(WorkerTh
read.java:
55)
Caused by: HTTP transport error: java.net.MalformedURLExcep
tion: no protocol: REPLACE_WITH_ACTUAL_URL
at com.sun.xml.rpc.client.htt
p.HttpClie
ntTranspor
t.invoke(H
ttpClientT
ransport.j
ava:140)
at com.sun.xml.rpc.client.Str
eamingSend
er._send(S
treamingSe
nder.java:
92)
at webservice.dictionaryservi
ce.Diction
aryService
SEI_Stub.m
atchPrefix
(Dictionar
yServiceSE
I_Stub.jav
a:118)
... 47 more
The "REPLACE_WITH_ACTUAL_URL" in the error message above makes me think I've missed something along the way.
Does anyone have an idea as to what I'm missing here? Has anyone successfully completed this JSF/AJAX example?
Thanks.
Start Free Trial