[servicemix-dev] jax-ws problem

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[servicemix-dev] jax-ws problem

rvangala
Hi iam trying to bind a java Web service available
through axis in tomcat. iam using service mix 2.0,
The component i wrote is like this:

<component id="creditApprovalService"
service="creditApprovalService"
                         
class="org.servicemix.components.jaxws.JAXWSOutBinding">
                  <property name="wsdlResource"
                           
value="http://localhost:8080/axis/services/CreditServerImpl?wsdl"/>
                            </component>
           
   

But i am getting this error while running it ,


     [java] java.lang.NoClassDefFoundError:
org/w3c/dom/DOMError
     [java]     at
org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown
Sou
rce)
     [java]     at
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocument
Builder(Unknown Source)
     [java]     at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
.createDocumentBuilder(XmlBeanDefinitionReader.java:218)
     [java]     at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
.loadBeanDefinitions(XmlBeanDefinitionReader.java:155)
     [java]     at
org.springframework.beans.factory.support.AbstractBeanDefinit
ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
     [java]     at
org.springframework.beans.factory.support.AbstractBeanDefinit
ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
     [java]     at
org.springframework.context.support.AbstractXmlApplicationCon
text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
     [java]     at
org.springframework.context.support.AbstractXmlApplicationCon
text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
     [java]     at
org.springframework.context.support.AbstractRefreshableApplic
ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
     [java]     at
org.springframework.context.support.AbstractApplicationContex
t.refresh(AbstractApplicationContext.java:268)
     [java]     at
org.springframework.context.support.ClassPathXmlApplicationCo
ntext.<init>(ClassPathXmlApplicationContext.java:81)
     [java]     at
org.springframework.context.support.ClassPathXmlApplicationCo
ntext.<init>(ClassPathXmlApplicationContext.java:66)
     [java]     at
org.springframework.context.support.ClassPathXmlApplicationCo
ntext.<init>(ClassPathXmlApplicationContext.java:57)

Iam not sure why iam getting this, If i add an extra
xcerces.jar to classpath, it says,:

     [java] (xml.XmlBeanDefinitionReader         158 )
Loading XML bean definiti
ons from class path resource [ps-sm.xml]
     [java]
org.springframework.beans.factory.BeanDefinitionStoreException:
Line
 2 in XML document from class path resource
[ps-sm.xml] is invalid; nested excep
tion is org.xml.sax.SAXParseException: Document root
element "beans", must match
 DOCTYPE root "null".
     [java] org.xml.sax.SAXParseException: Document
root element "beans", must m
atch DOCTYPE root "null".
     [java]     at
org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)

     [java]     at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuil
derImpl.java:209)
     [java]     at
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:
76)
     [java]     at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
.loadBeanDefinitions(XmlBeanDefinitionReader.java:161)
     [java]     at
org.springframework.beans.factory.support.AbstractBeanDefinit
ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
     [java]     at
org.springframework.beans.factory.support.AbstractBeanDefinit
ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
     [java]     at
org.springframework.context.support.AbstractXmlApplicationCon
text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
     [java]     at
org.springframework.context.support.AbstractXmlApplicationCon
text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
     [java]     at
org.springframework.context.support.AbstractRefreshableApplic
ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
     [java]     at
org.springframework.context.support.AbstractApplicationContex
t.refresh(AbstractApplicationContext.java:268)


Can some body help me?
Thanks



               
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-dev] jax-ws problem

Guillaume Nodet-3
You should download the
http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-1.3.02.jar
jar and put it in the lib directory.

This will be fixed in next bug fix release of v2.0.

Cheers,
Guillaume Nodet

vangala rajani wrote:

>Hi iam trying to bind a java Web service available
>through axis in tomcat. iam using service mix 2.0,
>The component i wrote is like this:
>
><component id="creditApprovalService"
>service="creditApprovalService"
>          
>class="org.servicemix.components.jaxws.JAXWSOutBinding">
>  <property name="wsdlResource"
>          
>value="http://localhost:8080/axis/services/CreditServerImpl?wsdl"/>
>            </component>
>  
>  
>
>But i am getting this error while running it ,
>
>
>     [java] java.lang.NoClassDefFoundError:
>org/w3c/dom/DOMError
>     [java]     at
>org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown
>Sou
>rce)
>     [java]     at
>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocument
>Builder(Unknown Source)
>     [java]     at
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>.createDocumentBuilder(XmlBeanDefinitionReader.java:218)
>     [java]     at
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>.loadBeanDefinitions(XmlBeanDefinitionReader.java:155)
>     [java]     at
>org.springframework.beans.factory.support.AbstractBeanDefinit
>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>     [java]     at
>org.springframework.beans.factory.support.AbstractBeanDefinit
>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>     [java]     at
>org.springframework.context.support.AbstractXmlApplicationCon
>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>     [java]     at
>org.springframework.context.support.AbstractXmlApplicationCon
>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
>     [java]     at
>org.springframework.context.support.AbstractRefreshableApplic
>ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>     [java]     at
>org.springframework.context.support.AbstractApplicationContex
>t.refresh(AbstractApplicationContext.java:268)
>     [java]     at
>org.springframework.context.support.ClassPathXmlApplicationCo
>ntext.<init>(ClassPathXmlApplicationContext.java:81)
>     [java]     at
>org.springframework.context.support.ClassPathXmlApplicationCo
>ntext.<init>(ClassPathXmlApplicationContext.java:66)
>     [java]     at
>org.springframework.context.support.ClassPathXmlApplicationCo
>ntext.<init>(ClassPathXmlApplicationContext.java:57)
>
>Iam not sure why iam getting this, If i add an extra
>xcerces.jar to classpath, it says,:
>
>     [java] (xml.XmlBeanDefinitionReader         158 )
>Loading XML bean definiti
>ons from class path resource [ps-sm.xml]
>     [java]
>org.springframework.beans.factory.BeanDefinitionStoreException:
>Line
> 2 in XML document from class path resource
>[ps-sm.xml] is invalid; nested excep
>tion is org.xml.sax.SAXParseException: Document root
>element "beans", must match
> DOCTYPE root "null".
>     [java] org.xml.sax.SAXParseException: Document
>root element "beans", must m
>atch DOCTYPE root "null".
>     [java]     at
>org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
>
>     [java]     at
>org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuil
>derImpl.java:209)
>     [java]     at
>javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:
>76)
>     [java]     at
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>.loadBeanDefinitions(XmlBeanDefinitionReader.java:161)
>     [java]     at
>org.springframework.beans.factory.support.AbstractBeanDefinit
>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>     [java]     at
>org.springframework.beans.factory.support.AbstractBeanDefinit
>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>     [java]     at
>org.springframework.context.support.AbstractXmlApplicationCon
>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>     [java]     at
>org.springframework.context.support.AbstractXmlApplicationCon
>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
>     [java]     at
>org.springframework.context.support.AbstractRefreshableApplic
>ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>     [java]     at
>org.springframework.context.support.AbstractApplicationContex
>t.refresh(AbstractApplicationContext.java:268)
>
>
>Can some body help me?
>Thanks
>
>
>
>
>__________________________________
>Start your day with Yahoo! - Make it your home page!
>http://www.yahoo.com/r/hs
>
>
>  
>

Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-dev] jax-ws problem

