Sorry evrybody ..
The error was with me ...
If you see the above code i had typed :
QName serviceId = new QName("http://ode/bpel/unit-test.wsd
","HelloService");
I missed a ' l ' so i got all sorts of things !!
Found out now..bpel-test working fine !
Thanks..Sorry for the series of mails.
Sam...
On 12/1/06, sam tam <[EMAIL PROTECTED]> wrote:
Ok... I think Element elem = DOMUtils.stringToDOM(in); is working fine ..
I did run the test case for DOM Utils module
Both stringToDOM and domToString are working fine..
So Thanks Alex for finding it out !
So now the ODE runtime gives null response !
Plz guide me through ..
Sam..Tam..
On 12/1/06, sam tam < [EMAIL PROTECTED]> wrote:
>
> To add :
>
> I did a trace and this is what the variable Element elem has after the
> step
> Element elem = DOMUtils.stringToDOM(in);
>
> _________________________________________________________________
> elem DeferredElementNSImpl (id=61)
> attributes null
> fBufferStr null
> firstChild null
> flags 28
> fNodeIndex 1
> fNodeListCache null
> localName "message"
> name "message"
> namespaceURI null
> nextSibling null
> ownerDocument DeferredDocumentImpl (id=73)
> [#document: null]
> ownerNode DeferredDocumentImpl (id=73)
> [#document: null]
> previousSibling DeferredElementNSImpl (id=61)
> [message: null]
> type null
>
> ______________________________________________________________
>
> It has Null.. I thought the above trace would be useful .
>
>
> Also i have added into setup() of Bpeltest.java of bpel-test module teh
> below fn. (I forgot this to post in my prev mail)
>
> store.registerListener(new ProcessStoreListener() {
> public void onProcessStoreEvent(ProcessStoreEvent event) {
> // bounce the process
> server.unregister(event.pid);
> server.register(store.getProcessConfiguration(event.pid
> ));
> }
> });
> So there is no problems in starting the ODE runtime ?( i think) but the
> problem
> is that DOMUtils.stringToDOM(in); returns NULL
>
>
> Do throw some light on this !!
>
> Thanks in advance
> Sam..
>
>
>
> On 12/1/06, sam tam < [EMAIL PROTECTED]> wrote:
> >
> > Thank You Alex and Matthieu for your reply .
> >
> > I downloaded a fresh repo for ODE today .So i think i have all the
> > files (chnaged ones) with me .
> >
> > Gave a run of bpel-test module.
> >
> > I did change a few :
> >
> > bpeltest.java ::
> >
> > protected void setUp() throws Exception {
> > server = new BpelServerImpl();
> > mexContext = new MessageExchangeContextImpl();
> > server.setDaoConnectionFactory(new
> > BpelDAOConnectionFactoryImpl());
> > server.setInMemDaoConnectionFactory(new
> > BpelDAOConnectionFactoryImpl());
> > server.setScheduler(new TestScheduler());
> > server.setBindingContext(new BindingContextImpl());
> > server.setMessageExchangeContext (mexContext);
> > store = new ProcessStoreImpl();
> > server.init();
> > server.start();
> > }
> > ___________________________________
> >
> > protected void tearDown() throws Exception {
> > server.stop();
> > }
> > ___________________________________________
> > //deployDir -target/test-classes/bpel/2.0/HelloWorld2
> >
> > protected void go(String deployDir) throws Exception {
> >
> > Collection<QName> procs = store.deploy(new
> > File(deployDir));
> > for (QName procName : procs) {
> > server.register(store.getProcessConfiguration
> > (procName));
> > }
> >
> > QName serviceId = new QName("
> > http://ode/bpel/unit-test.wsd","HelloService");
> >
> > String operation = "hello";
> >
> > MyRoleMessageExchange mex = server.getEngine()
> > .createMessageExchange("", serviceId, operation);
> >
> > String in =
> > "<message><TestPart>SAM</TestPart></message>";
> >
> > mexContext.clearCurrentResponse();
> >
> > Message request = mex.createMessage(null);
> >
> > System.out.println("Input String = "+in);
> >
> > Element elem = DOMUtils.stringToDOM(in);
> >
> > System.out.println("Input Element = "+elem.toString());
> >
> > request.setMessage(elem);
> >
> > System.out.println("Input Request=
> > "+request.toString());
> >
> > mex.invoke(request);
> > Message response = mex.getResponse(); // Get the
> > response from ODE
> > String resp = DOMUtils.domToString(response.getMessage
> > ());
> > System.out.println(resp);
> > }
> >
> >
> > }
> >
___________________________________________________________________________________
> >
> > Console ::
> >
> > log4j:WARN No appenders could be found for logger (
> > org.apache.ode.store.hib.DbConfStoreConnectionFactory).
> > log4j:WARN Please initialize the log4j system properly.
> >
> > Input String = <message><TestPart>SAM</TestPart></message>
> >
> > Input Element = [message: null]
> >
> > Input Request= [EMAIL PROTECTED]
> >
> > java.lang.NullPointerException: null message!
> > at org.apache.ode.bpel.engine.MessageImpl .<init>(MessageImpl.java
> > :40)
> > at org.apache.ode.bpel.engine.MessageExchangeImpl.getResponse(
> > MessageExchangeImpl.java:112)
> > at org.apache.ode.test.BPELTest1.go(BPELTest.java:150)
> > at org.apache.ode.test.BPELTest.main (BPELTest.java:55)
> >
> >
> >
> > _________________________________________________________________________
> >
> > So as said before the input request to mex itself is null the how
> > could it return ?
> >
> > Can any plz shed some info on this. Thanks Alex for your help in this
> > . Plz update if you find anything on this issue.
> >
> >
> > Sam...
> >
> >
> >
> > On 11/30/06, Matthieu Riou < [EMAIL PROTECTED]> wrote:
> > >
> > > Sam, update the bpel-test module and try again. A listener must be
> > > registered on the store to notify the engine of new deployments and
> > > this was
> > > missing. I've just committed the change.
> > >
> > > Matthieu
> > >
> > > On 11/30/06, Alex Boisvert < [EMAIL PROTECTED]> wrote:
> > > >
> > > > Nothing wrong with DOMUtils.stringToDom()... the NPE is caused by
> > > a null
> > > > response message which indicates the process didn't <reply> on the
> > >
> > > > MessageExchange. So I would debug the process execution behind
> > > the
> > > > MessageExchange to find out why no response is being sent back.
> > > >
> > > > alex
> > > >
> > > >
> > > > On 11/30/06, sam tam < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > I was running ode-test module
> > > > >
> > > > > I changed BpelTest.java for testign only HelloWorld2
> > > > >
> > > > > I gave the depDir path in the call to the method go().
> > > > >
> > > > > I invoked the method setUp()
> > > > >
> > > > > Then in the method go:
> > > > >
> > > > > I printed the values of the various steps in that method
> > > > >
> > > > > Console ::
> > > > >
> > > > >
> > > > > Server.Start - success
> > > > > MEX = {MyRoleMex#0 [Client ] calling {
> > > > >
http://ode/bpel/unit-test.wsd}HelloService.hello(...)<http://ode/bpel/unit-test.wsd%7DHelloService.hello%28...%29>
> > > }
> > > > > Input String = <message><TestPart>SAM</TestPart></message>
> > > > > Input Element = [message: null]
> > > > > Input Request= [EMAIL PROTECTED]
> > > > > Before Invoking ODE with the Input request
> > > > > After Invoking ODE
> > > > >
> > > > > java.lang.NullPointerException: null message!
> > > > > at org.apache.ode.bpel.engine.MessageImpl.<init>(
> > > MessageImpl.java
> > > > :40)
> > > > > at
> > > org.apache.ode.bpel.engine.MessageExchangeImpl.getResponse(
> > > > > MessageExchangeImpl.java:112)
> > > > > at org.apache.ode.test.BPELTest1.go(BPELTest.java:135)
> > > > > at org.apache.ode.test.BPELTest.main(BPELTest.java:49)
> > > > >
> > > > >
> > > > > I get elem=null after Element elem = DOMUtils.stringToDOM(in); //
> > > > where
> > > > > in=<message><TestPart>SAM</TestPart></message>
> > > > >
> > > > > Is stringToDom not working ??
> > > > >
> > > > > I tried adding the ode-utils and all necessary jars but still am
> > > stuck
> > > > > here..
> > > > >
> > > > > Can anyone plz shed some light on this !!
> > > > >
> > > > > Thanx in advance ..
> > > > >
> > > > >
> > > > > Sam...Tam
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> > --
>
>
>
>
>
.