ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chamikara Jayalath" <chamikar...@gmail.com>
Subject Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Date Mon, 03 Jul 2006 11:46:18 GMT
Hi Elodie, Paul,

It seems like MTOM + Sandesha2 + NotInOrder case is working.
But MTOM + Sadesha2 + InOrder case is not working.

When InOrder Invocation is enabled Sandesha2 always pauses the message
before its actual invocation and Axis2 closes the InPutStream when the
message get paused and the thread get returned.

Because of that the service Impl. get exceptions when tring to read the MTOM
attachments from the already closed stream. This seems to be a general
problem with message pausing.

So Elodie, for now disable InOrder invocation in Sandesha2. To do that
change the 'InvokeInOrder' policy in the module.xml to 'false' (this is
'true' by default).

Chamikara



On 7/3/06, Paul Fremantle <pzfreo@gmail.com> wrote:
>
> Elodie
>
> This looks more like a Sandesha bug. I will do a test as well and let
> you know how it goes.
>
> Paul
>
> On 7/3/06, Mancinelli Elodie <elodie.mancinelli@bull.net > wrote:
> > Hi Paul
> >
> > 1) Yes, MTOM + XMLBeans code works without WSRM and also WSRM + XMLBeans
> > code works without WSRM.
> > 2) The error for MTOM + WSRM with ADB, I don't know because I can't
> > generate sources.
> > I'm trying to do MTOM + WSRM with ADB on a other little exemple like
> > HelloWorld. I tell you the result when I finish it.
> >
> > Thanks
> >
> > Elodie
> >
> >
> >
> >
> > Paul Fremantle wrote:
> >
> > > Elodie
> > >
> > > I'm not completely clear on the situation!
> > >
> > > 1) Is the MTOM + XMLBeans code working without WSRM?
> > > 2) What is the error you get with ADB?
> > > 3) Can you post the WSDL?
> > >
> > > Paul
> > >
> > > On 6/29/06, Mancinelli Elodie < elodie.mancinelli@bull.net> wrote:
> > >
> > >> Hi Paul
> > >>
> > >> Thanks for your response. I wish have more information because I don'
> t
> > >> understand why MTOM can't work with XmlBeans? And what is the
> > >> marshalling I have to use?
> > >> I try ADB but it not seems to work, I can't generate the server
> > >> implementation.
> > >>
> > >> In more, I create a client-server with only MTOM and I also create
> the
> > >> same thing with only WSRM(sandesha2) and  both work separetly with
> > >> XmlBeans. Is the problem is WSRM + MTOM together? And how could I do
> to
> > >> resolve my problem?
> > >>
> > >>
> > >> Thanks a lot.
> > >>
> > >> Regards
> > >> Elodie
> > >>
> > >>
> > >> Paul Fremantle wrote:
> > >>
> > >> > Elodie
> > >> >
> > >> > I think the problem is that you are using MTOM with XMLBeans which
> > >> > does not work.
> > >> >
> > >> > Paul
> > >> >
> > >> > --
> > >> > Paul Fremantle
> > >> > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > >> >
> > >> > http://bloglines.com/blog/paulfremantle
> > >> > paul@wso2.com
> > >> >
> > >> > "Oxygenating the Web Service Platform", www.wso2.com
> > >> >
> > >> >
> > >> > On 6/28/06, Mancinelli Elodie <elodie.mancinelli@bull.net> wrote:
> > >> >
> > >> >> Mancinelli Elodie wrote:
> > >> >>
> > >> >> > Sorry, I want to precise my request. When I observe with
TCPMon
> the
> > >> >> > soap message, the differents messages of WSRM's protocole
are
> > >> created
> > >> >> > (CreateSequence, CreateSequenceResponse, Message, Acknowldgement
> > >> and
> > >> >> > TerminateSequence). These messages are correct. The problem
is
> > >> on the
> > >> >> > server after messages.
> > >> >> >
> > >> >> > Thanks,
> > >> >> >
> > >> >> > Regards,
> > >> >> > Elodie
> > >> >> >
> > >> >> >
> > >> >> > Mancinelli Elodie wrote:
> > >> >> >
> > >> >> >> Hi all,
> > >> >> >>
> > >> >> >> I try to create an OneWay method which supports WSRM
and an
> > >> >> attachment.
> > >> >> >> My service is really simple, it's only a "println".
> > >> >> >> The method runs successfully when there is only the WSRM
> > >> >> >> implementation, but when I add the attachement part,
I have an
> > >> server
> > >> >> >> error:
> > >> >> >>
> > >> >> >> org.apache.sandesha2.SandeshaException: Data binding
error;
> nested
> > >> >> >> exception is:
> > >> >> >>        java.lang.RuntimeException: Data binding error;
nested
> > >> >> >> exception is:
> > >> >> >>        org.apache.axis2.AxisFault: Data binding error;
nested
> > >> >> >> exception is:
> > >> >> >>        java.lang.RuntimeException: Data binding error
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java
> :199)
> > >> >> >> Caused by: org.apache.axis2.AxisFault: Data binding error;
> nested
> > >> >> >> exception is:
> > >> >> >>        java.lang.RuntimeException: Data binding error
> > >> >> >>        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >>
> fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic
> (PrestoSvcMessageReceiverInOnly.java :50)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axis2.receivers.AbstractInMessageReceiver.receive (
> AbstractInMessageReceiver.java:34)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> org.apache.axis2.engine.AxisEngine.resumeReceive (AxisEngine.java
> :497)
> > >> >> >>        at
> > >> >> org.apache.axis2.engine.AxisEngine.resume(AxisEngine.java:543)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java
> :189)
> > >> >> >> Caused by: java.lang.RuntimeException: Data binding error
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(
> PrestoSvcMessageReceiverInOnly.java:174)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >>
> fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(
> PrestoSvcMessageReceiverInOnly.java:46)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        ... 4 more
> > >> >> >> Caused by: org.apache.axiom.om.OMException :
> > >> >> >> java.lang.NullPointerException
> > >> >> >>        at
> > >> >> >>
> > >> org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:254)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axiom.om.impl.llom.OMStAXWrapper.getTextCharacters(
> OMStAXWrapper.java:365)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader (
> Locale.java:1154)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.xmlbeans.impl.store.Locale.parseToXmlObject (Locale.java
> :843)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java
> :826)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(
> SchemaTypeLoaderBase.java:231)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> fr.gouv.finances.dgme.presto.SubmitOneWayDocument$Factory.parse(
> SubmitOneWayDocument.java:128)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM (
> PrestoSvcMessageReceiverInOnly.java:145)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        ... 5 more
> > >> >> >> Caused by: java.lang.NullPointerException
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.coyote.http11.InternalInputBuffer.fill(
> InternalInputBuffer.java:737)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >>
> org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(
> InternalInputBuffer.java:777)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.coyote.http11.InternalInputBuffer.doRead(
> InternalInputBuffer.java:710)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at org.apache.coyote.Request.doRead (Request.java:423)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.catalina.connector.InputBuffer.realReadBytes(
> InputBuffer.java:283)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >> org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:371)
>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.catalina.connector.InputBuffer.readByte(InputBuffer.java
> :292)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.catalina.connector.CoyoteInputStream.read(
> CoyoteInputStream.java:104)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> java.io.FilterInputStream.read(FilterInputStream.java:66)
> > >> >> >>        at
> > >> >> java.io.PushbackInputStream.read (PushbackInputStream.java:120)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axiom.attachments.MIMEBodyPartInputStream.read(
> MIMEBodyPartInputStream.java :49)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >> javax.mail.internet.InternetHeaders.load(InternetHeaders.java:106)
> > >> >> >>        at
> > >> >> >>
> > >> javax.mail.internet.InternetHeaders.<init>(InternetHeaders.java:92)
> > >> >> >>        at
> > >> >> javax.mail.internet.MimeBodyPart.<init>(MimeBodyPart.java:59)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axiom.attachments.PartOnMemory .<init>(PartOnMemory.java
> :31)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axiom.attachments.Attachments.getPart(Attachments.java:451)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axiom.attachments.Attachments.getNextPart(Attachments.java
> :359)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axiom.attachments.Attachments.getPart (Attachments.java
> :324)
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axiom.attachments.Attachments.getDataHandler(
> Attachments.java:274)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axiom.om.impl.mtom.MTOMStAXSOAPModelBuilder.getDataHandler(
> MTOMStAXSOAPModelBuilder.java:151)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(
> OMTextImpl.java:341)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> >>
> > >> org.apache.axiom.om.impl.llom.OMTextImpl.getInputStream(
> OMTextImpl.java:368)
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>        at
> > >> >> >>
> > >> org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:238)
> > >> >> >>
> > >> >> >> My client is:
> > >> >> >>
> > >> >> >> public static void testSubmitOneWayWSRM() throws Exception
{
> > >> >> >>
> > >> >> >>         ConfigurationContext configContext =
> > >> >> >>
> > >> >>
> > >> ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>         ServiceClient sender = new ServiceClient
> > >> >> (configContext,null);
> > >> >> >>
> > >> >> >>
> > >> >> >>         OMFactory fac = OMAbstractFactory.getOMFactory();
> > >> >> >>         OMNamespace omNs = fac.createOMNamespace(namespace,
> "m");
> > >> >> >>         OMElement payload = fac.createOMElement("submitOneWay",
> > >> >> omNs);
> > >> >> >>         OMElement bodymess = fac.createOMElement("bodymessage",
> > >> >> omNs);
> > >> >> >>                 // Add Text
> > >> >> >>         String
> bodymessvalue=createSoapMessageString(fileXMLName);
> > >> >> >>         payload.addChild(fac.createOMText(bodymess,
> > >> bodymessvalue));
> > >> >> >>
> > >> >> >>         // Add text file
> > >> >> >>         OMElement attach=createAttachment(fac,omNs);
> > >> >> >>         attach = fac.createOMElement("attachment", omNs);
> > >> >> >>         File fileTxt = new File(fileName);
> > >> >> >>         FileDataSource dataSource = new
> FileDataSource(fileTxt);
> > >> >> >>         DataHandler expectedDH = new DataHandler(dataSource);
> > >> >> >>         OMText textData = fac.createOMText(expectedDH,
true);
> > >> >> >>         System.out.println("Client:contentID" +
> > >> >> >> textData.getContentID());
> > >> >> >>         attach.addChild(textData);
> > >> >> >>         payload.addChild(attach);
> > >> >> >>
> > >> >> >>         System.out.println("callAXIOM, doc sent : "+payload);
> > >> >> >>         Options options = new Options();
> > >> >> >>         options.setTo(targetEPR);
> > >> >> >>         options.setAction("submitOneWay");
> > >> >> >>         options.setTransportInProtocol(Constants.TRANSPORT_HTTP
> );
> > >> >> >>         options.setUseSeparateListener(false);
> > >> >> >>         options.setProperty(Constants.Configuration.ENABLE_MTOM
> ,
> > >> >> >> Constants.VALUE_TRUE);
> > >> >> >>
> > >> >> >>
> > >> >>
> > >> options.setProperty(MessageContextConstants.TRANSPORT_URL
> ,targetEPRTcpmon);
> > >>
> > >> >>
> > >> >> >>
> > >> >> >>         sender.setOptions(options);
> > >> >> >>
> > >> >> >>         options.setProperty(
> SandeshaClientConstants.LAST_MESSAGE,
> > >> >> >> "true");
> > >> >> >>         sender.fireAndForget(payload);
> > >> >> >>         Thread.sleep(10000);
> > >> >> >>         System.out.println("NO RETURN FOR WEBSERVICE");
> > >> >> >>
> > >> >> >>    }
> > >> >> >>
> > >> >> >> I join also the configuration file : client_axis2.xml
> > >> >> >>
> > >> >> >> Can someone have an idea?
> > >> >> >>
> > >> >> >> Thanks for your help.
> > >> >> >>
> > >> >> >> Regards
> > >> >> >> Elodie
> > >> >> >>
> > >> >>
> > >> >>
> ---------------------------------------------------------------------
> > >> >> To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> > >> >> For additional commands, e-mail: sandesha-dev-help@ws.apache.org
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >>
> > >>
> > >
> > >
> >
> >
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Mime
View raw message