rvangala
Ya ,Thanks for reply, I already did that part, if i
have that jar in my library,
Iam getting this error:



     [java] (xml.XmlBeanDefinitionReader         158 )
Loading XML bean definiti
ons from class path resource [ps-sm.xml]
     [java]
org.springframework.beans.factory.BeanDefinitionStoreException:
Line
 2 in XML document from class path resource
[ps-sm.xml] is invalid; nested excep
tion is org.xml.sax.SAXParseException: Document root
element "beans", must match
 DOCTYPE root "null".
     [java] org.xml.sax.SAXParseException: Document
root element "beans", must m
atch DOCTYPE root "null".
     [java]     at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce
ption(Unknown Source)
     [java]     at
org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Sour
ce)
     [java]     at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
S
ource)
     [java]     at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
S
ource)
     [java]     at
org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecifi
ed(Unknown Source)
     [java]     at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement
(Unknown Source)
     [java]     at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unkno
wn Source)
     [java]     at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSta
rtElement(Unknown Source)
     [java]     at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatch
er.scanRootElementHook(Unknown Source)
     [java]     at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen



Hope you have a sloution for this,


--- Guillaume Nodet <[hidden email]>
wrote:

> You should download the
>
http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-1.3.02.jar

> jar and put it in the lib directory.
>
> This will be fixed in next bug fix release of v2.0.
>
> Cheers,
> Guillaume Nodet
>
> vangala rajani wrote:
>
> >Hi iam trying to bind a java Web service available
> >through axis in tomcat. iam using service mix 2.0,
> >The component i wrote is like this:
> >
> ><component id="creditApprovalService"
> >service="creditApprovalService"
> >          
>
>class="org.servicemix.components.jaxws.JAXWSOutBinding">
> >  <property name="wsdlResource"
> >          
>
>value="http://localhost:8080/axis/services/CreditServerImpl?wsdl"/>
> >            </component>
> >  
> >  
> >
> >But i am getting this error while running it ,
> >
> >
> >     [java] java.lang.NoClassDefFoundError:
> >org/w3c/dom/DOMError
> >     [java]     at
>
>org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown
> >Sou
> >rce)
> >     [java]     at
>
>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocument
> >Builder(Unknown Source)
> >     [java]     at
>
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>
>.createDocumentBuilder(XmlBeanDefinitionReader.java:218)
> >     [java]     at
>
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>
>.loadBeanDefinitions(XmlBeanDefinitionReader.java:155)
> >     [java]     at
>
>org.springframework.beans.factory.support.AbstractBeanDefinit
>
>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
> >     [java]     at
>
>org.springframework.beans.factory.support.AbstractBeanDefinit
>
>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
> >     [java]     at
>
>org.springframework.context.support.AbstractXmlApplicationCon
>
>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
> >     [java]     at
>
>org.springframework.context.support.AbstractXmlApplicationCon
>
>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
> >     [java]     at
>
>org.springframework.context.support.AbstractRefreshableApplic
>
>ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
> >     [java]     at
>
>org.springframework.context.support.AbstractApplicationContex
> >t.refresh(AbstractApplicationContext.java:268)
> >     [java]     at
>
>org.springframework.context.support.ClassPathXmlApplicationCo
>
>ntext.<init>(ClassPathXmlApplicationContext.java:81)
> >     [java]     at
>
>org.springframework.context.support.ClassPathXmlApplicationCo
>
>ntext.<init>(ClassPathXmlApplicationContext.java:66)
> >     [java]     at
>
>org.springframework.context.support.ClassPathXmlApplicationCo
>
>ntext.<init>(ClassPathXmlApplicationContext.java:57)
> >
> >Iam not sure why iam getting this, If i add an
> extra
> >xcerces.jar to classpath, it says,:
> >
> >     [java] (xml.XmlBeanDefinitionReader        
> 158 )
> >Loading XML bean definiti
> >ons from class path resource [ps-sm.xml]
> >     [java]
>
>org.springframework.beans.factory.BeanDefinitionStoreException:
> >Line
> > 2 in XML document from class path resource
> >[ps-sm.xml] is invalid; nested excep
> >tion is org.xml.sax.SAXParseException: Document
> root
> >element "beans", must match
> > DOCTYPE root "null".
> >     [java] org.xml.sax.SAXParseException: Document
> >root element "beans", must m
> >atch DOCTYPE root "null".
> >     [java]     at
>
>org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
> >
> >     [java]     at
>
>org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuil
> >derImpl.java:209)
> >     [java]     at
>
>javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:
> >76)
> >     [java]     at
>
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>
>.loadBeanDefinitions(XmlBeanDefinitionReader.java:161)
> >     [java]     at
>
>org.springframework.beans.factory.support.AbstractBeanDefinit
>
>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
> >     [java]     at
>
>org.springframework.beans.factory.support.AbstractBeanDefinit
>
>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
> >     [java]     at
>
>org.springframework.context.support.AbstractXmlApplicationCon
>
>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
> >     [java]     at
>
>org.springframework.context.support.AbstractXmlApplicationCon
>
>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
> >     [java]     at
>
>org.springframework.context.support.AbstractRefreshableApplic
>
>ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
> >     [java]     at
>
>org.springframework.context.support.AbstractApplicationContex
> >t.refresh(AbstractApplicationContext.java:268)
> >
> >
> >Can some body help me?
> >Thanks
> >
> >
> >
> >
> >__________________________________
> >Start your day with Yahoo! - Make it your home
> page!
> >http://www.yahoo.com/r/hs
> >
> >
> >  
> >
>
>



       
               
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-dev] jax-ws problem

Guillaume Nodet-3
Certainly, we will have one ;)
Could you please post the full stack trace and log.
This one is not sufficient.

Cheers,
Guillaume Nodet

vangala rajani wrote:

>Ya ,Thanks for reply, I already did that part, if i
>have that jar in my library,
>Iam getting this error:
>
>
>
>     [java] (xml.XmlBeanDefinitionReader         158 )
>Loading XML bean definiti
>ons from class path resource [ps-sm.xml]
>     [java]
>org.springframework.beans.factory.BeanDefinitionStoreException:
>Line
> 2 in XML document from class path resource
>[ps-sm.xml] is invalid; nested excep
>tion is org.xml.sax.SAXParseException: Document root
>element "beans", must match
> DOCTYPE root "null".
>     [java] org.xml.sax.SAXParseException: Document
>root element "beans", must m
>atch DOCTYPE root "null".
>     [java]     at
>org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce
>ption(Unknown Source)
>     [java]     at
>org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
>Sour
>ce)
>     [java]     at
>org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>S
>ource)
>     [java]     at
>org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>S
>ource)
>     [java]     at
>org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecifi
>ed(Unknown Source)
>     [java]     at
>org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement
>(Unknown Source)
>     [java]     at
>org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unkno
>wn Source)
>     [java]     at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSta
>rtElement(Unknown Source)
>     [java]     at
>org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatch
>er.scanRootElementHook(Unknown Source)
>     [java]     at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen
>
>
>
>Hope you have a sloution for this,
>
>
>--- Guillaume Nodet <[hidden email]>
>wrote:
>
>  
>
>>You should download the
>>
>>    
>>
>http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-1.3.02.jar
>  
>
>>jar and put it in the lib directory.
>>
>>This will be fixed in next bug fix release of v2.0.
>>
>>Cheers,
>>Guillaume Nodet
>>
>>vangala rajani wrote:
>>
>>    
>>
>>>Hi iam trying to bind a java Web service available
>>>through axis in tomcat. iam using service mix 2.0,
>>>The component i wrote is like this:
>>>
>>><component id="creditApprovalService"
>>>service="creditApprovalService"
>>>          
>>>      
>>>
>>class="org.servicemix.components.jaxws.JAXWSOutBinding">
>>    
>>
>>>  <property name="wsdlResource"
>>>          
>>>      
>>>
>>value="http://localhost:8080/axis/services/CreditServerImpl?wsdl"/>
>>    
>>
>>>            </component>
>>>  
>>>  
>>>
>>>But i am getting this error while running it ,
>>>
>>>
>>>    [java] java.lang.NoClassDefFoundError:
>>>org/w3c/dom/DOMError
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown
>>    
>>
>>>Sou
>>>rce)
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocument
>>    
>>
>>>Builder(Unknown Source)
>>>    [java]     at
>>>      
>>>
>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>>
>>.createDocumentBuilder(XmlBeanDefinitionReader.java:218)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>>
>>.loadBeanDefinitions(XmlBeanDefinitionReader.java:155)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.beans.factory.support.AbstractBeanDefinit
>>
>>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.beans.factory.support.AbstractBeanDefinit
>>
>>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.AbstractXmlApplicationCon
>>
>>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.AbstractXmlApplicationCon
>>
>>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.AbstractRefreshableApplic
>>
>>ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.AbstractApplicationContex
>>    
>>
>>>t.refresh(AbstractApplicationContext.java:268)
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.ClassPathXmlApplicationCo
>>
>>ntext.<init>(ClassPathXmlApplicationContext.java:81)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.ClassPathXmlApplicationCo
>>
>>ntext.<init>(ClassPathXmlApplicationContext.java:66)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.ClassPathXmlApplicationCo
>>
>>ntext.<init>(ClassPathXmlApplicationContext.java:57)
>>    
>>
>>>Iam not sure why iam getting this, If i add an
>>>      
>>>
>>extra
>>    
>>
>>>xcerces.jar to classpath, it says,:
>>>
>>>    [java] (xml.XmlBeanDefinitionReader        
>>>      
>>>
>>158 )
>>    
>>
>>>Loading XML bean definiti
>>>ons from class path resource [ps-sm.xml]
>>>    [java]
>>>      
>>>
>>org.springframework.beans.factory.BeanDefinitionStoreException:
>>    
>>
>>>Line
>>>2 in XML document from class path resource
>>>[ps-sm.xml] is invalid; nested excep
>>>tion is org.xml.sax.SAXParseException: Document
>>>      
>>>
>>root
>>    
>>
>>>element "beans", must match
>>>DOCTYPE root "null".
>>>    [java] org.xml.sax.SAXParseException: Document
>>>root element "beans", must m
>>>atch DOCTYPE root "null".
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuil
>>    
>>
>>>derImpl.java:209)
>>>    [java]     at
>>>      
>>>
>>javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:
>>    
>>
>>>76)
>>>    [java]     at
>>>      
>>>
>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>>
>>.loadBeanDefinitions(XmlBeanDefinitionReader.java:161)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.beans.factory.support.AbstractBeanDefinit
>>
>>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.beans.factory.support.AbstractBeanDefinit
>>
>>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.AbstractXmlApplicationCon
>>
>>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.AbstractXmlApplicationCon
>>
>>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.AbstractRefreshableApplic
>>
>>ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>>    
>>
>>>    [java]     at
>>>      
>>>
>>org.springframework.context.support.AbstractApplicationContex
>>    
>>
>>>t.refresh(AbstractApplicationContext.java:268)
>>>
>>>
>>>Can some body help me?
>>>Thanks
>>>
>>>
>>>
>>>
>>>__________________________________
>>>Start your day with Yahoo! - Make it your home
>>>      
>>>
>>page!
>>    
>>
>>>http://www.yahoo.com/r/hs
>>>
>>>
>>>
>>>
>>>      
>>>
>>    
>>
>
>
>
>
>
>__________________________________
>Yahoo! Mail - PC Magazine Editors' Choice 2005
>http://mail.yahoo.com
>
>
>  
>

Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-dev] jax-ws problem

rvangala
This is the error iam getting **************
driver.run:
     [java] (xml.XmlBeanDefinitionReader         158 )
Loading XML bean definiti
ons from class path resource [ps-sm.xml]
     [java]
org.springframework.beans.factory.BeanDefinitionStoreException:
Line
 2 in XML document from class path resource
[ps-sm.xml] is invalid; nested excep
tion is org.xml.sax.SAXParseException: Document root
element "beans", must match
 DOCTYPE root "null".
     [java] org.xml.sax.SAXParseException: Document
root element "beans", must m
atch DOCTYPE root "null".
     [java]     at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce
ption(Unknown Source)
     [java]     at
org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Sour
ce)
     [java]     at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
S
ource)
     [java]     at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
S
ource)
     [java]     at
org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecifi
ed(Unknown Source)
     [java]     at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement
(Unknown Source)
     [java]     at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unkno
wn Source)
     [java]     at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSta
rtElement(Unknown Source)
     [java]     at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatch
