changing namespace prefixes in soap message with wwsapi - c

I'm using WWSAPI inside a C project to communicate with a web service by sending and receiving SOAP messages.
The error I'm having is that The server is expecting to see a <wsse:Security> tag and the message generated by my program doesn't have one. Instead it has a <o:Security> tag. Is there a way to specify the namespace prefix within WWSAPI for C/C++?
Here is my request:
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<a:Action s:mustUnderstand="1">http://ge.evse.com/getAllGeneratedPasswords</a:Action>
<a:MessageID>urn:uuid:1fc3d3dc-a1c1-4fcf-bfca-96e712afba1b</a:MessageID>
<a:To s:mustUnderstand="1">https://services.stg.gewattstation.com/EVSEManufacturingServices/services/EVSEManufacturingServices</a:To>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<Timestamp xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<Created>2012-06-08T19:00:59.476Z</Created>
<Expires>2012-06-08T19:05:59.476Z</Expires>
</Timestamp>
<o:UsernameToken>
<o:Username>joe</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"><!--censored sensitive information--></o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<getAllGeneratedPasswords xmlns="http://service.services.manufacturing.evse.inds.ge.com/">
<userType xmlns="">user</userType>
</getAllGeneratedPasswords>
</s:Body>
</s:Envelope>
And here is the Response from the web service:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode xmlns:ns1="http://docs.oas is-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd ">ns1:InvalidSecurity</faultcode>
<faultstring>An error was discovered processing the <wsse:Security> header</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
As you can see, it's looking for <wsse:Security> and it isn't seeing it... anyone who knows anything about this?

Related

Can't Get the Syntax to Work for this XML Soap Request - 400 Error

