C# client consuming java-websphere SOAP service -


i trying consume java-based service .net 4.0. (c# console/windows service)
have added service reference using vs's add service reference dialog.

the service hosted on websphere 8 , wsdl definition generated using cxf.
client app running on windows server 2008 r2 sp1. don't think windows update applied after sp1.

problem from time time calls service methods return exception. error follows:

the content type text/xml;charset=utf8 of response message not match content type of binding (application/soap+xml; charset=utf-8).   if using custom encoder, sure iscontenttypesupported method implemented properly.   first 1024 bytes of response were: '<?xml version="1.0" encoding="utf-8"?><wsdl:definitions name="myserviceimplservice" targetnamespace="http://impl.webservice.myservice.com/" xmlns:ns1="http://webservice.myservice.com/" xmlns:ns2="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://impl.webservice.myservice.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/xmlschema">   <wsdl:import location="http://10.1.1.1/myservice/webservice/myservice?wsdl=myservice.wsdl" namespace="http://webservice.myservice.com/"></wsdl:import>   <wsdl:binding name="myserviceimplservicesoapbinding" type="ns1:myservice"> <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"></soap12:binding> <wsdl:operation name="disablecard">   <soap12:operation soapaction="" style="documen'..   

here's client app's wcf config:

<system.servicemodel>    <bindings>       <custombinding>          <binding name="myserviceimplservicesoapbinding">             <textmessageencoding messageversion="soap12" />             <httptransport />          </binding>       </custombinding>     </bindings>     <client>        <endpoint address="http://10.1.1.1/myservice/webservice/myservice?wsdl"            binding="custombinding" bindingconfiguration="myserviceimplservicesoapbinding"            contract="myservicereference.myservice" name="myserviceimplport" />     </client> </system.servicemodel> 
  • i don't think has wcf configuration since methods work fine , of sudden, of them return exception.

  • the error seems show randomly no apparent reason. after 2 days , ~1,000,000 requests , after half hour. when exception shows up, every call service returns exception.

  • on service side, there's no log call reaches java application. seems websphere sends wsdl definition instead of passing call service.

  • closing , relaunching client app not make error go away. complete system restart makes error disappear. (update: seems removing ?wsdl endpoint address, removed need restart system , restarting client app enough make work again.)

  • when facing error, have called service methods soap ui , got results no exception. there's nothing wrong on service side.

my guess bug in .net framework 4.0. appreciated.


Comments