er.scanRootElementHook(Unknown Source)
     [java]     at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen
tContentDispatcher.dispatch(Unknown Source)
     [java]     at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDoc
ument(Unknown Source)
     [java]     at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
So
urce)
     [java]     at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
So
urce)
     [java]     at
org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
     [java]     at
org.apache.xerces.parsers.DOMParser.parse(Unknown
Source)
     [java]     at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
Sour
ce)
     [java]     at
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:
76)
     [java]     at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
.loadBeanDefinitions(XmlBeanDefinitionReader.java:161)
     [java]     at
org.springframework.beans.factory.support.AbstractBeanDefinit
ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
     [java]     at
org.springframework.beans.factory.support.AbstractBeanDefinit
ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
     [java]     at
org.springframework.context.support.AbstractXmlApplicationCon
text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
     [java]     at
org.springframework.context.support.AbstractXmlApplicationCon
text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
     [java]     at
org.springframework.context.support.AbstractRefreshableApplic
ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
     [java]     at
org.springframework.context.support.AbstractApplicationContex
t.refresh(AbstractApplicationContext.java:268)
     [java]     at
org.springframework.context.support.ClassPathXmlApplicationCo
ntext.<init>(ClassPathXmlApplicationContext.java:81)
     [java]     at
org.springframework.context.support.ClassPathXmlApplicationCo
ntext.<init>(ClassPathXmlApplicationContext.java:66)
     [java]     at
org.springframework.context.support.ClassPathXmlApplicationCo
ntext.<init>(ClassPathXmlApplicationContext.java:57)
     [java]     at
WsifClient.createBeanFactory(WsifClient.java:55)
     [java]     at
WsifClient.setUp(WsifClient.java:39)
     [java]     at
WsifClient.main(WsifClient.java:137)
     [java] Exception in thread "main"
     [java] Java Result: 1

BUILD SUCCESSFUL
and my WsifClient code is :**********************

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
// import org.servicemix.examples.Receiver;
import
org.servicemix.jbi.container.SpringJBIContainer;
import org.servicemix.jbi.resolver.EndpointResolver;
import org.servicemix.jbi.jaxp.SourceTransformer;
import
org.springframework.context.support.AbstractXmlApplicationContext;
import
org.springframework.context.support.ClassPathXmlApplicationContext;

//import javax.jbi.JBIException;
import javax.jbi.messaging.InOnly;
import javax.jbi.messaging.NormalizedMessage;
import javax.jbi.messaging.InOut;
import javax.jbi.messaging.MessagingException;
import javax.xml.namespace.QName;
import javax.xml.transform.stream.StreamSource;
import org.servicemix.jbi.*;
import org.servicemix.client.*;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;

import org.activemq.ActiveMQConnectionFactory;
import org.activemq.message.ActiveMQTopic;
public class WsifClient {

                ServiceMixClient client;
         protected AbstractXmlApplicationContext context;

         public WsifClient() {

                 }

     protected void setUp() throws Exception {
        context = createBeanFactory();
         context.setXmlValidating(false);

         client = (ServiceMixClient)
getBean("client");
        SpringJBIContainer jbi = (SpringJBIContainer)
getBean("jbi");
         // (new ProductListenerThread()).start();

    }

     protected Object getBean(String name) {
         Object answer = context.getBean(name);
       //  assertNotNull("Could not find object in
Spring for key: " + name, answer);
         return answer;
     }

     protected AbstractXmlApplicationContext
createBeanFactory() {
         return new
ClassPathXmlApplicationContext("/ps-sm.xml");

     }


