pfmelamed-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [gsoap]
2014-09-22 07:47:16 UTC
Hi
Using ONVIF event wsdl (http://www.onvif.org/onvif/ver10/event/wsdl/event.wsdl),
service(CreatePullPointSubscription) response fails with,
A reply message was received for operation 'CreatePullPointSubscription' with action 'http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest'. However, your client code requires action 'http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionResponse'.
using gSoap 2.8.17r.
wsdl2h -o OnVif.HH -c -s -N tev -t typemap.dat http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl http://www.onvif.org/onvif/ver10/deviceio.wsdl http://www.onvif.org/onvif/ver10/deviceio.wsdl http://www.onvif.org/onvif/ver10/media/wsdl/media.wsdl http://www.onvif.org/onvif/ver10/media/wsdl/media.wsdl http://www.onvif.org/onvif/ver10/network/wsdl/remotediscovery.wsdl http://www.onvif.org/onvif/ver10/network/wsdl/remotediscovery.wsdl http://www.onvif.org/onvif/ver10/event/wsdl/event.wsdl http://www.onvif.org/onvif/ver10/event/wsdl/event.wsdl
soapcpp2 -c -L -x -d../. -I../../gsoap/import -I ../../gsoap/ OnVif.HH
the xml Req:
from Test tool
POST / HTTP/1.1
Host: 16.0.0.10
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 806
< ?xml version="1.0" encoding="utf-8"?>
< s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</a:Action>
<a:MessageID>urn:uuid:43e57a4d-1917-4b4a-9086-3094724d9b6e</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">http://16.0.0.10:8800/</a:To>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreatePullPointSubscription xmlns="http://www.onvif.org/ver10/events/wsdl">
<InitialTerminationTime>PT10S</InitialTerminationTime>
</CreatePullPointSubscription>
</s:Body>
< /s:Envelope>
My response in c:
int __tev__CreatePullPointSubscription(struct soap* soap,
struct _tev__CreatePullPointSubscription *tev__CreatePullPointSubscription,
struct _tev__CreatePullPointSubscriptionResponse *tev__CreatePullPointSubscriptionResponse)
{
time_t TimeNow;
time_t TimeOut;
char UUID[37];
printf("%s %d\n",__FUNCTION__,__LINE__);
GenUUID(UUID,TRUE);
memset(tev__CreatePullPointSubscriptionResponse,0, sizeof(struct _tev__CreatePullPointSubscriptionResponse));
tev__CreatePullPointSubscriptionResponse->SubscriptionReference.Address = (char *)soap_malloc(soap, LARGE_SIZE);
sprintf(tev__CreatePullPointSubscriptionResponse->SubscriptionReference.Address,"urn:uuid:%s",UUID) ;
TimeNow = time(NULL);
TimeOut = ConvPTtoSeconds(tev__CreatePullPointSubscription->InitialTerminationTime);
tev__CreatePullPointSubscriptionResponse->wsnt__CurrentTime = TimeNow;
tev__CreatePullPointSubscriptionResponse->wsnt__TerminationTime = TimeNow + TimeOut;
return(SOAP_OK);
}
and My response in XML:
HTTP/1.1 200 OK
Server: gSOAP/2.8
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1950
Connection: close
< ?xml version="1.0" encoding="UTF-8"?>
< SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:xmime="http://tempuri.org/xmime.xsd"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl"
xmlns:tnet="http://www.onvif.org/ver10/network/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl">
< SOAP-ENV:Header>
<wsa5:MessageID>urn:uuid:43e57a4d-1917-4b4a-9086-3094724d9b6e</wsa5:MessageID>
<wsa5:ReplyTo SOAP-ENV:mustUnderstand="true">
<wsa5:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa5:Address>
</wsa5:ReplyTo>
<wsa5:To SOAP-ENV:mustUnderstand="true">http://16.0.0.10:8800/</wsa5:To>
<wsa5:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa5:Action>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tev:CreatePullPointSubscriptionResponse><tev:Subs criptionReference><wsa5:Address>urn:uuid:1419d68a-1dd2-11b2-a105-000c29ec4bbb</wsa5:Address></tev:SubscriptionReference>
<wsnt:CurrentTime>2014-09-14T07:19:29Z</wsnt:CurrentTime>
<wsnt:TerminationTime>2014-09-14T07:19:39Z</wsnt:TerminationTime>
< /tev:CreatePullPointSubscriptionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I can fix the problem with :
strcpy(soap->header->wsa5__Action,"http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionResponse");
but it is not the correct way.
and one more question please:
after using wsdl2h I receive this message !?!
Warning: WSDL "WS-BaseNotification" has no bindings to implement operations
please any suggestions?
Thanks
PF
Using ONVIF event wsdl (http://www.onvif.org/onvif/ver10/event/wsdl/event.wsdl),
service(CreatePullPointSubscription) response fails with,
A reply message was received for operation 'CreatePullPointSubscription' with action 'http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest'. However, your client code requires action 'http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionResponse'.
using gSoap 2.8.17r.
wsdl2h -o OnVif.HH -c -s -N tev -t typemap.dat http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl http://www.onvif.org/onvif/ver10/deviceio.wsdl http://www.onvif.org/onvif/ver10/deviceio.wsdl http://www.onvif.org/onvif/ver10/media/wsdl/media.wsdl http://www.onvif.org/onvif/ver10/media/wsdl/media.wsdl http://www.onvif.org/onvif/ver10/network/wsdl/remotediscovery.wsdl http://www.onvif.org/onvif/ver10/network/wsdl/remotediscovery.wsdl http://www.onvif.org/onvif/ver10/event/wsdl/event.wsdl http://www.onvif.org/onvif/ver10/event/wsdl/event.wsdl
soapcpp2 -c -L -x -d../. -I../../gsoap/import -I ../../gsoap/ OnVif.HH
the xml Req:
from Test tool
POST / HTTP/1.1
Host: 16.0.0.10
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 806
< ?xml version="1.0" encoding="utf-8"?>
< s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</a:Action>
<a:MessageID>urn:uuid:43e57a4d-1917-4b4a-9086-3094724d9b6e</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">http://16.0.0.10:8800/</a:To>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreatePullPointSubscription xmlns="http://www.onvif.org/ver10/events/wsdl">
<InitialTerminationTime>PT10S</InitialTerminationTime>
</CreatePullPointSubscription>
</s:Body>
< /s:Envelope>
My response in c:
int __tev__CreatePullPointSubscription(struct soap* soap,
struct _tev__CreatePullPointSubscription *tev__CreatePullPointSubscription,
struct _tev__CreatePullPointSubscriptionResponse *tev__CreatePullPointSubscriptionResponse)
{
time_t TimeNow;
time_t TimeOut;
char UUID[37];
printf("%s %d\n",__FUNCTION__,__LINE__);
GenUUID(UUID,TRUE);
memset(tev__CreatePullPointSubscriptionResponse,0, sizeof(struct _tev__CreatePullPointSubscriptionResponse));
tev__CreatePullPointSubscriptionResponse->SubscriptionReference.Address = (char *)soap_malloc(soap, LARGE_SIZE);
sprintf(tev__CreatePullPointSubscriptionResponse->SubscriptionReference.Address,"urn:uuid:%s",UUID) ;
TimeNow = time(NULL);
TimeOut = ConvPTtoSeconds(tev__CreatePullPointSubscription->InitialTerminationTime);
tev__CreatePullPointSubscriptionResponse->wsnt__CurrentTime = TimeNow;
tev__CreatePullPointSubscriptionResponse->wsnt__TerminationTime = TimeNow + TimeOut;
return(SOAP_OK);
}
and My response in XML:
HTTP/1.1 200 OK
Server: gSOAP/2.8
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1950
Connection: close
< ?xml version="1.0" encoding="UTF-8"?>
< SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:xmime="http://tempuri.org/xmime.xsd"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl"
xmlns:tnet="http://www.onvif.org/ver10/network/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl">
< SOAP-ENV:Header>
<wsa5:MessageID>urn:uuid:43e57a4d-1917-4b4a-9086-3094724d9b6e</wsa5:MessageID>
<wsa5:ReplyTo SOAP-ENV:mustUnderstand="true">
<wsa5:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa5:Address>
</wsa5:ReplyTo>
<wsa5:To SOAP-ENV:mustUnderstand="true">http://16.0.0.10:8800/</wsa5:To>
<wsa5:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa5:Action>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tev:CreatePullPointSubscriptionResponse><tev:Subs criptionReference><wsa5:Address>urn:uuid:1419d68a-1dd2-11b2-a105-000c29ec4bbb</wsa5:Address></tev:SubscriptionReference>
<wsnt:CurrentTime>2014-09-14T07:19:29Z</wsnt:CurrentTime>
<wsnt:TerminationTime>2014-09-14T07:19:39Z</wsnt:TerminationTime>
< /tev:CreatePullPointSubscriptionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I can fix the problem with :
strcpy(soap->header->wsa5__Action,"http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionResponse");
but it is not the correct way.
and one more question please:
after using wsdl2h I receive this message !?!
Warning: WSDL "WS-BaseNotification" has no bindings to implement operations
please any suggestions?
Thanks
PF