Working with a SOAP API in React JS and all is fine except for this one function keeps returning a 400 error.
Using Axios to make the POST request with the following syntax.
The goal is to obtain a specific client ID and be able to edit specified fields.
let getExtraInfo = `<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>
<UpdateClientAdditionalFields xmlns="http://www.ozsoft.com.au/VETtrak/api/complete">
<token>${token}</token>
<clientCode>09224</clientCode>
<additionalFieldData>
<AdditionalData>
<Gender>M</Gender>
</AdditionalData>
</additionalFieldData>
</UpdateClientAdditionalFields>
</soap:Body>
</soap:Envelope>`
Here is a link to the API
https://sthservices.ozsoft.com.au/SIU_API/VT_API.asmx?op=UpdateClientAdditionalFields
I have tried every combination to get the request to work correctly but I believe the issue may be to incorrect syntax on the API end.
For reference here is my API call using Axios.
async function GetTimetableData(xmlsChosen){
const response = await axios.post('https://thingproxy.freeboard.io/fetch/https://sthservices.ozsoft.com.au/SIU_API/VT_API.asmx?wsdl',
xmlsChosen,
{
headers:{
'Content-Type': 'text/xml'}
}).then(res=>{
var jsonObj = parse(res.data);
// setCourseChosen(jsonObj.["soap:Envelope"]["soap:Body"].GetOccurrenceExtendedDetailsResponse.GetOccurrenceExtendedDetailsResult.OccuExtended);
console.log(jsonObj);
}).catch(err=>{console.log(err);
}).finally(() => {
});
}
Would anyone be able to provide some insight as to how to do this request using React JS. I have asked the devs directly but their responses are in PHP and doesn't help with this specific issue.
The list of additional fields can also be found here.
https://customer.vettrak.com.au/hc/en-us/articles/360002285835
I can provide more information if needed.
UPDATE
I have added the headers and checked that the token is correct - I also don't have issues making other requests with the token with other functions.
I have tried the syntax below.
`<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:com="http://www.ozsoft.com.au/VETtrak/api/complete">
<soap:Body>
<com:UpdateClientAdditionalFields>
<com:token>676767676</com:token>
<com:clientCode>09224</com:clientCode>
<com:additionalFieldData>"<com:AdditionalData><com:Gender>M></com:Gender></com:AdditionalData>"</com:additionalFieldData>
</com:UpdateClientAdditionalFields>
</soap:Body>
</soap:Envelope>`
`<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:com="http://www.ozsoft.com.au/VETtrak/api/complete">
<soap:Body>
<com:UpdateClientAdditionalFields>
<com:token>${token}</com:token>
<com:clientCode>09224</com:clientCode>
<com:additionalFieldData><AdditionalData><Gender>M><Gender><AdditionalData></com:additionalFieldData>
</com:UpdateClientAdditionalFields>
</soap:Body>
</soap:Envelope>`
If I do the following request
`<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:com="http://www.ozsoft.com.au/VETtrak/api/complete">
<soap:Body>
<com:UpdateClientAdditionalFields>
<com:token>${token}</com:token>
<com:clientCode>09224</com:clientCode>
<com:additionalFieldData><com:AdditionalData>string</com:AdditionalData></com:additionalFieldData>
</com:UpdateClientAdditionalFields>
</soap:Body>
</soap:Envelope>`
I get a "A problem occurred when parsing the additional data XML: Data at the root level is invalid. Line 1, position 1." Error. I know the token and client code are fine as when I don't include them I get an Authentication Error / Client doesn't exist response.
Then when I do:
`<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:com="http://www.ozsoft.com.au/VETtrak/api/complete">
<soap:Body>
<com:UpdateClientAdditionalFields>
<com:token>${token}</com:token>
<com:clientCode>09224</com:clientCode>
<com:additionalFieldData><com:AdditionalData><gender>M</gender><com:/AdditionalData></com:additionalFieldData>
</com:UpdateClientAdditionalFields>
</soap:Body>
</soap:Envelope>`
I get the usual 400 error.
After looking at the UpdateClientAdditionalFields inside the WSDL, it seems one of your parameters is wrong. The top element is defined as:
<s:element name="UpdateClientAdditionalFields">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="token" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="clientCode" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="additionalFieldData" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
additionalFieldData is a string, but you are sending an XML in your message:
<additionalFieldData>
<AdditionalData>
<Gender>M</Gender>
</AdditionalData>
</additionalFieldData>
Try with a string or without this field just to see if it works (since it is optional minOccurs="0").
Also, your token may be wrong:
<token>${token}</token>
Is this a variable that you need to replace before the call?
Add also a HTTP header named SOAPAction like this:
SOAPAction: "http://www.ozsoft.com.au/VETtrak/api/complete/UpdateClientAdditionalFields"
Try again with these changes and see if it works.
EDIT based on comments:
Are you sending proper values for the token, clientCode, and additionalFieldData elements? I mean actual, usable values, all of type string, not placeholders like ${token} or XML elements instead of string values?
Your SOAP request should look like this (don't forget to add the SOAPAction HTTP header):
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:com="http://www.ozsoft.com.au/VETtrak/api/complete">
<soap:Body>
<com:UpdateClientAdditionalFields>
<com:token>proper value here</com:token>
<com:clientCode>proper value here</com:clientCode>
<com:additionalFieldData>proper value here</com:additionalFieldData>
</com:UpdateClientAdditionalFields>
</soap:Body>
</soap:Envelope>

EWS GetFolder bug on Office 365

I have an office 365 account with the following accounts :
One main user: mainuser#company.onmicrosoft.com
Another user: someuser#company.onmicrosoft.com
someuser#company.onmicrosoft.com has shared his calendar with mainuser#company.onmicrosoft.com
Then I execute the following EWS operation (through mainuser#company.onmicrosoft.com) to get the calendar permissions set for someuser#company.onmicrosoft.com
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010"/>
</soap:Header>
<soap:Body>
<GetFolder xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<FolderShape>
<t:BaseShape>Default</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="folder:PermissionSet"/>
</t:AdditionalProperties>
</FolderShape>
<m:FolderIds>
<t:DistinguishedFolderId Id="calendar">
<t:Mailbox>
<t:EmailAddress>someuser#company.onmicrosoft.com</t:EmailAddress>
</t:Mailbox>
</t:DistinguishedFolderId>
</m:FolderIds>
</GetFolder>
</soap:Body>
</soap:Envelope>
Everything is working fine, as I get a response looking like this :
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="20" MajorBuildNumber="56" MinorBuildNumber="13" Version="V2017_07_11"/>
</s:Header>
<s:Body>
<m:GetFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:GetFolderResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Folders>
<t:CalendarFolder>
<t:FolderId Id="some-folder-id"/>
<t:DisplayName>Calendar</t:DisplayName>
<t:TotalCount>67</t:TotalCount>
<t:ChildFolderCount>2</t:ChildFolderCount>
<t:PermissionSet>
...
</t:PermissionSet>
</t:CalendarFolder>
</m:Folders>
</m:GetFolderResponseMessage>
</m:ResponseMessages>
</m:GetFolderResponse>
</s:Body>
</s:Envelope>
Except when someuser#company.onmicrosoft.com shares his calendars with an external contact, then when I execute the same request I suddenly get this response error :
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="20" MajorBuildNumber="56" MinorBuildNumber="13" Version="V2017_07_11"/>
</s:Header>
<s:Body>
<m:GetFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:GetFolderResponseMessage ResponseClass="Error">
<m:MessageText>Access is denied. Check credentials and try again., Can't look up the requested Entry ID.</m:MessageText>
<m:ResponseCode>ErrorAccessDenied</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:Folders/>
</m:GetFolderResponseMessage>
</m:ResponseMessages>
</m:GetFolderResponse>
</s:Body>
</s:Envelope>
I don't understand why does Office 365 return an EWS error instead of filtering the data which we should not have access to... We should be able to get the calendar permissions concerning the internal organization regardless of any external calendar sharing.
Anyone having the same issue or info about scheduled resolution ?

How to verify XML Signature using CXF/JAXWS?

I am really having a hard time finding a tutorial that can validate an xml signature using cxf.
I have a signed xml request like this: (NOTE: Signature value, digest value and X509 certificates are dummy values)
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="http://namespaces.gsma.org/esim-messaging/1">
<soap:Header/>
<soap:Body>
<ns:Request>
<ns:ParentNode>
<ns:TobeSignedInfo>
<ns:id>010203</ns:id>
<ns:oid>1.3.6.1.4.1.31746</ns:oid>
</ns:TobeSignedInfo>
<ns:SampleAdditionalProperties>
<ns:Property key="myProperty" value="aValue"/>
</ns:SampleAdditionalProperties>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>rE7suDc1EdUOJx6auQsTp8kGfZEe+pq2zaDvsKDMc/A=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
NXwOjw6ZT3NJRGqOluY8lF5/dkrTE89OjgB3z+kI4qmnTka0/hU6y9uihiRsrP+BZAMowhbwnPfy
ThEmTvMr0GGVB/w2pp0635Y8R672KNxZf2j48yFuz6ksyC5eBXVRAEswAt9lRh2ikcC9sULzLnSr
eA6rHNWiEm5v8OH708uZ/GWq4NlxQc8oLkrR634OY53ghPr2K+84vN99yxtGzYDHlTEFFJAyTqif
aUjYEQqcszKcbvf/XvriNcjHlk3kM8AwaQMePngxJatY3rlYWbykZhmwdqBgWrknRkjr5GAWVPEU
Q3aRlfbRYi66LV0UeGrzkinV2z5pwmBNxqc9GNnWMsvq0sWyF0BLSDY7yIz4HZVaeySytmZC21fI
PktCIfv+NRmOtFznkg3utX27Iwmc4kYGfeBXxmPMLOIkhf3dItOtV/8KNA4jW5dJNxnOEXiVXEV+
FJZbeAIet4wBvAfQb6QXcrfuwBp2kCmoYtmObH5Y+AgEf5KxPiGb1kLX
</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>
MIIExDCCAywCCQC0bmU6MB8PuTANBgkqhkiG9w0BAQUFADCBozELMAkGA1UEBhMCUEgxEDAOBgNV
BAgTB0J1ZW5kaWExDzANBgNVBAcTBk1ha2F0aTEeMBwGA1UEChMVT2JlcnRodXIgVGVjaG5vbG9n
aWVzMSEwHwYDVQQLExhSZXNlYXJjaCBhbmQgRGV2ZWxvcG1lbnQxCzAJBgNVBAMTAk9UMSEwHwYJ
KoZIhvcNAQkBFhJlbWFpbEBvYmVydGh1ci5jb20wHhcNMTQxMDI1MDgzMzE5WhcNMTUxMDI1MDgz
MzE5WjCBozELMAkGA1UEBhMCUEgxEDAOBgNVBAgTB0J1ZW5kaWExDzANBgNVBAcTBk1ha2F0aTEe
MBwGA1UEChMVT2JlcnRodXIgVGVjaG5vbG9naWVzMSEwHwYDVQQLExhSZXNlYXJjaCBhbmQgRGV2
ZWxvcG1lbnQxCzAJBgNVBAMTAk9UMSEwHwYJKoZIhvcNAQkBFhJlbWFpbEBvYmVydGh1ci5jb20w
ggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDEaJeQaBruoMMG5LEdLc6D4aQq/4IXc6tk
kbEyO+2o3Ey3dU/WFSS7DNy86DKPWTG0VKinpFinwic+Be+A36K/eei8wyyv2YuhI1UuKWPsvmkV
mb/klra899jKvid1Jd0oMG8ViQGkpveYdoAfg5IR9k2NSgV1cn3ab26CmwwIpbDuPcMhW0bEXxG+
El67hrLQqpDjIuWRpbxs5prBdG4V79NrR6Pu1goLq9FmHsmKujPAu1gSnNmx61rab8zzVcEG19Fd
huG7ysilzDSeo2YTKs7Lzwp4Zu94T+IJYHYrV4iiB4jVLO7IQCUKB3T4y+9VYHI1fhasRGB1t8eR
CScsKg8IvtMMwjvKv4XK0EdBaLADzvpRVGAiV1hlo3sJ+D+tr/gkJ/ElVjC/90gIVxESwg5XQtPG
kQImde6GDZquEcT5URyvkq/WuMu+3J4NUSMpHDXeel2R8UkiSXs5ONxRyT3Ai3IjXUFhO9EGjFpe
eM1gqSYx3l6DyPSBF1rKHmkCAwEAATANBgkqhkiG9w0BAQUFAAOCAYEAaDkvLk/tzIMJA/3q2zJL
M+N5cPc+OVG8kPJK3aMInXciZRrY+uSyTflVaOpJJu038fN07kMzQePDyRJQENOZK0JsDz2bX1h5
6Z03b34/UdgFR5z3NC++iQNbBFaXjsfcAo45UgEgn7wPdqXQ8bdViHakmCMG43vPzLgp2ZSK0GMt
Pt1Q2qnbWz04Gkjog284RZZ4mpxSA3g8sVypoDTjw3HJhNRCPjq+tTXkOqWK4nNJH5tbwqq9uUjJ
6nTISN5WJ3OIvdLejPNmjMBBcaGVmFkGIBqlfyMZ+SuJiqMJfW/Ccqf640U3tyZDJNeTxMmaqerE
mnihf+sIdPf2RfwbdBPiHdLmmU65yi89b6Bz
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
</ns:ParentNode>
</ns:Request>
</soap:Body>
</soap:Envelope>
How can I validate signature using cxf? I saw an implementation of WSPolicy and WSS4JInterceptors and it think it is not fit for this situation because the request doesn't have <wsse:Security> tag. Any thoughts are very much welcome.. Thanks in advance
The WS-Security standard mandates that XML Signature must be in the security header of the request (and not in the SOAP Body as per your example). So your best bet is to grab the SOAP Body (e.g. in a SOAP Handler), and use the Apache Santuario API to validate the signature yourself. Here is some sample code that shows you how to do the latter:
https://github.com/coheigea/testcases/blob/master/apache/santuario/santuario-xml-signature/src/test/java/org/apache/coheigea/santuario/xmlsignature/SignatureDOMTest.java
Colm.

Camel CXF + JAX-WS + SoapHeader

How can I parse SOAP headers within apache camel processor from apache camel cxf endpoint in POJO mode:
<cxf:cxfEndpoint id="MyWS" address="http://localhost:8080/services/MyWS" serviceClass="tmp.MyWS" />
<route>
<from uri="cxf:bean:MyWS" />
<process ref="MyProcessor" />
</route>
On the official apache camel cxf website I found an example how to set headers, but there is no examples about getting them. How can I get messageId value. My SOAP request looks like that:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://inv.org">
<soapenv:Header>
<inv:messageId>111</inv:messageId>
</soapenv:Header>
<soapenv:Body>
...
</soapenv:Body>
</soapenv:Envelope>
In the Camel Route builder we will get the SOAP Header using simple componenent, in the below example I am apply cbr using SOAP operation name i.e.
from("cxf:bean:xyz-ws?dataFormat=POJO").routeId("xyz-ws").log( "This is ${in.header.operationName} operation called...." )
.log( "Entering inside the Choice with operation....${in.header.operationName}")
.when(simple("${in.header.operationName} == 'getDataFromDictionary'"))
Hope this is helpfull.

Getting ParsingError, InvalidSoapActionHeader on SQL Server SOAP request

I am attempting to send a SOAP request to SQL Server 2005, but I am getting a vague error in response. Can anyone interpret for me?
Here is my request (linebreaks have been added for readability):
<v:Envelope
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:d="http://www.w3.org/2001/XMLSchema"
xmlns:c="http://www.w3.org/2001/12/soap-encoding"
xmlns:v="http://www.w3.org/2001/12/soap-envelope">
<v:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>cgtyoder</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">SooperSekrit</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</v:Header>
<v:Body>
<MyFunction xmlns="http://tempuri.org/" id="o0" c:root="1">
<OutputParam i:nil="true" />
</MyFunction>
</v:Body>
</v:Envelope>
And here is the XML response (linebreaks added):
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xml:space="preserve"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="http://schemas.microsoft.com/sqlserver/2004/SOAP"
xmlns:sqlsoaptypes="http://schemas.microsoft.com/sqlserver/2004/SOAP/types"
xmlns:sqlrowcount="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlRowCount"
xmlns:sqlmessage="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlMessage"
xmlns:sqlresultstream="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream"
xmlns:sqltransaction="http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlTransaction"
xmlns:sqltypes="http://schemas.microsoft.com/sqlserver/2004/sqltypes"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<SOAP-ENV:Body>
<SOAP-ENV:Fault xmlns:sqlsoapfaultcode="http://schemas.microsoft.com/sqlserver/2004/SOAP/SqlSoapFaultCode">
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>There was an error in the incoming SOAP request packet: Client, ParsingError, InvalidSoapActionHeader</faultstring>
<faultactor>http://schemas.microsoft.com/sqlserver/2004/SOAP</faultactor>
<detail xmlns:SOAP-1_2-ENV="http://www.w3.org/2003/05/soap-envelope">
<SOAP-1_2-ENV:Code>
<SOAP-1_2-ENV:Value>SOAP-1_2-ENV:Sender</SOAP-1_2-ENV:Value>
<SOAP-1_2-ENV:Subcode>
<SOAP-1_2-ENV:Value>sqlsoapfaultcode:ParsingError</SOAP-1_2-ENV:Value>
<SOAP-1_2-ENV:Subcode>
<SOAP-1_2-ENV:Value>sqlsoapfaultcode:InvalidSoapActionHeader</SOAP-1_2-ENV:Value>
</SOAP-1_2-ENV:Subcode>
</SOAP-1_2-ENV:Subcode>
</SOAP-1_2-ENV:Code>
<SOAP-1_2-ENV:Reason>
<SOAP-1_2-ENV:Text xml:lang="en-US">There was an error in the incoming SOAP request packet: Sender, ParsingError, InvalidSoapActionHeader</SOAP-1_2-ENV:Text>
</SOAP-1_2-ENV:Reason>
<SOAP-1_2-ENV:Node>https://10.199.5.116:444/dt2</SOAP-1_2-ENV:Node>
<SOAP-1_2-ENV:Role>http://schemas.microsoft.com/sqlserver/2004/SOAP</SOAP-1_2-ENV:Role>
<SOAP-1_2-ENV:Detail/>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Here is my SOAP Endpoint definition on the server:
CREATE ENDPOINT [DroidTest2]
AUTHORIZATION [cgtyoder]
STATE=STARTED
AS HTTP (PATH=N'/dt2', PORTS = (SSL), AUTHENTICATION = (BASIC), SITE=N'*', SSL_PORT = 444, COMPRESSION=DISABLED)
FOR SOAP (
WEBMETHOD 'DroidFunction'( NAME=N'[pubs].[dbo].[DroidFunction]'
, SCHEMA=DEFAULT
, FORMAT=ROWSETS_ONLY), LOGIN_TYPE=MIXED, BATCHES=DISABLED, WSDL=N'[master].[sys].[sp_http_generate_wsdl_defaultsimpleorcomplex]'
, SESSIONS=ENABLED, SESSION_TIMEOUT=600, DATABASE=N'pubs', NAMESPACE=N'http://tempuri.org/', SCHEMA=STANDARD
, CHARACTER_SET=XML)
GO
The UDF DroidFunction takes no arguments and returns a string (VarChar(30)). I am able to connect to https://10.199.5.116/dt2?wsdl and get the WSDL. Thanks for any pointers here.
See http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/7619d2e0-a5eb-4379-b027-234103e7f171 for my solution.

Resources