Announcement Announcement Module
Collapse
No announcement yet.
NAMESPACE_ERR when using WebServiceClient Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NAMESPACE_ERR when using WebServiceClient

    Hi,

    I have a spring web service running on Weblogic 8.1 SP5 with JDK 1.4.2.

    I made sure to upgrade to the correct xerces, xalan and xml-api API's. This is how I deployed the web service.

    Next I created a client using the WebServiceTemplate.

    I can't figure out why I keep getting this namespace error. I am running my client in Intellij 7 and have the same correct xerces, xalan, etc jar's in my projects classpath. Is there something else I need to do here?

    Thanks!

    2007-12-12 20:14:18,658 INFO [main ] SaajSoapMessageFactory - Creating SAAJ 1.2 MessageFactory
    2007-12-12 20:14:18,662 TRACE [main ] SaajSoapMessageFactory - Using MessageFactory class [com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessage Factory1_1Impl]
    2007-12-12 20:14:18,686 DEBUG [main ] WebServiceAccessor - Opening connection to [http://localhost:7001/crxservices/] using [org.springframework.ws.transport.http.HttpUrlConne ctionMessageSender@fd9b49]
    2007-12-12 20:14:18,793 TRACE [main ] WebServiceTemplate - Sent request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><CRXImportRequest xmlns="http://www.edmunds.com/crxservices/">
    <node name="name1">
    <property name="name3" type="type1">
    <value>value0</value>
    <value>value1</value>
    <value>value2</value>
    </property>
    <property name="name5" type="type3">
    <value>value3</value>
    <value>value4</value>
    <value>value5</value>
    </property>
    <property name="name7" type="type5">
    <value>value6</value>
    <value>value7</value>
    <value>value8</value>
    </property>
    </node></CRXImportRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>]
    2007-12-12 20:14:19,176 DEBUG [main ] WebServiceTemplate - Received Fault message for request [SaajSoapMessage {http://www.edmunds.com/crxservices/}CRXImportRequest]
    Exception in thread "main" org.springframework.ws.soap.client.SoapFaultClient Exception: 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.soap.client.core.SoapFaultM essageResolver.resolveFault(SoapFaultMessageResolv er.java:37)
    at org.springframework.ws.client.core.WebServiceTempl ate.handleFault(WebServiceTemplate.java:529)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:412)
    at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:358)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:304)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:289)
    at com.edmunds.crxservices.WebServiceClient.customSen dAndReceive(WebServiceClient.java:49)
    at com.edmunds.crxservices.WebServiceClient.main(WebS erviceClient.java:54)

  • #2
    More testing with SAAJ 1.1

    I downgraded my SAAJ lib to 1.1 and got this error below.

    Any help is appreciated! Thanks

    2007-12-12 20:47:32,910 INFO [main ] SaajSoapMessageFactory - Creating SAAJ 1.1 MessageFactory
    2007-12-12 20:47:33,021 TRACE [main ] SaajSoapMessageFactory - Using MessageFactory class [com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessage Factory1_1Impl]
    2007-12-12 20:47:33,039 DEBUG [main ] WebServiceAccessor - Opening connection to [http://localhost:7001/crxservices/] using [org.springframework.ws.transport.http.HttpUrlConne ctionMessageSender@bffc3a]
    2007-12-12 20:47:33,238 DEBUG [main ] ClassUtils - Class [edu.emory.mathcs.backport.java.util.concurrent.Con currentHashMap] or one of its dependencies is not present: java.lang.ClassNotFoundException: edu.emory.mathcs.backport.java.util.concurrent.Con currentHashMap
    2007-12-12 20:47:33,239 TRACE [main ] CollectionFactory - Creating [java.util.LinkedHashMap]
    2007-12-12 20:47:33,283 TRACE [main ] WebServiceTemplate - Sent request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><CRXImportRequest xmlns="http://dummy.com/">
    <node name="name1" xmlns="http://dummy.com/">
    <property name="name3" type="type1" xmlns="http://dummy.com/">
    <value xmlns="http://dummy.com/">value0</value>
    <value xmlns="http://dummy.com/">value1</value>
    <value xmlns="http://dummy.com/">value2</value>
    </property>
    <property name="name5" type="type3" xmlns="http://dummy.com/">
    <value xmlns="http://dummy.com/">value3</value>
    <value xmlns="http://dummy.com/">value4</value>
    <value xmlns="http://dummy.com/">value5</value>
    </property>
    <property name="name7" type="type5" xmlns="http://dummy.com/">
    <value xmlns="http://dummy.com/">value6</value>
    <value xmlns="http://dummy.com/">value7</value>
    <value xmlns="http://dummy.com/">value8</value>
    </property>
    </node></CRXImportRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>]
    Dec 12, 2007 8:47:33 PM com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
    SEVERE: SAAJ0511: Unable to create envelope from given source
    Exception in thread "main" org.springframework.ws.soap.saaj.SaajSoapEnvelopeE xception: Could not access envelope: Unable to create envelope from given source: ; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
    Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
    at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.cr eateEnvelope(EnvelopeFactory.java:148)
    at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1 Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java :102)
    at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEn velope(SOAPPartImpl.java:156)
    at org.springframework.ws.soap.saaj.Saaj11Implementat ion.getEnvelope(Saaj11Implementation.java:164)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.g etEnvelope(SaajSoapMessage.java:86)
    at org.springframework.ws.soap.AbstractSoapMessage.ge tSoapBody(AbstractSoapMessage.java:36)
    at org.springframework.ws.soap.AbstractSoapMessage.ha sFault(AbstractSoapMessage.java:56)
    at org.springframework.ws.client.core.WebServiceTempl ate.hasFault(WebServiceTemplate.java:509)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:411)
    at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:358)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:304)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:289)
    at com.edmunds.crxservices.WebServiceClient.customSen dAndReceive(WebServiceClient.java:49)
    at com.edmunds.crxservices.WebServiceClient.main(WebS erviceClient.java:54)
    Caused by: java.lang.NullPointerException
    at org.apache.xalan.transformer.TransformerIdentityIm pl.createResultContentHandler(TransformerIdentityI mpl.java:202)
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:296)
    at com.sun.xml.messaging.saaj.util.transform.Efficien tStreamingTransformer.transform(EfficientStreaming Transformer.java:421)
    at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.cr eateEnvelope(EnvelopeFactory.java:136)
    ... 13 more

    CAUSE:

    java.lang.NullPointerException
    at org.apache.xalan.transformer.TransformerIdentityIm pl.createResultContentHandler(TransformerIdentityI mpl.java:202)
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:296)
    at com.sun.xml.messaging.saaj.util.transform.Efficien tStreamingTransformer.transform(EfficientStreaming Transformer.java:421)
    at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.cr eateEnvelope(EnvelopeFactory.java:136)
    at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1 Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java :102)
    at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEn velope(SOAPPartImpl.java:156)
    at org.springframework.ws.soap.saaj.Saaj11Implementat ion.getEnvelope(Saaj11Implementation.java:164)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.g etEnvelope(SaajSoapMessage.java:86)
    at org.springframework.ws.soap.AbstractSoapMessage.ge tSoapBody(AbstractSoapMessage.java:36)
    at org.springframework.ws.soap.AbstractSoapMessage.ha sFault(AbstractSoapMessage.java:56)
    at org.springframework.ws.client.core.WebServiceTempl ate.hasFault(WebServiceTemplate.java:509)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:411)
    at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:358)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:304)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:289)
    at com.edmunds.crxservices.WebServiceClient.customSen dAndReceive(WebServiceClient.java:49)
    at com.edmunds.crxservices.WebServiceClient.main(WebS erviceClient.java:54)

    Comment


    • #3
      Any solutions regarding the given problem?

      I'm facing something similar and I don't have any clue how to fix it.

      OP

      Comment

      Working...
      X