I modified the Integration Sample Apps "travel" application which uses: <spring.integration.version>2.2.0.RC2</spring.integration.version>
I'm able to get the app to prompt me for a department Id but when it attempts the call it returns:
The web service that I am attempting to invoke is an internal web service that was generated years ago using Tibco Businessworks -- consequently the generated wsdl is less than straightforward.Code:Enter a deptId: 3597 <di:SearchRequest xmlns:di="http://qualcomm.com/corp/it/services/deptinfosvcs/"> <di:deptId>3597</di:deptId></di:SearchRequest>Nov 13, 2012 4:34:30 PM com.sun.xml.internal.messaging.saaj.soap.MessageImpl identifyContentType SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
Is it possible that the failure to recognize the Content-Type is due to the way the wsdl is defined? I saw in the travel sample app that the wsdl it calls references an operation defined as:
The operation I'm trying to call is defined as:Code:<wsdl:operation name="GetCityForecastByZIP"> <http:operation location="/GetCityForecastByZIP" /> <wsdl:input> <http:urlEncoded /> </wsdl:input> <wsdl:output> <mime:mimeXml part="Body" /> </wsdl:output> </wsdl:operation>
A successful request as sent by SOAP UI looks like this:Code:<wsdl:operation name="QryByDeptIdOp"> <wsdl:input message="tns:SearchRequest" /> <wsdl:output message="tns:SearchReply" /> </wsdl:operation>
Is there a way to configure the request that I am sending to include the Content-Type? I tried to add it by editing the header-enricher's configuration but it said that the only valid child element was "soap-action" so I had to comment it out:Code:POST http://tibcrpprd04.qualcomm.com:9998/Project/GenWebServices/intfQryByDeptId-service.serviceagent/intfwsQryByDeptIdEndpoint0 HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: text/xml;charset=UTF-8 SOAPAction: "/Project/GenWebServices/intfQryByDeptId-service.serviceagent/intfwsQryByDeptIdEndpoint0/QryByDeptIdOp" Content-Length: 321 Host: tibcrpprd04.qualcomm.com:9998 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://qualcomm.com/mwss/services/deptinfosvcs/requests"> <soapenv:Header/> <soapenv:Body> <req:SearchRequest> <req:deptId>3952</req:deptId> </req:SearchRequest> </soapenv:Body> </soapenv:Envelope>
Here is my attached project:Code:<int-ws:header-enricher input-channel="deptChannel" output-channel="deptServiceChannel" > <!-- <int-ws:header name="Content-Type" value="text/xml;charset=UTF-8" /> --> <int-ws:soap-action value="http://personneldeptinfosvcs.qualcomm.com/Project/GenWebServices/intfQryByDeptId-service.serviceagent/intfwsQryByDeptIdEndpoint0/QryByDeptIdOp" /> </int-ws:header-enricher>
deptInfoSvcs.zip
UPDATE: Used WireShark to monitor TCP Thread...
Then it showed the entire wsdl instead of the <SearchReply> element response I was expecting.Code:POST /Project/GenWebServices/intfQryByDeptId-service.serviceagent?wsdl HTTP/1.1 Accept-Encoding: gzip Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 SOAPAction: "http://personneldeptinfosvcs.qualcomm.com/Project/GenWebServices/intfQryByDeptId-service.serviceagent/intfwsQryByDeptIdEndpoint0/QryByDeptIdOp" Content-Type: text/xml; charset=utf-8 Cache-Control: no-cache Pragma: no-cache User-Agent: Java/1.6.0_26 Host: personneldeptinfosvcs.qualcomm.com Connection: keep-alive Content-Length: 275 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><di:SearchRequest xmlns:di="http://qualcomm.com/corp/it/services/deptinfosvcs/"> <di:deptId>3597</di:deptId></di:SearchRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>HTTP/1.1 200 OK


Reply With Quote