Announcement Announcement Module
Collapse
No announcement yet.
Server did not recognize the value of HTTP Header SOAPAction: . Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Server did not recognize the value of HTTP Header SOAPAction: .

    I have upgraded Spring framework (SF), Spring Integration (SI), Spring Web Services (SWS), Spring Security (SS) to 3.0.5, 2.0.1, 2.0.0 and 3.0.5 respectively. Previously, I was using SF (2.5.7), SI (1.0.4), SWS (1.5.9), SS (2.0.4).

    I have been trying to consume a .NET web service and the service supports both soap 1.1 and soap 1.2 versions respectively. The 1.5.9 SWS client works without specifying SOAP 12 version when we try to communicate with .NET Service. However, since the upgrade, I had to specify the SOAP version 1.2 for the SaajSoapMessageFactory in order to communicate with .NET web service.

    With 1.5.9 SWS, our message factory configuration is given below.
    Code:
    <bean id="messageFactory"   
            class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
    With 2.0.0 SWS, the following error occurs when using the above mentioned bean configuration for SaajSoapMessageFactory
    Code:
    org.springframework.ws.soap.client.SoapFaultClientException: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: .
    .NET Web Service SOAP bindings that always worked with SOAP 1.1 SAAJ Soap message factory when we used with 1.5.9 Spring Web Services.
    Code:
    <wsdl:binding name="VerifyInsuranceSoap" type="tns:VerifyInsuranceSoap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="VerifyInsurance">
          <soap:operation soapAction="http://tempuri.org/IVS/VerifyInsurance/VerifyInsurance" style="document" />
          <wsdl:input>
    
            <soap:body use="literal" />
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal" />
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:binding name="VerifyInsuranceSoap12" type="tns:VerifyInsuranceSoap">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    
        <wsdl:operation name="VerifyInsurance">
          <soap12:operation soapAction="http://tempuri.org/IVS/VerifyInsurance/VerifyInsurance" style="document" />
          <wsdl:input>
            <soap12:body use="literal" />
          </wsdl:input>
          <wsdl:output>
            <soap12:body use="literal" />
          </wsdl:output>
        </wsdl:operation>
    
      </wsdl:binding>
      <wsdl:service name="VerifyInsurance">
        <wsdl:port name="VerifyInsuranceSoap" binding="tns:VerifyInsuranceSoap">
          <soap:address location="https://webservice.dcivs.org/verifyinsurance.asmx" />
        </wsdl:port>
        <wsdl:port name="VerifyInsuranceSoap12" binding="tns:VerifyInsuranceSoap12">
          <soap12:address location="https://webservice.dcivs.org/verifyinsurance.asmx" />
        </wsdl:port>
      </wsdl:service>

    After the upgrade of SWS from 1.5.9 to 2.0.0, the same message factory did not work and we had to use the following bean definition in Spring Integration configuration to make it work

    Code:
    <!-- This chain receives from the 'dcIvsSchemaRequest' and enriches the request Message by adding
    	     the "soap-action" header value. Then, the Web Service outbound Messaging Gateway invokes the
    	     Web Service for the given URI, and the reply Message is sent to the 'dcIvsSchemaResponse'. -->
    	<chain input-channel="dcIvsSchemaRequest" output-channel="dcIvsSchemaResponse">
    		<header-enricher>
    			<header name="springintegration_ws_soapAction" value="http://tempuri.org/IVS/VerifyInsurance/VerifyInsurance"/>
    		</header-enricher>		
    		<ws:outbound-gateway uri="${ivs.external.webservice.location}" 
    					marshaller="dcIvsMarshaller" unmarshaller="dcIvsMarshaller" message-factory="messageFactory12" 
    					message-sender="messageSender" ignore-empty-responses="false" />
    	</chain>
       
        <beans:bean id="messageFactory12" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
        	<beans:property name="soapVersion">
    			<util:constant static-field="org.springframework.ws.soap.SoapVersion.SOAP_12"/>
    		</beans:property>    	
        </beans:bean>


    Any idea as to why there is a change in behavior between 1.5.9 and 2.0.0 SWS? Any pointer is highly helpful.

    Regards,
    Vigil
    Last edited by vbose; Jan 25th, 2011, 05:19 PM.

  • #2
    OK. I have found out the issue why the above set up is having issue with SOAP 1.1 while communicating with .NET web services.

    The resolution is given in my another post http://forum.springframework.org/sho...d.php?t=102206.

    Comment

    Working...
    X