Advertisement

08.30.2005 at 08:11AM PDT, ID: 21544943
[x]
Attachment Details

Getting "java.net.MalformedURLException: no protocol: REPLACE_WITH_ACTUAL_URL" error during JSF/AJAX example

Asked by taximillion in Java Programming Language, Java Servlets

Tags: protocol

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"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:DictionaryService/wsdl" xmlns:ns2="urn:DictionaryService/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="DictionaryService" targetNamespace="urn:DictionaryService/wsdl">
  <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:DictionaryService/types" 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:DictionaryService/types">
      <complexType name="define">
        <sequence>
          <element name="String_1" type="string" nillable="true"/></sequence></complexType>
      <complexType name="defineResponse">
        <sequence>
          <element name="result" type="string" nillable="true"/></sequence></complexType>
      <complexType name="matchPrefix">
        <sequence>
          <element name="String_1" type="string" nillable="true"/></sequence></complexType>
      <complexType name="matchPrefixResponse">
        <sequence>
          <element name="result" type="string" nillable="true" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType>
      <element name="define" type="tns:define"/>
      <element name="defineResponse" type="tns:defineResponse"/>
      <element name="matchPrefix" type="tns:matchPrefix"/>
      <element name="matchPrefixResponse" type="tns:matchPrefixResponse"/></schema></types>
  <message name="DictionaryServiceSEI_define">
    <part name="parameters" element="ns2:define"/></message>
  <message name="DictionaryServiceSEI_defineResponse">
    <part name="result" element="ns2:defineResponse"/></message>
  <message name="DictionaryServiceSEI_matchPrefix">
    <part name="parameters" element="ns2:matchPrefix"/></message>
  <message name="DictionaryServiceSEI_matchPrefixResponse">
    <part name="result" element="ns2:matchPrefixResponse"/></message>
  <portType name="DictionaryServiceSEI">
    <operation name="define">
      <input message="tns:DictionaryServiceSEI_define"/>
      <output message="tns:DictionaryServiceSEI_defineResponse"/></operation>
    <operation name="matchPrefix">
      <input message="tns:DictionaryServiceSEI_matchPrefix"/>
      <output message="tns:DictionaryServiceSEI_matchPrefixResponse"/></operation></portType>
  <binding name="DictionaryServiceSEIBinding" type="tns:DictionaryServiceSEI">
    <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="DictionaryServiceSEIPort" binding="tns:DictionaryServiceSEIBinding">
      <soap:address location="http://gpintarxplt.hrbinc.hrblock.net:28080/DictionaryService/DictionaryService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/></port></service></definitions>

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|WARNING|sun-appserver-pe8.1_02|com.sun.faces.el.impl.Coercions|_ThreadID=19;|Attempt to apply operator "-" to null value|#]
[#|2005-08-30T09:25:54.030-0500|SEVERE|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=19;|WebModule[/ajax-auto-complete-w-web-service-1a]Error Description
java.rmi.RemoteException: HTTP transport error: java.net.MalformedURLException: no protocol: REPLACE_WITH_ACTUAL_URL; nested exception is:
        HTTP transport error: java.net.MalformedURLException: no protocol: REPLACE_WITH_ACTUAL_URL
        at webservice.dictionaryservice.DictionaryServiceSEI_Stub.matchPrefix(DictionaryServiceSEI_Stub.java:134)
        at webservice.dictionaryservice.dictionaryservice.DictionaryServiceClient.matchPrefix(DictionaryServiceClient.java:36)
        at ajaxautocompletewwebservice1a.Page1.ajaxTextField1_complete(Page1.java:207)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
        at com.sun.j2ee.blueprints.bpcatalog.ajax.components.AjaxPhaseListener.getCompletionItems(AjaxPhaseListener.java:137)
        at com.sun.j2ee.blueprints.bpcatalog.ajax.components.AjaxPhaseListener.handleAjaxRequest(AjaxPhaseListener.java:86)
        at com.sun.j2ee.blueprints.bpcatalog.ajax.components.AjaxPhaseListener.afterPhase(AjaxPhaseListener.java:57)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:235)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
        at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
        at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at com.sun.web.ui.util.UploadFilter.doFilter(UploadFilter.java:179)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
        at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
Caused by: HTTP transport error: java.net.MalformedURLException: no protocol: REPLACE_WITH_ACTUAL_URL
        at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:140)
        at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:92)
        at webservice.dictionaryservice.DictionaryServiceSEI_Stub.matchPrefix(DictionaryServiceSEI_Stub.java: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
 
Loading Advertisement...
 
[+][-]08.30.2005 at 08:24AM PDT, ID: 14785664

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.30.2005 at 08:54AM PDT, ID: 14785997

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.30.2005 at 09:56AM PDT, ID: 14786577

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2005 at 02:21AM PDT, ID: 14791922

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2005 at 08:36AM PDT, ID: 14794882

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.31.2005 at 11:02AM PDT, ID: 14796134

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java Programming Language, Java Servlets
Tags: protocol
Sign Up Now!
Solution Provided By: TimYates
Participating Experts: 2
Solution Grade: B
 
 
[+][-]09.01.2005 at 11:07AM PDT, ID: 14804508

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.04.2005 at 01:32PM PDT, ID: 15017488

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.04.2005 at 01:34PM PDT, ID: 15017503

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32