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