                public void testSend() throws Exception {

         InOut exchange =
client.createInOutExchange();
         System.out.println("got excahnge
@@@@@@@@@@@@");

  //exchange.getInMessage().setProperty("ordnum",
"112114");
   exchange.getInMessage().setProperty("in0",
"112114");
  exchange.getInMessage().setProperty("in1",
"112114");

    System.out.println("got excahnge
#############");
  //QName service = new QName("http://localhost/",
"loginAccept");
  //     System.out.println("got excahnge
&&&&&&&&&7");
  //EndpointResolver resolver =
client.createResolverForService(service);

   //System.out.println("got excahnge
^^^^^^^^^^^^^^^");

                      // exchange.setService(service);
        //        System.out.println("got excahnge
++++++++++++");

  client.sendSync(exchange);
    System.out.println("got excahnge
$$$$$$$$$$$$$");

  NormalizedMessage out = exchange.getOutMessage();
   System.out.println("got excahnge
***************");

  int result =
((Integer)out.getProperty("approveUserReturn")).intValue();

                        System.out.println("Found value: " + result);
      }

 class ProductListenerThread extends Thread {

         public ProductListenerThread()
         { }
         public void run()
         {
                  while(true) {
try{
         System.out.println("Response was: ***********");

     ActiveMQConnectionFactory factory = new
ActiveMQConnectionFactory("tcp://localhost:61616");
               // ActiveMQTopic pubTopic = new
ActiveMQTopic("demo.org.servicemix.source");
                ActiveMQTopic subTopic = new
ActiveMQTopic("demo.org.servicemix.result");
// System.out.println("Response was:
***********"+m.getText());

               // System.out.println("Connecting to JMS
server.");
                Connection connection =
factory.createConnection();
                Session session =
connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
               // MessageProducer producer =
session.createProducer(pubTopic);
                MessageConsumer consumer =
session.createConsumer(subTopic);
                 System.out.println("Response was:
***********");

                connection.start();
                 System.out.println("Response was:
***********");




                System.out.println("Received  request.");
               
//producer.send(session.createTextMessage("<timestamp>"+new
Date()+"</timestamp>"));
                TextMessage m = (TextMessage)
consumer.receive(1000*10);
            System.out.println("Response was:
***********"+m.getText());

        System.out.println("Closing.");


   // connection.close();
        }catch(Exception e)
        {
        }
}
}
}


 public static void main(String[] args) throws
Exception {
WsifClient wc=new WsifClient();
wc.setUp();
wc.testSend();
}



}and my .xml file for servicemix is **************


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:my="http://servicemix.org/demo/">
  <!-- the JBI container -->
  <container id="jbi">
  <property name="useMBeanServer" value="false"/>
   <property name="createMBeanServer" value="false"/>
   <property name="dumpStats" value="true"/>
   <property name="statsInterval" value="10"/>
 
        <components>
                <component id="loginAccept" service="loginAccept"
class="org.servicemix.components.wsif.WSIFBinding">
                  <property name="definitionResource"
value="/Login.wsdl"/>
  </component>
 
 
  <!-- START SNIPPET: send -->
                <component id="httpSender" service="httpSender"
class="org.servicemix.components.http.HttpInvoker">
                            <property name="url"
value="http://localhost:8912/"/>
                </component>
                      <!-- END SNIPPET: send -->
               
                      <!-- START SNIPPET: binding -->
                <component id="httpReceiver" service="httpBinding"
class="org.servicemix.components.http.HttpConnector"
destinationService="loginAccept">
                        <property name="host" value="localhost"/>
                        <property name="port" value="8912"/>
                       
      </component>
     
     
      <component id="creditApprovalService"
service="creditApprovalService"
                         
class="org.servicemix.components.jaxws.JAXWSOutBinding">
                  <property name="wsdlResource"
                           
value="http://localhost:8080/axis/services/CreditServerImpl?wsdl"/>
                            </component>
           
   
  <!-- Subscribe to a JMS destination -->
                      <component id="inputReceiver"
service="inputReceiver"
class="org.servicemix.components.jms.JmsInUsingJCABinding"
destinationService="outputSender">
                        <property name="jcaContainer" ref="jencks"/>
                        <property name="activationSpec">
                          <bean
class="org.activemq.ra.ActiveMQActivationSpec">
                            <property name="destination"
value="demo.org.servicemix.source"/>
                            <property name="destinationType"
value="javax.jms.Topic"/>
                          </bean>
                        </property>
                      </component>
                     
                      <!-- Publish the result to a JMS destination
-->
                      <component id="outputSender"
service="outputSender"
class="org.servicemix.components.jms.JmsSenderComponent">
                        <property name="template">
                          <bean
class="org.springframework.jms.core.JmsTemplate">
                            <property name="connectionFactory">
                              <ref local="jmsFactory"/>
                            </property>
                            <property name="defaultDestinationName"
value="demo.org.servicemix.result"/>
                            <property name="pubSubDomain"
value="true"/>
                          </bean>
                        </property>
                      </component>

   
   <component id="trace" service="trace"
class="org.servicemix.components.util.TraceComponent"/>
 
  </components>
  </container>
 
 
 
  <bean id="jencks" class="org.jencks.JCAContainer"
singleton="true">
 
      <!-- lets use the default configuration of work
manager and transaction manager-->
      <property name="bootstrapContext">
        <bean
class="org.jencks.factory.BootstrapContextFactoryBean">
          <property name="threadPoolSize" value="25"/>
        </bean>
      </property>
 
      <!-- the JCA Resource Adapter -->
      <property name="resourceAdapter">
        <bean id="activeMQResourceAdapter"
class="org.activemq.ra.ActiveMQResourceAdapter"
singleton="true">
          <property name="serverUrl"
value="tcp://localhost:61616"/>
        </bean>
      </property>
  </bean>
 
   <bean id="broker"
class="org.activemq.spring.BrokerFactoryBean">
       <property name="config" value="/activemq.xml"/>
   </bean>
 
  <bean id="transactionManager"
class="org.jencks.factory.TransactionManagerFactoryBean"/>
 
    <bean id="jmsFactory"
class="org.activemq.pool.PooledConnectionFactory">
      <property name="connectionFactory">
        <bean
class="org.activemq.ActiveMQConnectionFactory">
          <property name="brokerURL">
            <value>tcp://localhost:61616</value>
          </property>
        </bean>
      </property>
    </bean>
  <bean id="client"
class="org.servicemix.client.DefaultServiceMixClient">
        <constructor-arg ref="jbi"/>
        <constructor-arg>
        <bean
class="org.servicemix.jbi.container.ActivationSpec">
        <property name="destinationService">
          <qname>creditApprovalService</qname>
          </property>
          </bean>
          </constructor-arg>
     
       
      </bean>

 
</beans>


Thanks


--- Guillaume Nodet <[hidden email]>
wrote:

> Certainly, we will have one ;)
> Could you please post the full stack trace and log.
> This one is not sufficient.
>
> Cheers,
> Guillaume Nodet
>
> vangala rajani wrote:
>
> >Ya ,Thanks for reply, I already did that part, if i
> >have that jar in my library,
> >Iam getting this error:
> >
> >
> >
> >     [java] (xml.XmlBeanDefinitionReader        
> 158 )
> >Loading XML bean definiti
> >ons from class path resource [ps-sm.xml]
> >     [java]
>
>org.springframework.beans.factory.BeanDefinitionStoreException:
> >Line
> > 2 in XML document from class path resource
> >[ps-sm.xml] is invalid; nested excep
> >tion is org.xml.sax.SAXParseException: Document
> root
> >element "beans", must match
> > DOCTYPE root "null".
> >     [java] org.xml.sax.SAXParseException: Document
> >root element "beans", must m
> >atch DOCTYPE root "null".
> >     [java]     at
>
>org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce
> >ption(Unknown Source)
> >     [java]     at
>
>org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
> >Sour
> >ce)
> >     [java]     at
>
>org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> >S
> >ource)
> >     [java]     at
>
>org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> >S
> >ource)
> >     [java]     at
>
>org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecifi
> >ed(Unknown Source)
> >     [java]     at
>
>org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement
> >(Unknown Source)
> >     [java]     at
>
>org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unkno
> >wn Source)
> >     [java]     at
>
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSta
> >rtElement(Unknown Source)
> >     [java]     at
>
>org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatch
> >er.scanRootElementHook(Unknown Source)
> >     [java]     at
>
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen
> >
> >
> >
> >Hope you have a sloution for this,
> >
> >
> >--- Guillaume Nodet
> <[hidden email]>
> >wrote:
> >
> >  
> >
> >>You should download the
> >>
> >>    
> >>
>
>http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-1.3.02.jar
> >  
> >
> >>jar and put it in the lib directory.
> >>
> >>This will be fixed in next bug fix release of
> v2.0.
> >>
> >>Cheers,
> >>Guillaume Nodet
> >>
> >>vangala rajani wrote:
> >>
> >>    
> >>
> >>>Hi iam trying to bind a java Web service
> available
> >>>through axis in tomcat. iam using service mix
> 2.0,
> >>>The component i wrote is like this:
> >>>
> >>><component id="creditApprovalService"
> >>>service="creditApprovalService"
> >>>          
> >>>      
> >>>
>
>>class="org.servicemix.components.jaxws.JAXWSOutBinding">
> >>    
> >>
> >>>  <property name="wsdlResource"
> >>>          
> >>>      
> >>>
>
>>value="http://localhost:8080/axis/services/CreditServerImpl?wsdl"/>
> >>    
> >>
> >>>            </component>
> >>>  
> >>>  
> >>>
> >>>But i am getting this error while running it ,
> >>>
> >>>
> >>>    [java] java.lang.NoClassDefFoundError:
> >>>org/w3c/dom/DOMError
> >>>    [java]     at
> >>>      
> >>>
>
>>org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown
> >>    
> >>
> >>>Sou
> >>>rce)
> >>>    [java]     at
> >>>      
> >>>
>
>>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocument
> >>    
> >>
> >>>Builder(Unknown Source)
> >>>    [java]     at
> >>>      
> >>>
>
>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> >>
>
>>.createDocumentBuilder(XmlBeanDefinitionReader.java:218)
> >>    
> >>
> >>>    [java]     at
> >>>      
> >>>
>
>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> >>
>
>>.loadBeanDefinitions(XmlBeanDefinitionReader.java:155)
> >>    
> >>
> >>>    [java]     at
> >>>      
> >>>
>
>>org.springframework.beans.factory.support.AbstractBeanDefinit
> >>
>
>>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
> >>    
> >>
> >>>    [java]     at
> >>>      
> >>>
>
>>org.springframework.beans.factory.support.AbstractBeanDefinit
> >>
>
>>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
> >>    
> >>
> >>>    [java]     at
> >>>      
> >>>
>
>>org.springframework.context.support.AbstractXmlApplicationCon
> >>
>
>>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
> >>    
> >>
> >>>    [java]     at
> >>>      
> >>>
>
>>org.springframework.context.support.AbstractXmlApplicationCon
> >>
>
>>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
> >>    
> >>
> >>>    [java]     at
> >>>      
> >>>
>
>>org.springframework.context.support.AbstractRefreshableApplic
> >>
>
>>ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
> >>    
> >>
> >>>    [java]     at
> >>>      
> >>>
>
>>org.springframework.context.support.AbstractApplicationContex
> >>    
> >>
>
=== message truncated ===



               
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-dev] jax-ws problem

