-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.9.9.3 change of datacontract namespace not working? #195
Comments
Yes, your example indeed works! I had to drill deeper, and found two scenarios where the parameter value isn't picked up. Try this code:
|
@MathiasRonnblom Check on latest master branch, should be work good. |
@MathiasRonnblom I forget to tell you: if you mark class as "DataContract" your should add "DataMember" for properties which you want send\receive to client (sample RequestNotWorking2). |
@kotovaleksandr Thanks, all the requests work now! Unfortunately, it seems to have broken nested ComplexTypes.. Try this example:
Error message when adding the WSDL in SoapUI: Seems that "Address" is missing from the generated WSDL. |
Check on my fork: |
@kotovaleksandr I get a similar error with that fork, when adding the WSDL to SoapUI. I have created a new private Github repo with a stripped down version of my code, and given you access. That way you can try it yourself. |
I forgot to say that the current code in that repo references the 0.9.9.1 Nuget package, and works with that. However, it doesn't work with 0.9.9.3, the code from DigDes/master or kotovaleksandr/SoapCore. |
I'm sorry, check on my fork again. On your repo works fine. |
@kotovaleksandr It works now! Thanks for your quick work! :) Are there plans for merging this to the DigDes repo, and make a new Nuget package? |
@MathiasRonnblom Hi, i check again your model with latest SoapCore and i observe: WSDL generated with incorrect namespaces and WSDL generation not check Order property on DataMember attribute. |
@kotovaleksandr I finally had time to check your fork, and it works nicely with custom DataContract namespace, as well as Order attributes on DataMember. I.e. this request works (PersonId comes before IdentificationNumber, and both get populated in runtime):
Also, I see that you have fixed the null check on baseType in MetaWCFBodyWriter/HasBaseType! 👍 However, it seems that it does no longer work with default DataContract namespace, so this request gives me an error when adding the service to SoapUI:
This is the error from SoapUI:
|
We have some complex types with namespace explicitly set to an empty string. This line breaks our code as the type end up in the wrong namespace. Correct namespace in our code would be "contract.Namespace". I fixed our code by adding
but I don't know the code well enough to say this doesn't break other things? |
@bhenden send PR with this fix to develop branch, i see it late. i think this change doesn't break any existence service. |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Hi!
The way datacontract namespaces are generated in metadata have changed in 0.9.9.3 (or maybe 0.9.9.2). With 0.9.9.1, datamembers got the same namespace as the service. See this example request generated by SoapUI for my service:
But with 0.9.9.3 (and also latest in master), the datamembers get a separate namespace:
This is all well and good for the WSDL itself, since this is the way that WCF in .Net Framework generates namespaces. However, SoapCores runtime code can't seem to recognize the parameters (in the example above "IdentificationNumber"). I have tried changing the order of the parameters, and having an explicit namespace on the datacontract, but that is not used. No matter what I do, parameters are null when receiving a request in my service.
The text was updated successfully, but these errors were encountered: