Open sankakiran opened 4 years ago
Hi! Are you sure what message name impact for service behavior? Whats differ MemberSoap_addMember_InputMessage against MemberSoapIn? Its simple alias for operations, it can be message1, message2 or something else. Its not a part of contract.
https://www.w3.org/TR/wsdl.html#_messages
You have specific problems with web service on soapcore and client interaction?
one of our application consumers have hard coded the message names. So we need same message name to be reflected with SoapCore.
No, again: message name is not a part of contract, you can't hardcode them. Example, my service definition:
And method call throw SoapUI:
Message name doesn't affect to client-server communication. You can't set them on any framework, it's internal detail of WSDL generator implementation.
If your client application which generate client code by WSDL except specific message names pattern - it's not correct, by specification message name can be any unique string.
Please describe concrete problem.
If there is change in message names then request and response objects are become Null. Client application is on Seibel technology where as they have hard coded the message names. This is only issue with this seibel client and rest of the applications are not impacted with name change. We had similar problem when we migrate webservice (asmx) to wcf (svc) and it was resolved by adding MessageContracts to override the message name. If there is no option then will ask our app consumers to change their code.
I've run into a scenario similar to sankakiran. In addition to the message names, it is not clear to me how (or if I can) control the portType name (without doing something weird to the interface class names or something). Even though what SoapCore is doing is technically sound and maps nicely between the WSDL and the source, sometimes you are just dealing with large companies that are very, very difficult to even communicate with, let alone persuade to make a change. If I cannot make a transparent drop-in replacement (that will pass all of their mysterious validation checks and so on) I'm probably out of luck (as I'm sure sankakiran ended up).
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.
We are planning to migrate existing WCF services to .Net core. Service consumers should not be impacted with this code migration. So we have to produce the same wsdl similar to WCF. I found message name difference in generated wsdl compared to old wsdl, which required changes at client end.
SoapCore:
<wsdl:message name = "MemberSoap_addMember_InputMessage"> <wsdl:part name = "parameters" element = "tns:addMember" /> </wsdl:message> <wsdl:portType name = "MemberSoap"> <wsdl:opertion name = "addMember"> <wsdl:input message = "MemberSoap_addMember_InputMessage" /> </wsdl:operation> </wsdl:portType>
WCF:
<wsdl:message name = "MemberSoapIn"> <wsdl:part name = "parameters" element = "tns:addMember" /> </wsdl:message> <wsdl:portType name = "MemberSoap"> <wsdl:opertion name = "addMember"> <wsdl:input message = "MemberSoapIn" /> </wsdl:operation> </wsdl:portType>
I tried with "MessageContractAttribute" but not reflected in wsdl. We need help to rename the message name.
Hi, are you able to change MenberSoap_receivePayment_InputMessage in SoapCore?
There is no built in way to override the naming and changing the default behavior in SoapCore could break existing code for a lot of people.
You are more than welcome to submit a PR with an override option. I'm not sure if using MessageContractAttribute, or adding custom attributes to the operation method is the cleanest solution. What do you think?
It is also worth noting that differing message names shouldn't matter in most cases. I was able to switch my legacy service without breaking anyone even though the message name in the wsdl was altered. I might be missing something but I think the only case that would break is if someone has hard-coded wsdl-verification that requires a specifik message name
@andersjonsson Could you help me with WSDL template. Given a WSDL template to me to implement server side soap service. I need to do the same to the given WSDL. I couldn't do it in SoapCore. How could I do it?
If you could help me, send me email address or any social app account adress I will send you the WSDL template.
No, unfortunately I'm not going to be able to help you with that.
I just remembered that this PR https://github.com/DigDes/SoapCore/pull/1044 already implements the ability to change naming strategy for the input-output messages. Hopefully it can be merged quite soon
@andersjonsson I need you help. Sorry for interrupting again. Thank you your answer in advance!
I'm using SoapCore package. I have a getSubject method in SOAP interface. As you see, this method has 2 parametres(settlement & List
I'm not sure that I understand what you're trying to do here, but you can solve this with a custom class
[XmlType(TypeName = "subject")]
public class SubjectList: List<SubjectInfo>
{
public SubjectList(int capacity)
{
Capacity = capacity;
}
public SubjectList()
{
}
}
Then use that type as your parameter instead of List
After this, I need to make unbounded in WSDL. How can I do it?
That type becomes a complextype that is marked as unbounded (in the type declaration within your WSDL). My guess is that this wsdl will work in your use case even though it differs slightly from the original one.
I can't think of a way to make it unbounded on that level and still be able to specify the type name, so I can't help you with this
No, I can't help you any more than I already have.
This issue is stale because it has been open for 30 days with no activity.
We are planning to migrate existing WCF services to .Net core. Service consumers should not be impacted with this code migration. So we have to produce the same wsdl similar to WCF. I found message name difference in generated wsdl compared to old wsdl, which required changes at client end.
SoapCore:
WCF:
I tried with "MessageContractAttribute" but not reflected in wsdl. We need help to rename the message name.