problem with soap listener

Hi,

i have a very big problem with receiving a SOAP Message from eBay.

If you sell successfully a product on the eBay plateform, a EndOFAuction or a FixedPriceAuction Notification (SOAP-Message) is thrown.

This Notification (SOAP-Message) can be catched.

To receive this SOAP-Message i use the doPost()-Methode:

/** Handles the HTTP <code>POST</code> method.

* @param request servlet request

* @param response servlet response

*/

protectedvoid doPost(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException{

try{

// Getting The Header Of The Soap request

MimeHeaders headers = getHeaders(request);

// Get the body of the SOAP request

InputStream is = request.getInputStream();

/*

SOAPMessage message = SOAPUtil.setMessage(is,headers);

OutputStream os = response.getOutputStream();

message.writeTo(os);

os.flush();

*/

// Process Notification http header

String notiEvent =null;

java.util.Enumeration headenum = request.getHeaderNames();

while(headenum.hasMoreElements()){

String headname = (String)headenum.nextElement();

String headvalue = request.getHeader(headname);

if (headname.equalsIgnoreCase("SOAPACTION")){

int last = headvalue.lastIndexOf("/");

notiEvent =headvalue.substring(last+1,headvalue.length());

System.out.println(headname +" : " + headvalue);

System.out.println("NOTIFICATION EVENT : " + notiEvent);

}

}

String rootElement=null;

for (int i = 0; i< noticationevents.length; i++){

String eventname = noticationevents[i];

if ( notiEvent.equalsIgnoreCase(eventname)){

rootElement = noticationtopelements[i];

System.out.println("ROOTELEMENT : " +rootElement);

}

}

// read input string

// Es muss eine Methode onMessage enthalten sein, welche aufgerufen und abgearbeitet wird,

// sobald eine Nachricht eintrifft

Object obj = onMessage(is, rootElement);//"GetItemResponse" );

ItemType itemtype =null;

if (obj !=null && objinstanceof GetItemResponseType){

GetItemResponseType girt = (GetItemResponseType)obj;

traverseItem(girt);

System.out.println("GET EVENT NAME : "+ girt.getNotificationEventName());

itemtype = girt.getItem();

PrintWriter pw = response.getWriter();

pw.println("<html><head>");

pw.println("</head><body><h3> the itemId is " + itemtype.getItemID()+"</h3>");

pw.println("</bodY></html>");

}

if (obj !=null && objinstanceof GetItemTransactionsResponseType){

GetItemTransactionsResponseType girt = (GetItemTransactionsResponseType)obj;

itemTransac(girt);

System.out.println("Notification: "+ girt.getNotificationEventName());

}

}catch (Exception e){

e.printStackTrace();

response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

}

//response.setStatus(HttpServletResponse.SC_OK);

}

But i don磘 get any Message. I think my problem is not my code. Because when i start my Tomcat i get the

following error:

22.01.2007 13:46:46 org.apache.catalina.core.StandardContext listenerStart

SCHWERWIEGEND: Error configuring application listener ofclass com.sun.faces.config.ConfigureListener

java.lang.NoClassDefFoundError: javax/faces/FacesException

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)

at java.lang.Class.getConstructor0(Class.java:2671)

at java.lang.Class.newInstance0(Class.java:321)

at java.lang.Class.newInstance(Class.java:303)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3618)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:894)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:857)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)

at org.apache.catalina.core.StandardService.start(StandardService.java:450)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)

at org.apache.catalina.startup.Catalina.start(Catalina.java:537)

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:585)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

I searched a lot on google, and found something about the missing of the jsf-api.jar and the jsf-impl.jar in my

bin directory. But this .jar files are in my bin directory.

Is this the problem why my listener don磘 get any SOAP-Message? And how can i solve this problem?

Thanks in advance

Xix

Message was edited by:

Xix

[7905 byte] By [Xixa] at [2007-11-26 15:55:20]
# 1

ok, i found something.

I think i have to make some configurations in the faces-config.xml,...this file is empty.

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE faces-config PUBLIC

"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"

"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

<!-- =========== FULL CONFIGURATION FILE ================================== -->

<faces-config>

</faces-config>

Which configurations must i do?

Thanks in adnvance

Xix

Xixa at 2007-7-8 22:16:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

This is the basic configuration:

<faces-config>

<managed-bean>

<managed-bean-name>myBean</managed-bean-name>

<managed-bean-class>mypackage.MyBean</managed-bean-class>

<managed-bean-scope>request</managed-bean-scope>

</managed-bean>

</faces-config>

BalusCa at 2007-7-8 22:16:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Hi,

thanks for your very fast answer.

My faces-config.xml showes like this now:

<faces-config>

<managed-bean>

<managed-bean-name>ConfigureListener</managed-bean-name>

<managed-bean-class>com.sun.faces.config.ConfigureListener</managed-bean-class>

<managed-bean-scope>request</managed-bean-scope>

</managed-bean>

</faces-config>

But i get the same error on starting my Tomcat. I am realy confused.

Xixa at 2007-7-8 22:16:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
No .. The ConfigureListener is not a managed bean.Listeners should be definied in web.xml<listener><listener-class>com.sun.faces.config.ConfigureListener</listener-class></listener>
BalusCa at 2007-7-8 22:16:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
thanks, i have changed my web.xml. But the error isn磘 solved. :'(
Xixa at 2007-7-8 22:16:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

鋒hmm,...i think it磗 wrong to change the web.xml of the project. Because the error comes too, when i start the Tomcat without any project. I think there is some wrong configuration of the Tomcat...but what?

Or do you mean the web.xml from the Tomcat and not the web.xml from the project?

But when i change the web.xml from the Tomcat i get the error too.

I am very new in SOAP... But it磗 very important... :(

.

Xixa at 2007-7-8 22:16:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...