Note that there are some explanatory texts on larger screens.

plurals
  1. PORecreate webservice
    primarykey
    data
    text
    <p>HI,</p> <p>My job was to create a webservice which acted as another webservice we have, so the client doesn't notice the difference. I created my entire webservice and it works fine as I use it and the outputs all are the same. The thing is, I created a clientapplication where I use the old webservice and if I change the url of the webreference to the new service and retry I get an error:</p> <blockquote> <p>System.Web.Services.Protocols.SoapException: The server did not recognize the HTTP-header SOAPAction</p> </blockquote> <p>If I look at the differences in the Reference.cs in my two webservices I notice there's a small difference in attributes which is I think the problem.</p> <p>New service:</p> <pre><code>[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.3053")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="SprWebServiceSoap", Namespace="http://ws.hl7.trispark.com/")] public partial class SprWebService : System.Web.Services.Protocols.SoapHttpClientProtocol { </code></pre> <p>Old service:</p> <pre><code>[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.3053")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="SprWebServiceRemoteBinding", Namespace="http://ws.hl7.trispark.com/")] public partial class SprWebService : System.Web.Services.Protocols.SoapHttpClientProtocol { </code></pre> <p>And also the method which is used differs:</p> <p>New:</p> <pre><code>[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://ws.hl7.trispark.com/invoke", RequestNamespace="http://ws.hl7.trispark.com/", ResponseNamespace="http://ws.hl7.trispark.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public invokeResponse invoke(invoke inv) { </code></pre> <p>Old:</p> <pre><code>[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] [return: System.Xml.Serialization.XmlElementAttribute("invokeResponse", Namespace="http://ws.hl7.trispark.com/types")] public invokeResponse invoke([System.Xml.Serialization.XmlElementAttribute("invoke", Namespace="http://ws.hl7.trispark.com/types")] invoke invoke1) { </code></pre> <p>First I thought the problem could be that my version was created in vs2008 and the old one in vs2005 so I recreated it in 2005, but that didn't change anything.</p> <p>The thing is I don't have the code of the old one so I can't see what specific attributes is used.</p> <p>Does anyone have any idea which attributes I have to set to get the same thing?</p> <p>Thanks a lot!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload