I’m trying to consume a web service from within an orchestration sending to it a custom type. I added the web reference, created the send port by selecting an existing Web Port Type and created a message based on one of the Web Message Types created when the send port was created. This is a Multi-part Type that has a message part called messageheader which I set using an object variable of the same type: EnterpriseEventRequestMessage.messageheader = ivcInterfaceEntity;
The assembly that holds the definition of the ivcInterfaceEntity is referenced by both the web service and the orchestration project. Both the messageheader and the ivcInterfaceEntity are instances of the same IvcInterfaceEntity (see at bottom).
The problem is that when the orchestration’s Send shape attempts to send the EnterpriseEventRequestMessage to the web service it is sending somethink like
<IvcInterfaceEntity xmlns=”http://tempuri.org“>
instead of <IvcInterfaceEntity xmlns=”http://www.mycorp.com/IvcInterfaceEntity“> which is what the web service is expecting.
The error I receive is:
Failed to serialize the message part “messageheader” into the type using namespace “http://tempuri.org/“.
[Serializable]
[
XmlType(Namespace = “http://www.mycorp.com/IvcInterfaceEntity”)]
public class IvcInterfaceEntity
{ …