Here is the info as requested :

SEI : 

package za.co.hyphen.tradequest.server;

import javax.jws.WebParam.Mode;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding;
import javax.jws.WebMethod;
import javax.jws.WebResult;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;

/**
 * This class was generated by the CXF 2.0.2-incubator
 * Fri Oct 19 10:26:40 CAT 2007
 * Generated source version: 2.0.2-incubator
 * 
 */

@WebService(targetNamespace = "http://server.tradequest.hyphen.co.za/";, name
= "TradeQuest")

public interface TradeQuest 
{
    @WebResult(targetNamespace = "", name = "response")
    @RequestWrapper(localName = "tradeQuestAction", targetNamespace =
"http://server.tradequest.hyphen.co.za/";, className =
"za.co.hyphen.tradequest.server.TradeQuestAction")
    @ResponseWrapper(localName = "tradeQuestActionResponse", targetNamespace
= "http://server.tradequest.hyphen.co.za/";, className =
"za.co.hyphen.tradequest.server.TradeQuestActionResponse")
    @WebMethod
    public String tradeQuestAction(@WebParam(targetNamespace = "", name =
"request") String request);
}

Implementation : 
package za.co.hyphen.tradequest.server;

import java.io.StringReader;

import javax.jws.WebResult;
import javax.jws.WebService;

import org.apache.log4j.Logger;
import org.jdom.Element;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;

import za.co.hyphen.schema.SchemaValidation;
import za.co.hyphen.tradequest.bus.CardAuthorisation;
import za.co.hyphen.tradequest.bus.Refund;
import za.co.hyphen.tradequest.bus.RetrievalReference;
import za.co.hyphen.tradequest.bus.ReverseOrSettle;
import za.co.hyphen.utils.*;
import za.co.hyphen.webservices.interfaces.IProcessAction;


/**
 * The entry point for the TradeQuest request. It is reponsible for the
following :
 * <ul> 
 *  <li>Build a document which will be used to return the responses.</li> 
 *  <li>Validate the incoming xml string to ensure it conforms to the
XSD.</li>
 *  <li>Process the request.</li>
 *  <li>Validate the outgoing xml string to ensure it conforms to the
XSD.</li>
 *  <li>Return a response in a valid xml string.</li>
 * </ul> 
 * @author Gareth Uren
 * @version 2.0 16 October 2007
 */

@WebService(endpointInterface = "za.co.hyphen.tradequest.server.TradeQuest",
serviceName = "TradeQuest")
public class TradeQuestImpl extends CommonFields implements TradeQuest
{
        /** Logger for AccountValidatinImpl class. */
        private final static Logger log = 
Logger.getLogger(TradeQuestImpl.class);
        
        private IProcessAction processAction;
        
        /** 
         * @param  request for the accounts to be validated in the form of an 
xml
string
         * @return response of the account validation request in the form of an 
xml
string
         */
        
