dcsimg
need explanation on Amazon webservices GUI Class file AmazonClient.java
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sreekrishna_Pasumarthy
Posted On:   Monday, September 26, 2005 03:16 PM

In the AmazonClient.java file we already have import ora.jwsnut.chapter1.amazon.AmazonSearchPort; import ora.jwsnut.chapter1.amazon.AmazonSearchService; import ora.jwsnut.chapter1.amazon.AmazonSearchService_Impl; import ora.jwsnut.chapter1.amazon.AsinRequest; import ora.jwsnut.chapter1.amazon.AuthorRequest; import ora.jwsnut.chapter1.amazon.KeywordRequest; i wanted to add ArtistRequest class to this java file like case AmazonClientGUI.ARTIST_SEARCH: ArtistRequest artistReq = new ArtistRequest(newKey,String.valueOf(page), MODE,WEBSERVICE, TYPE, devtag,null,null,null); result = amazonSearch.artistSearchRequest(artistReq); break;    More>>

In the AmazonClient.java file

we already have

import ora.jwsnut.chapter1.amazon.AmazonSearchPort;
import ora.jwsnut.chapter1.amazon.AmazonSearchService;
import ora.jwsnut.chapter1.amazon.AmazonSearchService_Impl;
import ora.jwsnut.chapter1.amazon.AsinRequest;
import ora.jwsnut.chapter1.amazon.AuthorRequest;
import ora.jwsnut.chapter1.amazon.KeywordRequest;

i wanted to add ArtistRequest class to this java file
like

case AmazonClientGUI.ARTIST_SEARCH:
ArtistRequest artistReq = new ArtistRequest(newKey,String.valueOf(page), MODE,WEBSERVICE, TYPE,

devtag,null,null,null);
result = amazonSearch.artistSearchRequest(artistReq);
break;

The build was successfull,when we compile with ant

D:JWSNutshellexampleschapter1amazon>ant compile
Buildfile: build.xml

sense:

platform-check:

check:

jwsdp-tomcat-prepare:
[echo] Target platform is JWSDP with Tomcat

j2ee14-prepare:

prepare:

init:

generate-client:

compile-client:
[javac] Compiling 1 source file to D:JWSNutshellexampleschapter1amazono
utputclient

compile:

BUILD SUCCESSFUL
Total time: 2 minutes 27 seconds

but we get an exception when we are running the file

D:JWSNutshellexampleschapter1amazon>ant run-client
Buildfile: build.xml

sense:

platform-check:

check:

jwsdp-tomcat-prepare:
[echo] Target platform is JWSDP with Tomcat

j2ee14-prepare:

prepare:

init:

run-client:
[java] java.lang.NullPointerException
[java] at ora.jwsnut.chapter1.client.AmazonClient.doSearch(AmazonClient
.java:119)
[java] at ora.jwsnut.chapter1.client.AmazonClient.propertyChange(Amazon
Client.java:72)
[java] at java.beans.PropertyChangeSupport.firePropertyChange(PropertyC
hangeSupport.java:333)
[java] at java.beans.PropertyChangeSupport.firePropertyChange(PropertyC
hangeSupport.java:270)
[java] at ora.jwsnut.chapter1.client.AmazonClientGUI.firePropertyChange
(AmazonClientGUI.java:175)
[java] at ora.jwsnut.chapter1.client.AmazonClientGUI.actionPerformed(Am
azonClientGUI.java:126)
[java] at javax.swing.JTextField.fireActionPerformed(JTextField.java:48
7)
[java] at javax.swing.JTextField.postActionEvent(JTextField.java:668)
[java] at javax.swing.JTextField$NotifyAction.actionPerformed(JTextFiel
d.java:783)
[java] at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1
571)
[java] at javax.swing.JComponent.processKeyBinding(JComponent.java:2763
)
[java] at javax.swing.JComponent.processKeyBindings(JComponent.java:279
8)
[java] at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
[java] at java.awt.Component.processEvent(Component.java:5265)
[java] at java.awt.Container.processEvent(Container.java:1966)
[java] at java.awt.Component.dispatchEventImpl(Component.java:3955)
[java] at java.awt.Container.dispatchEventImpl(Container.java:2024)
[java] at java.awt.Component.dispatchEvent(Component.java:3803)
[java] at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusMa
nager.java:1810)
[java] at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Default
KeyboardFocusManager.java:672)
[java] at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Defa
ultKeyboardFocusManager.java:920)
[java] at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Defa
ultKeyboardFocusManager.java:798)
[java] at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKey
boardFocusManager.java:636)
[java] at java.awt.Component.dispatchEventImpl(Component.java:3841)
[java] at java.awt.Container.dispatchEventImpl(Container.java:2024)
[java] at java.awt.Window.dispatchEventImpl(Window.java:1774)
[java] at java.awt.Component.dispatchEvent(Component.java:3803)
[java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
[java] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDi
spatchThread.java:242)
[java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDisp
atchThread.java:163)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.j
ava:157)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.j
ava:149)
[java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:110
)


ANY BODY PLEASE RESPOND AND HELP!!!!!!!!!!!!!!!

How to get rid of this exception

   <<Less
About | Sitemap | Contact