I am trying to insert data into the SQL server database through SOAP XML Web service from IOS using Swift code, but it is get only Id value which is auto generate in database ,but i cant insert my data into table because it will get null values which i have passed in Soap message.
My Code in swift
<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
<soap:Body>
<CreateUserDetail xmlns='http://tempuri.org/'>
<userdetail>
<UserDetail>
<Id>1</Id>
<Username xsi:type='xs:string'>username</Username>
<Password xsi:type='xs:string'>password</Password>
</UserDetail>
</userdetail>
</CreateUserDetail>
</soap:Body>
</soap:Envelope>
I have surfing many of blog and sites and finally I got solution for it here is a soap message with solution
my new soap message is written below
<SOAP-ENV:Envelope xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:tns='http://tempuri.org/' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<tns:CreateUserDetail>
<tns:userdetail>
<tns:Id xmlns:tns='http://schemas.datacontract.org/2004/07/WcfService1'>1</tns:Id>
<tns:Username xmlns:tns='http://schemas.datacontract.org/2004/07/WcfService1'>String</tns:Username>
<tns:Password xmlns:tns='http://schemas.datacontract.org/2004/07/WcfService1'>String</tns:Password>
</tns:userdetail>
</tns:CreateUserDetail>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
you have to just replace xmlns:tns='your target namespace' which i have write in id,username,password element
hope it will help someone
Related
I'm trying to send a SOAP request to the Loqate services following their API documentation found here.
The documentation says the SOAP end point is
https://api.addressy.com/Capture/Interactive/Find/v1.1/wsdlnew.ws
and the sample request is:
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Find
xmlns="http://api.addressy.com/">
<Key>AA11-AA11-AA11-AA11</Key>
<Text>wr5 3da</Text>
<IsMiddleware>True</IsMiddleware>
<Container>GB|RM|ENG|3DA-WR5</Container>
<Origin>52.182,-2.222</Origin>
<Countries>GB,US,CA</Countries>
<Limit>10</Limit>
<Language />
<Bias />
<Filters />
<GeoFence />
</Find>
</soap:Body>
</soap:Envelope>
So I load up Postman and make these steps, following the Postman guide from their blog.
When I send the request, I just get back this page . I'm not sure why it's not working.
How can I make a SOAP request to this API? What am I missing?
That's not the service endpoint, it's an address where you can get the WSDL. Inside that WSDL you will find the service endpoint:
<soap:address location="http://services.postcodeanywhere.co.uk/Capture/Interactive/Find/v1.10/soapnew.ws"/>
Send your request there. The endpoint is over http, but the https seems to be working on the same address: https://services.postcodeanywhere.co.uk/Capture/Interactive/Find/v1.10/soapnew.ws
One other thing. If you want a more specific client than Postman, you could try SoapUI.
I couldn't get any lead info on how to retrieve a taxonomy term store using REST API in an iOS app.
Any information will be highly appreciated. Thanks.
EDIT
According to this article, managed taxonomy data cannot be consumed from REST.
Though, this can be done using JSOM (sp.taxonomy.js), so it seems reasonable to ask if the same stuff can be ported to iOS or other platforms.
I managed to get taxonomy terms by POSTing this SOAP message to _vti_bin/TaxonomyClientService.asmx:
<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
<soap:Body>
<GetKeywordTermsByGuids xmlns='http://schemas.microsoft.com/sharepoint/taxonomy/soap/'>
<termIds><id>64d031b6-76bb-49ec-a3b3-cb42b8f0953b</id></termIds>
</GetKeywordTermsByGuids>
</soap:Body>
</soap:Envelope>
If you need to include more than one guid in the termIds node, you must post it in an XML format like this:
<set>
<id>guid1</id>
<id>guid2</id>
...
</set>
and, of course, HTML escaped.
I am trying to use ServiceStack to replace WCF for a self hosted service, accessed with a PHP client that forms its messages from on the WSDL.
The WSDL produced by ServiceStack has "part names" called "par" eg:
<wsdl:message name="GetServiceDetailsIn">
<wsdl:part name="par" element="tns:GetServiceDetails" />
</wsdl:message>
Then the SOAP request produced by PHP looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body><par/></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
instead of this from the built-in help:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetServiceDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:Shout" />
</soap:Body>
</soap:Envelope>
The PHP client has used a par tag instead of GetServiceDetails and it gets a blank response. Can the "part name" definition can be renamed or removed in ServiceStack?
It seems you can't doing anything about this in ServiceStack and its not designed to work with PHP anyway. However you can get it working if you get PHP to tweak the XML tags with find-and-replace, or XSLTs, before sending it.
I am using QuickBooks (QBD) SyncActivity API to get the information about Quickbooks Desktop synchronizations.But sometime when I call SyncActivity API I didn't get response and sometimes I get response.
Is there any connectivity issue with cloud or Is there anyting I'm missing to specify to get details from cloud, below is Request and code for more details,
//Sync Activity details
Intuit.Ipp.Data.Qbd.SyncActivityRequest syncActivityRequest = new SyncActivityRequest();
var syncStatuses = dataServices.GetSyncActivity(syncActivityRequest);
syncActivity Request,
<?xml version="1.0" encoding="utf-8"?>
<SyncActivityRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.intuit.com/sb/cdm/v2" />
Please share your views and suggessions.
Thanks,
Reshma D.
You pass in a begin and end time stamp and you will get a response if there was any sync activity within the time span that you specified. There may or may not be something to return
<?xml version="1.0"?>
<SyncActivityRequest xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.intuit.com/sb/cdm/v2 RestDataFilter.xsd ">
<OfferingId>ipp</OfferingId>
<StartCreatedTMS>2011-06-02T08:31:25.0Z</StartCreatedTMS>
<EndCreatedTMS>2011-06-02T08:31:28.0Z</EndCreatedTMS>
</SyncActivityRequest>
Thanks
Jarred
I have used XmlSlurper successfully before, but am struggling to parse the following XML - it is a response from a call to the Pingdom API. I have tried following the namespace declaration examples, but I just get an error message on the ns1 and ns2 values. Can anybody help point me in the right direction? The xml looks like this:-
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:methods"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns2="urn:PingdomAPI"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:Auth_loginResponse>
<return xsi:type="ns2:Auth_LoginResponse">
<status xsi:type="xsd:int">0</status>
<sessionId xsi:type="xsd:string">mysessionId</sessionId>
</return>
</ns1:Auth_loginResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
after using the XmlSlurper it just concatenates the 0 and mysessionId to one string
0mysessionId
Try this, giving your xml is stored in the xml variable :
def records = new XmlSlurper().parseText(xml).declareNamespace(
'SOAP-ENV':'http://schemas.xmlsoap.org/soap/envelope/',
ns1:'urn:methods',
xsd:'http://www.w3.org/2001/XMLSchema',
xsi:'http://www.w3.org/2001/XMLSchema-instance',
ns2:'urn:PingdomAPI'
)
println records.'SOAP-ENV:Body'.'ns1:Auth_loginResponse'.return.status
println records.'SOAP-ENV:Body'.'ns1:Auth_loginResponse'.return.sessionId