Marsan001

Hello,

we developed a WCF Webservice with 3 Actions. This Webservice should be called from a C++-Application with gSOAP2.7-generated Soap-Classes.

The calls seem to lack the "ACTION"-Tag (in Header or in Body), so the calls produce the error "Die Nachricht mit Action "" kann aufgrund einer fehlenden ContractFilter-Ubereinstimmung beim EndpointDispatcher nicht verarbeitet werden." (Message with Action "" could not be processed...).

If I change in the interface-contract the Action of one function to "*", then the call works - but of course then the other functions/actions cannot be called; so this is not the solution. I programmed a simulator in WCF to compare the messages, this works with all actions. As you can see in the log below, these contains Action-Tags in the Header and in the body. Is this mandantory in the SOAP-Standard How can I achieve that our service works with these messages A modification in the gSOAP-Client is probably not possible.

Thanks

Mark

--------------------------- TCP Trace of non-Working call: no ACTION in header or body

<HttpRequest xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
<Method>POST</Method>
<QueryString></QueryString>
<WebHeaders>
<Connection>close</Connection>
<Content-Length>730</Content-Length>
<Content-Type>text/xml; charset=utf-8</Content-Type>
<Host>192.9.202.150:5001</Host>
<User-Agent>gSOAP/2.7</User-Agent>
</WebHeaders>
</HttpRequest>
<SOAP-ENV:Envelope xmlnsTongue TiedOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlnsTongue TiedOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlnsTongue Tiedpc-server="urnTongue Tiedpc_server" xmlnsTongue Tiedpc-client="urnTongue Tiedpc_client" xmlnsTongue Tiedpc="urnTongue Tiedpc">
<s:Header xmlnsTongue Tied="http://schemas.xmlsoap.org/soap/envelope/">
<To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://192.9.202.150:5001/</To>
</s:Header>
<SOAP-ENV:Body>
<spc-client:Event>
<evt xsi:type="spc:EvtAlarm" xmlns="">
<Id>0</Id>

....
</evt>
</spc-client:Event>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--------------------------- TCP-Trace of working SOAPCall, Action in Header and body present, see red lines

<HttpRequest xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
<Method>POST</Method>
<QueryString></QueryString>
<WebHeaders>
<SOAPAction>"Event"</SOAPAction>
<Content-Length>558</Content-Length>
<Content-Type>text/xml; charset=utf-8</Content-Type>
<Expect>100-continue</Expect>
<Host>localhost:25001</Host>
<User-Agent>Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.832)</User-Agent>
</WebHeaders>
</HttpRequest>
<soap:Envelope xmlnsTongue Tiedoap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<s:Header xmlnsTongue Tied="http://schemas.xmlsoap.org/soap/envelope/">
<To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://localhost:25001/</To>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">Event</Action>
</s:Header>
<soap:Body>
<Event xmlns="urnTongue Tiedpc_client">
<evt xmlns:q1="urnTongue Tiedpc" xsi:type="q1:EvtAlarm" xmlns="">
<Id>0</Id>

....
</evt>
</Event>
</soap:Body>
</soap:Envelope>

--------------------------- The CONTRACT looks like the following (async methods stripped out for readability)

<System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0"), _

System.ServiceModel.ServiceContractAttribute(Name:="spc-clientPortType", [Namespace]:="urnTongue Tiedpc_client", ConfigurationName:="spcclientPortType")> _

Public Interface spcclientPortType

<System.ServiceModel.OperationContractAttribute(Action:="GetRes", ReplyAction:="GetResResponse"), _

System.ServiceModel.XmlSerializerFormatAttribute(), _

System.ServiceModel.ServiceKnownTypeAttribute(GetType(SoapBase))> _

Function GetRes(ByVal request As GetResRequest) As <System.ServiceModel.MessageParameterAttribute(Name:="cltRsp")> GetResResponse

<System.ServiceModel.OperationContractAttribute(Action:="ActionRes", ReplyAction:="ActionResResponse"), _

System.ServiceModel.XmlSerializerFormatAttribute(), _

System.ServiceModel.ServiceKnownTypeAttribute(GetType(SoapBase))> _

Function ActionRes(ByVal request As ActionResRequest) As <System.ServiceModel.MessageParameterAttribute(Name:="cltRsp")> ActionResResponse

<System.ServiceModel.OperationContractAttribute(Action:="Event", ReplyAction:="EventResponse"), _

System.ServiceModel.XmlSerializerFormatAttribute(), _

System.ServiceModel.ServiceKnownTypeAttribute(GetType(SoapBase))> _

Function [Event](ByVal request As EventRequest) As <System.ServiceModel.MessageParameterAttribute(Name:="cltRsp")> EventResponse

End Interface




Re: Windows Communication Foundation (Indigo) Action "" Problem with gSOAP

David Kreutz - MSFT

I'm not familiar with gSOAP so forgive me if these questions are trivial, but what are you using gSOAP to retrieve information from the WSDL and dynamically generate the client Or do you code it up using the interface you posted above.






Re: Windows Communication Foundation (Indigo) Action "" Problem with gSOAP

Marsan001

I am also not familiar at all with gSoap. We got a WSDL-File from the partner-company. They want to access our Webservice. I think they generated the WSDL automatically out of their C++-Code. We used svcutil to generate the interface posted above.

As far as I understand it today, the SOAP 1.1 standard requires the SoapAction-Header. Without this header a deserializing is not possible...





Re: Windows Communication Foundation (Indigo) Action "" Problem with gSOAP

Nagesh_A_Patil

I am facing the similar problem. I am using gSOAP at client end and WCF at server end.

I am getting following error:
SOAP 1.2 fault: SOAP-ENV:MustUnderstand [no subcode]"The data in element 'a:Action' must be understood but cannot be handled"Detail: [no detail]

Please help me to sort out this issue..... Thanks in advance...




Re: Windows Communication Foundation (Indigo) Action "" Problem with gSOAP

Marsan001

Hello,

the problem was solved in meantime. The error was with the gSOAP-Library a missing switch when generating the stub-classes. So all action-headers were missing. The other company did a recompile with correct switches and then the Action-Field was inserted correctly in the soap headers.

M






Re: Windows Communication Foundation (Indigo) Action "" Problem with gSOAP

Nagesh_A_Patil

I tried all possible switch combination with Wsdl2h.exe and soapcpp2.exe. But no suceess yet.
Would it be possible for you to tell me those switches that helped you to get out of this problem.

I understand it is pretty difficult to recall that old memory. But I would really appriciate if you help me to solve this issue.

Thanks in advance...

Nagesh