Announcement Announcement Module
Collapse
No announcement yet.
Error in accessing .NET service Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error in accessing .NET service

    I have been getting this exception when trying to access .NET web service. tried all different versions of spring-ws and related jars but nothing seem to help. anyone has seen this before? please advise. is consuming a .NET sevice any different than accessing Java service? Any pointers are appreciated.

    PHP Code:
    Exception in thread "main" java.lang.NoSuchMethodErrororg.springframework.xml.JaxpVersion.isAtLeastJaxp14()Z
        at org
    .springframework.xml.transform.TraxUtils.isStaxResult(TraxUtils.java:87)
        
    at org.springframework.oxm.jaxb.Jaxb2Marshaller.marshal(Jaxb2Marshaller.java:375)
        
    at org.springframework.ws.support.MarshallingUtils.marshal(MarshallingUtils.java:81)
        
    at org.springframework.ws.client.core.WebServiceTemplate$2.doWithMessage(WebServiceTemplate.java:359)
        
    at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:534)
        
    at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:501)
        
    at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:350)
        
    at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:344

  • #2
    I don't think that .Net is the problem. It seems to me that you're using an old version of spring-xml. Try updating all the spring-ws modules you're using to the same version.

    Comment


    • #3
      My bad. you are right. this was related to version of spring xml.jar. its able to pass that error and now I get

      PHP Code:
      org.springframework.ws.soap.client.SoapFaultClientExceptionServer did not recognize the value of HTTP Header SOAPAction: .
          
      at org.springframework.ws.soap.client.core.SoapFaultMessageResolver.resolveFault(SoapFaultMessageResolver.java:37)
          
      at org.springframework.ws.client.core.WebServiceTemplate.handleFault(WebServiceTemplate.java:735)
          
      at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:563)
          
      at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:501)
          
      at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:350)
          
      at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:344)
          
      at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:336
      Below is the snippet from xml config.
      PHP Code:
      <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
          <
      bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
              <
      property name="defaultUri" value="http://xxx/ws/general.asmx" />
              <
      property name="messageSender" ref="messageSender"/>
              <
      property name="marshaller" ref="marshaller"/>
              <
      property name="unmarshaller" ref="marshaller"/>

          </
      bean>
          <
      bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"
              <
      property name="classesToBeBound"
                  <list> 
                      <
      value>com.xx.Request</value>
                      <
      value>com.xxx.Response</value>
                  </list>
              </
      property>
          </
      bean
      And java code is
      PHP Code:
      webServiceTemplate.marshalSendAndReceive(requestObject); 
      can someone advise what I am missing to communicate to .NET service.

      Comment

      Working...
      X