        public String tradeQuestAction (String request)
        {
                log.info("Initiate request for request len : " + 
request.length());
                                
                if ((request == null) || (request.length() == 0)) 
                {
                        org.w3c.dom.Element error = 
Util.buildErrorResponse(dataDoc, "No Request
has been received by the web service");
                        log.error("No xml request received");
                        return DomWriter.domWriter(error, new StringBuffer()); 
                }
                
                dataDoc = Util.buildDocument();
                stringReader = new StringReader(request);
                inputSource = new InputSource(stringReader);
                
                log.info("*** REQUEST :\n" + request);
                
                SchemaValidation schemaValidation = new SchemaValidation();
                
                // schema validaiton failed on incoming request
                if (!schemaValidation.validateSchema(tradeQuestRequestSchemaUrl,
inputSource)) 
                {
                        org.w3c.dom.Element error = 
Util.buildErrorResponse(dataDoc,
schemaValidation.getValidationMessage());
                        log.error("Invalid XML received : " +
schemaValidation.getValidationMessage());
                        return DomWriter.domWriter(error, new StringBuffer()); 
                }
                // continue to do processing of request
                else
                {
                        jdomDataDoc = Util.getXmlAsDocument(request);
                        
                        // get the root element
                        Element root = jdomDataDoc.getRootElement();
                        userId = root.getChildText("UserId");
                        password = root.getChildText("Password");
                        action = root.getChild("Action").getText();
                
                        log.info("Action for request : " + action);
                        
                        // do authorisation
                        if (action.trim().toUpperCase().equals("AUTH"))
                        {
                                processAction = new 
CardAuthorisation(jdomDataDoc, userId, password);
                        }
                        else if (action.trim().toUpperCase().equals("SETTLE"))
                        {
                                processAction = new 
ReverseOrSettle(jdomDataDoc, action, userId,
password);
                        }
                        else if (action.trim().toUpperCase().equals("REVERSAL"))
                        {
                                processAction = new 
ReverseOrSettle(jdomDataDoc, action, userId,
password);
                        }
                        else if (action.trim().toUpperCase().equals("REFUND"))
                        {
                                processAction = new Refund(jdomDataDoc, userId, 
password);
                        }
                        else if (action.trim().toUpperCase().equals("RETREF"))
                        {
                                processAction = new 
RetrievalReference(jdomDataDoc, userId, password);
                        }
                        
                        try
                        {
                                response = processAction.doRequestedAction();
                        }
                        catch (Exception e)
                        {
                                log.info("Exception creating handle to 
IProcessAction - " +
e.getMessage() );
                                log.info("*** response = " + response);
                        }
                }
                
                if ((response == null) || (response.length() == 0)) 
                {
                        org.w3c.dom.Element error = 
Util.buildErrorResponse(dataDoc, "No Response
has been received by the web server");
                        log.error("No xml response received");
                        return DomWriter.domWriter(error, new StringBuffer()); 
                }
                
                stringReader = new StringReader(response);
                inputSource = new InputSource(stringReader);
                
                // schema validation failed on outgoing request
                if 
(!schemaValidation.validateSchema(tradeQuestResponseSchemaUrl,
inputSource)) 
                {
                        org.w3c.dom.Element error = 
Util.buildErrorResponse(dataDoc,
schemaValidation.getValidationMessage());
                        log.error("Invalid XML sent : " +
schemaValidation.getValidationMessage());
                        return DomWriter.domWriter(error, new StringBuffer()); 
                }
                log.info("*** RESPONSE :\n" + response);
                return  response;
        }
}



Julio Arias wrote:
> 
> Can you post your SEI or at least the method signature for the one  
> that is failing.
> 
> On Nov 15, 2007, at 5:28 AM, garethu wrote:
> 
>>
>> I have created a web service which is currently returning inconsistent
>> results. Sometimes it will run fine, returning valid results to the  
>> client.
>> But after every 2 or 3 runs, it returns the following from the Apache
>> Server:
>>
>> Nov 15, 2007 1:26:43 PM java.lang.Throwable <init>
>> INFO: Interceptor has thrown exception, unwinding now
>> org.apache.cxf.interceptor.Fault: Marshalling Error: null
>>  at java.lang.Throwable.<init>(Throwable.java:241)
>>  at java.lang.RuntimeException.<init>(RuntimeException.java:77)
>>  at
>> org.apache.cxf.common.i18n.UncheckedException.<init> 
>> (UncheckedException.java:35)
>>  at org.apache.cxf.interceptor.Fault.<init>(Fault.java:43)
>>  at
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall 
>> (JAXBEncoderDecoder.java:181)
>>  at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java: 
>> 42)
>>  at
>> org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart 
>> s(AbstractOutDatabindingInterceptor.java:93)
>>  at
>> org.apache.cxf.interceptor.BareOutInterceptor.handleMessage 
>> (BareOutInterceptor.java:68)
>>  at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept 
>> (PhaseInterceptorChain.java:207)
>>  at
>> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage 
>> (OutgoingChainInterceptor.java:74)
>>  at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept 
>> (PhaseInterceptorChain.java:207)
>>  at
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage 
>> (ChainInitiationObserver.java:73)
>>  at
>> org.apache.cxf.transport.servlet.ServletDestination.doMessage 
>> (ServletDestination.java:79)
>>  at
>> org.apache.cxf.transport.servlet.ServletController.invokeDestination 
>> (ServletController.java:235)
>>  at
>> org.apache.cxf.transport.servlet.ServletController.invoke 
>> (ServletController.java:140)
>>  at org.apache.cxf.transport.servlet.CXFServlet.invoke 
>> (CXFServlet.java:278)
>>  at org.apache.cxf.transport.servlet.CXFServlet.invoke 
>> (CXFServlet.java:278)
>>  at org.apache.cxf.transport.servlet.CXFServlet.doPost 
>> (CXFServlet.java:256)
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>  at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
>> (ApplicationFilterChain.java:290)
>>  at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter 
>> (ApplicationFilterChain.java:206)
>>  at
>> org.apache.catalina.core.StandardWrapperValve.invoke 
>> (StandardWrapperValve.java:233)
>>  at
>> org.apache.catalina.core.StandardContextValve.invoke 
>> (StandardContextValve.java:175)
>>  at
>> org.apache.catalina.core.StandardHostValve.invoke 
>> (StandardHostValve.java:128)
>>  at
>> org.apache.catalina.valves.ErrorReportValve.invoke 
>> (ErrorReportValve.java:102)
>>  at
>> org.apache.catalina.core.StandardEngineValve.invoke 
>> (StandardEngineValve.java:109)
>>  at
>> org.apache.catalina.connector.CoyoteAdapter.service 
>> (CoyoteAdapter.java:263)
>>  at
>> org.apache.coyote.http11.Http11Processor.process 
>> (Http11Processor.java:844)
>>  at
>> org.apache.coyote.http11.Http11Protocol 
>> $Http11ConnectionHandler.process(Http11Protocol.java:584)
>>  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run 
>> (JIoEndpoint.java:447)
>>  at java.lang.Thread.run(Thread.java:595)
>> Caused by: java.lang.ArrayIndexOutOfBoundsException
>>  at java.lang.Throwable.<init>(Throwable.java:181)
>>  at java.lang.RuntimeException.<init>(RuntimeException.java:32)
>> at java.lang.RuntimeException.<init>(RuntimeException.java:32)
>> at
>> java.lang.IndexOutOfBoundsException.<init> 
>> (IndexOutOfBoundsException.java:27)
>> at
>> java.lang.ArrayIndexOutOfBoundsException.<init> 
>> (ArrayIndexOutOfBoundsException.java:26)
>> at
>> com.sun.xml.bind.v2.util.CollisionCheckStack.findDuplicate 
>> (CollisionCheckStack.java:112)
>> at
>> com.sun.xml.bind.v2.util.CollisionCheckStack.push 
>> (CollisionCheckStack.java:53)
>> at
>> com.sun.xml.bind.v2.runtime.XMLSerializer.pushObject 
>> (XMLSerializer.java:471)
>> at
>> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType 
>> (XMLSerializer.java:574)
>> at
>> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody 
>> (ElementBeanInfoImpl.java:93)
>> at
>> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody 
>> (ElementBeanInfoImpl.java:127)
>> at
>> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody 
>> (ElementBeanInfoImpl.java:244)
>> at
>> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot 
>> (ElementBeanInfoImpl.java:251)
>> at
>> com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot 
>> (ElementBeanInfoImpl.java:33)
>> at
>> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot 
>> (XMLSerializer.java:461)
>> at com.sun.xml.bind.v2.runtime.MarshallerImpl.write 
>> (MarshallerImpl.java:292)
>> at
>> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal 
>> (MarshallerImpl.java:148)
>> at
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject 
>> (JAXBEncoderDecoder.java:188)
>> at
>> org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall 
>> (JAXBEncoderDecoder.java:159)
>> ... 26 more
>>
>> Any help will be much appreciated.
>>
>> Gareth
>>
>>
>> -- 
>> View this message in context: http://www.nabble.com/Marshalling- 
>> Error-tf4811214.html#a13765785
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
> 
> 
> 
> 
> Julio Arias
> Java Developer
> Roundbox Global : enterprise : technology : genius
> ---------------------------------------------------------------------
> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> tel: 404.567.5000 ext. 2001 | cell: 011) 506.849.5981
> email: [EMAIL PROTECTED] | www.rbxglobal.com
> ---------------------------------------------------------------------
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Marshalling-Error-tf4811214.html#a13788108
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to