Announcement Announcement Module
Collapse
No announcement yet.
XMLBeanMarshaller Invalid property 'classesToBeBound' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • XMLBeanMarshaller Invalid property 'classesToBeBound'

    Hi,

    I am using xmlbeanmarshaller for generating stubs and calling a web service, but when i deploy i am getting error
    Caused by: org.springframework.beans.InvalidPropertyException : Invalid property 'classesToBeBound' of bean class [org.springframework.oxm.xmlbeans.XmlBeansMarshalle r]: No property 'classesToBeBound' found
    Code Snippet:

    <bean id="wsMarshaller" class="org.springframework.oxm.xmlbeans.XmlBeansMa rshaller">
    <property name="classesToBeBound">
    <list>
    <value>com.test.communicationChannels.GetCustomerB alanceDocument</value>
    <value>com.test.communicationChannels.GetCustomerB alanceResponseDocument</value>
    </list>
    </property>

    <!-- <property name="contextPath" value="com.test.communicationChannels" />-->
    </bean>
    <bean id="wsmessageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMe ssageFactory" />


    <bean id="wsMessageSender" class="org.springframework.ws.transport.http.Commo nsHttpMessageSender" />

    <bean id="wsClient" class="com.test.WSClient">
    <description> WebService client</description>
    <property name="defaultUri" value="${webService.uri}" />
    <property name="marshaller" ref="wsMarshaller" />
    <property name="unmarshaller" ref="wsMarshaller" />
    <property name="messageSender" ref="wsMessageSender" />
    <property name="messageFactory" ref="wsmessageFactory" />
    </bean>

    <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServi ceTemplate">
    <property name="messageFactory" ref="wsmessageFactory" />
    <property name="messageSender" ref="wsMessageSender" />
    </bean>
    Code:
    WebServiceTemplate wsTemplate = getWebServiceTemplate();
    GetCustomerBalanceDocument getCustomerBalanceDocument = GetCustomerBalanceDocument.Factory.newInstance();
    GetCustomerBalanceDocument.GetCustomerBalance getCustomerBalance=getCustomerBalanceDocument.addN ewGetCustomerBalance();
    getCustomerBalance.setAccountNumber(accNo);


    GetCustomerBalanceResponseDocument response = null;
    response = (GetCustomerBalanceResponseDocument) wsTemplate.marshalSendAndReceive(getCustomerBalanc eDocument,
    new WebServiceMessageCallback() {
    public void doWithMessage(WebServiceMessage message) {
    ((SoapMessage) message).setSoapAction("http://test.com/CommunicationChannels/getCustomerBalance");

    }
    });
    Thanks in Advance
    Sri

  • #2
    Hi Sri,
    I think 'classesToBeBound' only works for Jaxb2Marshaller.

    XMLBeans generates its dedicated java classes

    best regards,
    yanke

    Comment

    Working...
    X