Guillaume Nodet-3
Sorry, i should have spotted the problem in your first mail.
In ServiceMix 2, the syntax has changed, so you xml
file is no longer valid.
ServiceMix files must be loaded with an xbean context like
org.xbean.spring.context.ClassPathXmlApplicationContext.

If you want to keep your xml file syntax, you must give the application
context
another paramter:

                    List processors = Arrays.asList(new Object[] { new
XBeanProcessor() });
                    context = new
ClassPathXmlApplicationContext("servicemix.xml", processors);

Cheers,
Guillaume Nodet


vangala rajani wrote:

>This is the error iam getting **************
>driver.run:
>     [java] (xml.XmlBeanDefinitionReader         158 )
>Loading XML bean definiti
>ons from class path resource [ps-sm.xml]
>     [java]
>org.springframework.beans.factory.BeanDefinitionStoreException:
>Line
> 2 in XML document from class path resource
>[ps-sm.xml] is invalid; nested excep
>tion is org.xml.sax.SAXParseException: Document root
>element "beans", must match
> DOCTYPE root "null".
>     [java] org.xml.sax.SAXParseException: Document
>root element "beans", must m
>atch DOCTYPE root "null".
>     [java]     at
>org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce
>ption(Unknown Source)
>     [java]     at
>org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
>Sour
>ce)
>     [java]     at
>org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>S
>ource)
>     [java]     at
>org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>S
>ource)
>     [java]     at
>org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecifi
>ed(Unknown Source)
>     [java]     at
>org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement
>(Unknown Source)
>     [java]     at
>org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unkno
>wn Source)
>     [java]     at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSta
>rtElement(Unknown Source)
>     [java]     at
>org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatch
>er.scanRootElementHook(Unknown Source)
>     [java]     at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen
>tContentDispatcher.dispatch(Unknown Source)
>     [java]     at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDoc
>ument(Unknown Source)
>     [java]     at
>org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>So
>urce)
>     [java]     at
>org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>So
>urce)
>     [java]     at
>org.apache.xerces.parsers.XMLParser.parse(Unknown
>Source)
>     [java]     at
>org.apache.xerces.parsers.DOMParser.parse(Unknown
>Source)
>     [java]     at
>org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>Sour
>ce)
>     [java]     at
>javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:
>76)
>     [java]     at
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>.loadBeanDefinitions(XmlBeanDefinitionReader.java:161)
>     [java]     at
>org.springframework.beans.factory.support.AbstractBeanDefinit
>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>     [java]     at
>org.springframework.beans.factory.support.AbstractBeanDefinit
>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>     [java]     at
>org.springframework.context.support.AbstractXmlApplicationCon
>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>     [java]     at
>org.springframework.context.support.AbstractXmlApplicationCon
>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
>     [java]     at
>org.springframework.context.support.AbstractRefreshableApplic
>ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>     [java]     at
>org.springframework.context.support.AbstractApplicationContex
>t.refresh(AbstractApplicationContext.java:268)
>     [java]     at
>org.springframework.context.support.ClassPathXmlApplicationCo
>ntext.<init>(ClassPathXmlApplicationContext.java:81)
>     [java]     at
>org.springframework.context.support.ClassPathXmlApplicationCo
>ntext.<init>(ClassPathXmlApplicationContext.java:66)
>     [java]     at
>org.springframework.context.support.ClassPathXmlApplicationCo
>ntext.<init>(ClassPathXmlApplicationContext.java:57)
>     [java]     at
>WsifClient.createBeanFactory(WsifClient.java:55)
>     [java]     at
>WsifClient.setUp(WsifClient.java:39)
>     [java]     at
>WsifClient.main(WsifClient.java:137)
>     [java] Exception in thread "main"
>     [java] Java Result: 1
>
>BUILD SUCCESSFUL
>and my WsifClient code is :**********************
>
>import org.apache.commons.logging.Log;
>import org.apache.commons.logging.LogFactory;
>// import org.servicemix.examples.Receiver;
>import
>org.servicemix.jbi.container.SpringJBIContainer;
>import org.servicemix.jbi.resolver.EndpointResolver;
>import org.servicemix.jbi.jaxp.SourceTransformer;
>import
>org.springframework.context.support.AbstractXmlApplicationContext;
>import
>org.springframework.context.support.ClassPathXmlApplicationContext;
>
>//import javax.jbi.JBIException;
>import javax.jbi.messaging.InOnly;
>import javax.jbi.messaging.NormalizedMessage;
>import javax.jbi.messaging.InOut;
>import javax.jbi.messaging.MessagingException;
>import javax.xml.namespace.QName;
>import javax.xml.transform.stream.StreamSource;
>import org.servicemix.jbi.*;
>import org.servicemix.client.*;
>import javax.jms.Connection;
>import javax.jms.JMSException;
>import javax.jms.MessageConsumer;
>import javax.jms.MessageProducer;
>import javax.jms.Session;
>import javax.jms.TextMessage;
>
>import org.activemq.ActiveMQConnectionFactory;
>import org.activemq.message.ActiveMQTopic;
>public class WsifClient {
>
> ServiceMixClient client;
> protected AbstractXmlApplicationContext context;
>
> public WsifClient() {
>
> }
>
>     protected void setUp() throws Exception {
>        context = createBeanFactory();
>         context.setXmlValidating(false);
>
>         client = (ServiceMixClient)
>getBean("client");
>        SpringJBIContainer jbi = (SpringJBIContainer)
>getBean("jbi");
>         // (new ProductListenerThread()).start();
>
>    }
>
>     protected Object getBean(String name) {
>         Object answer = context.getBean(name);
>       //  assertNotNull("Could not find object in
>Spring for key: " + name, answer);
>         return answer;
>     }
>
>     protected AbstractXmlApplicationContext
>createBeanFactory() {
>         return new
>ClassPathXmlApplicationContext("/ps-sm.xml");
>
>     }
>
>
> public void testSend() throws Exception {
>
>         InOut exchange =
>client.createInOutExchange();
>         System.out.println("got excahnge
>@@@@@@@@@@@@");
>
> //exchange.getInMessage().setProperty("ordnum",
>"112114");
>  exchange.getInMessage().setProperty("in0",
>"112114");
> exchange.getInMessage().setProperty("in1",
>"112114");
>
>   System.out.println("got excahnge
>#############");
>  //QName service = new QName("http://localhost/",
>"loginAccept");
> //     System.out.println("got excahnge
>&&&&&&&&&7");
>  //EndpointResolver resolver =
>client.createResolverForService(service);
>
>   //System.out.println("got excahnge
>^^^^^^^^^^^^^^^");
>
>      // exchange.setService(service);
> //        System.out.println("got excahnge
>++++++++++++");
>
> client.sendSync(exchange);
>   System.out.println("got excahnge
>$$$$$$$$$$$$$");
>
> NormalizedMessage out = exchange.getOutMessage();
>  System.out.println("got excahnge
>***************");
>
>   int result =
>((Integer)out.getProperty("approveUserReturn")).intValue();
>
> System.out.println("Found value: " + result);
>      }
>
> class ProductListenerThread extends Thread {
>
> public ProductListenerThread()
> { }
> public void run()
> {
>  while(true) {
>try{
> System.out.println("Response was: ***********");
>
>     ActiveMQConnectionFactory factory = new
>ActiveMQConnectionFactory("tcp://localhost:61616");
>       // ActiveMQTopic pubTopic = new
>ActiveMQTopic("demo.org.servicemix.source");
>        ActiveMQTopic subTopic = new
>ActiveMQTopic("demo.org.servicemix.result");
>// System.out.println("Response was:
>***********"+m.getText());
>
>       // System.out.println("Connecting to JMS
>server.");
>        Connection connection =
>factory.createConnection();
>        Session session =
>connection.createSession(false,
>Session.AUTO_ACKNOWLEDGE);
>       // MessageProducer producer =
>session.createProducer(pubTopic);
>        MessageConsumer consumer =
>session.createConsumer(subTopic);
>         System.out.println("Response was:
>***********");
>
>        connection.start();
>         System.out.println("Response was:
>***********");
>
>
>
>
>        System.out.println("Received  request.");
>      
>//producer.send(session.createTextMessage("<timestamp>"+new
>Date()+"</timestamp>"));
>        TextMessage m = (TextMessage)
>consumer.receive(1000*10);
>            System.out.println("Response was:
>***********"+m.getText());
>
>        System.out.println("Closing.");
>
>
>   // connection.close();
> }catch(Exception e)
> {
> }
>}
>}
>}
>
>
> public static void main(String[] args) throws
>Exception {
>WsifClient wc=new WsifClient();
>wc.setUp();
>wc.testSend();
>}
>
>
>
>}and my .xml file for servicemix is **************
>
>
><?xml version="1.0" encoding="UTF-8"?>
><beans xmlns:my="http://servicemix.org/demo/">
>  <!-- the JBI container -->
>  <container id="jbi">
>  <property name="useMBeanServer" value="false"/>
>   <property name="createMBeanServer" value="false"/>
>   <property name="dumpStats" value="true"/>
>   <property name="statsInterval" value="10"/>
>  
> <components>
> <component id="loginAccept" service="loginAccept"
>class="org.servicemix.components.wsif.WSIFBinding">
>  <property name="definitionResource"
>value="/Login.wsdl"/>
> </component>
>
>
> <!-- START SNIPPET: send -->
> <component id="httpSender" service="httpSender"
>class="org.servicemix.components.http.HttpInvoker">
>            <property name="url"
>value="http://localhost:8912/"/>
> </component>
>      <!-- END SNIPPET: send -->
>
>      <!-- START SNIPPET: binding -->
> <component id="httpReceiver" service="httpBinding"
>class="org.servicemix.components.http.HttpConnector"
>destinationService="loginAccept">
>        <property name="host" value="localhost"/>
>        <property name="port" value="8912"/>
>        
>     </component>
>    
>    
>     <component id="creditApprovalService"
>service="creditApprovalService"
>          
>class="org.servicemix.components.jaxws.JAXWSOutBinding">
>  <property name="wsdlResource"
>          
>value="http://localhost:8080/axis/services/CreditServerImpl?wsdl"/>
>            </component>
>  
>  
> <!-- Subscribe to a JMS destination -->
>      <component id="inputReceiver"
>service="inputReceiver"
>class="org.servicemix.components.jms.JmsInUsingJCABinding"
>destinationService="outputSender">
>        <property name="jcaContainer" ref="jencks"/>
>        <property name="activationSpec">
>          <bean
>class="org.activemq.ra.ActiveMQActivationSpec">
>            <property name="destination"
>value="demo.org.servicemix.source"/>
>            <property name="destinationType"
>value="javax.jms.Topic"/>
>          </bean>
>        </property>
>      </component>
>      
>      <!-- Publish the result to a JMS destination
>-->
>      <component id="outputSender"
>service="outputSender"
>class="org.servicemix.components.jms.JmsSenderComponent">
>        <property name="template">
>          <bean
>class="org.springframework.jms.core.JmsTemplate">
>            <property name="connectionFactory">
>              <ref local="jmsFactory"/>
>            </property>
>            <property name="defaultDestinationName"
>value="demo.org.servicemix.result"/>
>            <property name="pubSubDomain"
>value="true"/>
>          </bean>
>        </property>
>      </component>
>
>  
>  <component id="trace" service="trace"
>class="org.servicemix.components.util.TraceComponent"/>
>
> </components>
>  </container>
>  
>  
>  
>  <bean id="jencks" class="org.jencks.JCAContainer"
>singleton="true">
>  
>      <!-- lets use the default configuration of work
>manager and transaction manager-->
>      <property name="bootstrapContext">
>        <bean
>class="org.jencks.factory.BootstrapContextFactoryBean">
>          <property name="threadPoolSize" value="25"/>
>        </bean>
>      </property>
>  
>      <!-- the JCA Resource Adapter -->
>      <property name="resourceAdapter">
>        <bean id="activeMQResourceAdapter"
>class="org.activemq.ra.ActiveMQResourceAdapter"
>singleton="true">
>          <property name="serverUrl"
>value="tcp://localhost:61616"/>
>        </bean>
>      </property>
>  </bean>
>  
>   <bean id="broker"
>class="org.activemq.spring.BrokerFactoryBean">
>       <property name="config" value="/activemq.xml"/>
>   </bean>
>  
>  <bean id="transactionManager"
>class="org.jencks.factory.TransactionManagerFactoryBean"/>
>  
>    <bean id="jmsFactory"
>class="org.activemq.pool.PooledConnectionFactory">
>      <property name="connectionFactory">
>        <bean
>class="org.activemq.ActiveMQConnectionFactory">
>          <property name="brokerURL">
>            <value>tcp://localhost:61616</value>
>          </property>
>        </bean>
>      </property>
>    </bean>
>  <bean id="client"
>class="org.servicemix.client.DefaultServiceMixClient">
>        <constructor-arg ref="jbi"/>
>        <constructor-arg>
>        <bean
>class="org.servicemix.jbi.container.ActivationSpec">
>        <property name="destinationService">
>          <qname>creditApprovalService</qname>
>          </property>
>          </bean>
>          </constructor-arg>
>      
>        
>      </bean>
>
>  
></beans>
>
>
>Thanks
>
>
>--- Guillaume Nodet <[hidden email]>
>wrote:
>
>  
>
>>Certainly, we will have one ;)
>>Could you please post the full stack trace and log.
>>This one is not sufficient.
>>
>>Cheers,
>>Guillaume Nodet
>>
>>vangala rajani wrote:
>>
>>    
>>
>>>Ya ,Thanks for reply, I already did that part, if i
>>>have that jar in my library,
>>>Iam getting this error:
>>>
>>>
>>>
>>>    [java] (xml.XmlBeanDefinitionReader        
>>>      
>>>
>>158 )
>>    
>>
>>>Loading XML bean definiti
>>>ons from class path resource [ps-sm.xml]
>>>    [java]
>>>      
>>>
>>org.springframework.beans.factory.BeanDefinitionStoreException:
>>    
>>
>>>Line
>>>2 in XML document from class path resource
>>>[ps-sm.xml] is invalid; nested excep
>>>tion is org.xml.sax.SAXParseException: Document
>>>      
>>>
>>root
>>    
>>
>>>element "beans", must match
>>>DOCTYPE root "null".
>>>    [java] org.xml.sax.SAXParseException: Document
>>>root element "beans", must m
>>>atch DOCTYPE root "null".
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce
>>    
>>
>>>ption(Unknown Source)
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
>>    
>>
>>>Sour
>>>ce)
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>>    
>>
>>>S
>>>ource)
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>>    
>>
>>>S
>>>ource)
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecifi
>>    
>>
>>>ed(Unknown Source)
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement
>>    
>>
>>>(Unknown Source)
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unkno
>>    
>>
>>>wn Source)
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSta
>>    
>>
>>>rtElement(Unknown Source)
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatch
>>    
>>
>>>er.scanRootElementHook(Unknown Source)
>>>    [java]     at
>>>      
>>>
>>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen
>>    
>>
>>>
>>>Hope you have a sloution for this,
>>>
>>>
>>>--- Guillaume Nodet
>>>      
>>>
>><[hidden email]>
>>    
>>
>>>wrote:
>>>
>>>
>>>
>>>      
>>>
>>>>You should download the
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-1.3.02.jar
>>    
>>
>>>
>>>
>>>      
>>>
>>>>jar and put it in the lib directory.
>>>>
>>>>This will be fixed in next bug fix release of
>>>>        
>>>>
>>v2.0.
>>    
>>
>>>>Cheers,
>>>>Guillaume Nodet
>>>>
>>>>vangala rajani wrote:
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>Hi iam trying to bind a java Web service
>>>>>          
>>>>>
>>available
>>    
>>
>>>>>through axis in tomcat. iam using service mix
>>>>>          
>>>>>
>>2.0,
>>    
>>
>>>>>The component i wrote is like this:
>>>>>
>>>>><component id="creditApprovalService"
>>>>>service="creditApprovalService"
>>>>>          
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>class="org.servicemix.components.jaxws.JAXWSOutBinding">
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>  <property name="wsdlResource"
>>>>>          
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>value="http://localhost:8080/axis/services/CreditServerImpl?wsdl"/>
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>            </component>
>>>>>  
>>>>>  
>>>>>
>>>>>But i am getting this error while running it ,
>>>>>
>>>>>
>>>>>   [java] java.lang.NoClassDefFoundError:
>>>>>org/w3c/dom/DOMError
>>>>>   [java]     at
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>Sou
>>>>>rce)
>>>>>   [java]     at
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocument
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>Builder(Unknown Source)
>>>>>   [java]     at
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>>>      
>>>
>>>.createDocumentBuilder(XmlBeanDefinitionReader.java:218)
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>   [java]     at
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader
>>>      
>>>
>>>.loadBeanDefinitions(XmlBeanDefinitionReader.java:155)
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>   [java]     at
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>org.springframework.beans.factory.support.AbstractBeanDefinit
>>>      
>>>
>>>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>   [java]     at
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>org.springframework.beans.factory.support.AbstractBeanDefinit
>>>      
>>>
>>>ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>   [java]     at
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>org.springframework.context.support.AbstractXmlApplicationCon
>>>      
>>>
>>>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>   [java]     at
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>org.springframework.context.support.AbstractXmlApplicationCon
>>>      
>>>
>>>text.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>   [java]     at
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>org.springframework.context.support.AbstractRefreshableApplic
>>>      
>>>
>>>ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>   [java]     at
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>org.springframework.context.support.AbstractApplicationContex
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>=== message truncated ===
>
>
>
>
>__________________________________
>Yahoo! FareChase: Search multiple travel sites in one click.
>http://farechase.yahoo.com
>
>
>  
>