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

[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8
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.


Answered By: TimYates
Expert Since: 08/18/1998
Accepted Solutions: 3577
TimYates has been an Expert for 10 years 4 months, during which he has posted 20548 comments and answered 3577 questions. TimYates is just one of 1203 experts in the Java Programming Language Zone. 2 experts collaborated on this answer, which was graded a "B" by the asker.
 
 
20081119-EE-VQP-47