Announcement Announcement Module
Collapse
No announcement yet.
Client side exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Client side exception

    Hello All,

    I am creating a client for the sample web service "Holiday Request" which shipped along with the Spring WS distribution. The webservice is deployed in Glassfish App server and wsdl can be retrieved correctly.
    However while creating a java based client for the deployed service the following error is encountered when i run the client code:

    Exception in thread "main" org.springframework.ws.client.WebServiceTransforme rException: Error extracting location from WSDL [URL [http://localhost:8080/holidayService/holiday.wsdl]]; nested exception is javax.xml.transform.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
    at org.springframework.ws.client.support.destination. Wsdl11DestinationProvider.lookupDestination(Wsdl11 DestinationProvider.java:111)
    at org.springframework.ws.client.support.destination. AbstractCachingDestinationProvider.getDestination( AbstractCachingDestinationProvider.java:54)
    at org.springframework.ws.client.core.WebServiceTempl ate.getDefaultUri(WebServiceTemplate.java:149)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 345)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 337)
    at com.mycompany.hr.client.TestHolidayService.getEmpl oyeeHolidays(TestHolidayService.java:47)
    at com.mycompany.hr.client.TestHolidayService.main(Te stHolidayService.java:56)
    Caused by: javax.xml.transform.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:480)

    Following is the entry in applicationCOntext.xml on client side:
    --------------------------------------------------------------------
    <bean id="messagFactory" class="org.springframework.ws.soap.saaj.SaajSoapMe ssageFactory"/>

    <bean id="abstractClient" abstract="true">
    <constructor-arg ref="messagFactory"/>
    <property name="destinationProvider">
    <bean class="org.springframework.ws.client.support.desti nation.Wsdl11DestinationProvider">
    <property name="wsdl" value="http://localhost:8080/holidayService/holiday.wsdl"/>
    </bean>
    </property>
    </bean>

    <bean id="marshaller" class="org.springframework.oxm.xmlbeans.XmlBeansMa rshaller"/>

    <bean id="getEmployeeHolidays" parent="abstractClient" class="com.mycompany.hr.client.TestHolidayService" >
    <property name="marshaller" ref="marshaller"/>
    <property name="unmarshaller" ref="marshaller"/>
    </bean>

    On the server side:
    ------------------

    <bean id="holiday" class="org.springframework.ws.wsdl.wsdl11.DefaultW sdl11Definition">
    <property name="schema" ref="schema"/>
    <property name="portTypeName" value="HumanResource"/>
    <property name="locationUri" value="/holidayService"/>
    <property name="targetNamespace" value="http://mycompany.com/hr/definitions"/>
    </bean>


    Please let me know your inputs regarding the same.Also do let me know if any additional information is needed.

    Thanks
    Ketan

  • #2
    Hello All,

    Any inputs on this?

    Thanks
    Ketan

    Comment

    Working...
    X