I am using a SOAP service with the following structure:
Suds (
https://fedorahosted.org/suds/ ) version: 0.3.9 GA build: R659-20100219
Service ( DPWSService ) tns="http://ejb.revitalization.services.ndg/"
Prefixes (1)
ns0 = "http://ejb.revitalization.services.ndg/"
Ports (1):
(DPWSPort)
Methods (13):
addTimer(request request, )
deleteProvider(request request, )
deleteTimer(request request, )
doHarvest(request request, )
doIngest(request request, )
doNewUpdateProvider(request request, )
getHarvestHistory(GetHistoryRequest request, )
getIngestHistory(GetHistoryRequest request, )
getList(GetListType request, )
getListNames()
getProviderDetails(request request, )
getProviderStatistic(request request, )
getStatusProcess(request request, )
Types (63):
AddTimerResponse
CSWProviderDetailsType
ConfirmationType
ContactType
DataRangeType
DeleteProviderResponse
DeleteTimerResponse
DoHarvestResponse
DoIngestResponse
DoNewUpdateProviderResponse
EmailContactType
GetHarvestHistoryResponse
GetHistoryRequest
GetIngestHistoryResponse
GetListNamesResponse
GetListResponse
GetListType
GetProcessStatusResponse
GetProviderDetailsResponse
GetProviderStatisticResponse
HarvestHistoryType
HarvestProviderType
HarvestType
IngestHistoryType
ListNames
OAIProviderDetailsType
ProcessIDType
ProviderCommonType
ProviderContactType
ProviderDetail
ProviderDetailsType
ProviderIDType
ProviderStatistic
ResponseType
TimerInfoCommonType
TimerInfoDetail
TimerInfoLogDetail
addTimer
addTimerResponse
deleteProvider
deleteProviderResponse
deleteTimer
deleteTimerResponse
doHarvest
doHarvestResponse
doIngest
doIngestResponse
doNewUpdateProvider
doNewUpdateProviderResponse
getHarvestHistory
getHarvestHistoryResponse
getIngestHistory
getIngestHistoryResponse
getList
getListNames
getListNamesResponse
getListResponse
getProviderDetails
getProviderDetailsResponse
getProviderStatistic
getProviderStatisticResponse
getStatusProcess
getStatusProcessResponse
I NEED to send a SOAP request with a structure like below, e.g. I need to add the
targetnamespace in front of the id attribute:
<SOAP-ENV:Envelope
xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://ejb.revitalization.services.ndg/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
<ns1:doIngest>
<request>
<ns1:ProcessID ns1:id="1430"/>
<ns1:EmailReportID>1031</ns1:EmailReportID>
</request>
</ns1:doIngest>
</ns0:Body>
</SOAP-ENV:Envelope>
I have tried building my request as:
request = wsClient.factory.create('doIngest.request')
request.EmailReportID = "1031"
request.ProcessID = wsClient.factory.create('ProcessIDType')
request.ProcessID._id= "1430"
result=wsClient.service.doIngest(request)
and as:
request =
wsClient.factory.create('{http://ejb.revitalization.services.ndg/}doIngest.request')
request.EmailReportID = "1031"
request.ProcessID =
wsClient.factory.create('{http://ejb.revitalization.services.ndg/}ProcessIDType')
request.ProcessID._id="1430"
result=wsClient.service.doIngest(request)
and as:
request = wsClient.factory.create('doIngest.request')
request.EmailReportID = emailIDs
request.ProcessID = wsClient.factory.create('ProcessIDType')
request.ProcessID._id =
wsClient.factory.resolver.qualify('{http://ejb.revitalization.services.ndg/}_id')
request.ProcessID._id=procID
result=wsClient.service.doIngest(request)
and a number of variants in between...
but every time times the request is created as below, e.g. without a namespace in front of
the id attribute:
<SOAP-ENV:Envelope
xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://ejb.revitalization.services.ndg/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
<ns1:doIngest>
<request>
<ns1:ProcessID id="1441"/>
<ns1:EmailReportID>1031</ns1:EmailReportID>
</request>
</ns1:doIngest>
</ns0:Body>
</SOAP-ENV:Envelope>
How do I force the namespace in front of the attribute in the request?
thanks
James Passmore
GIS and WWW Specialist
Information Systems and Infrastructure,
British Geological Survey,
http://www.bgs.ac.uk/
+44 (0)115 936 3125
--
This message (and any attachments) is for the recipient only NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.