[Midpoint-dev] midPoint3 web service c#
Paul Heaney
lists at pheaney.co.uk
Tue May 27 14:34:19 CEST 2014
Hi,
I'm trying to get the midPoint3 SOAP web services to work with C# so i
can update the AD password filter, though I've run into a problem when
attempting to work with the model-client-sample-dotnet (all of this
tetsing is being done with the latest git).
Within the model sample I've updated the main method to (following
changes in the API), previously the objectType was of type string though
its now XmlQualifiedName
getObject getObject = new getObject();
getObject.objectType = new XmlQualifiedName(NS_C + "#UserType");;
getObject.options = new SelectorQualifiedGetOptionType[0];
getObject.oid = ADMINISTRATOR_OID;
UserType obj = (UserType)modelPort.getObject(getObject). at object;
The outgoing SOAP response is:
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><wsse:Security
s:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken
wsu:Id="UsernameToken-1"><wsse:Username>administrator</wsse:Username><wsse:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">IV9dhdsBBjdYKi4gM6xVkdDEPTw=</wsse:Password><wsse:Nonce
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">KYlaNPS+V7NvMGcSY8Hg8khd3EWgbqwIG2hchjcgl6eHtO+OK0Edn+REbyAOVEX5pht2XizgU1guSVYg1UuXKg==</wsse:Nonce><wsu:Created>2014-05-27T12:19:22.1922+01:00</wsu:Created></wsse:UsernameToken></wsse:Security></s:Header><s:Body
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><getObject
xmlns="http://midpoint.evolveum.com/xml/ns/public/model/model-3">
<objectType
xmlns="">http_x003A__x002F__x002F_midpoint.evolveum.com_x002F_xml_x002F_ns_x002F_public_x002F_common_x002F_common-3_x0023_UserType</objectType>
<oid xmlns="">00000000-0000-0000-0000-000000000002</oid><options
xmlns=""/></getObject></s:Body></s:Envelope>
Where the objectType is being encoded which midPoint doesn't like
throwing the following error:
Unsupported object type qname
{http://midpoint.evolveum.com/xml/ns/public/common/common-3}http_x003A__x002F__x002F_midpoint.evolveum.com_x002F_xml_x002F_ns_x002F_public_x002F_common_x002F_common-3_x0023_UserType</faultstring><detail><ns17:fault
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns9="http://midpoint.evolveum.com/xml/ns/model/workflow/process-instance-state-3"
xmlns:ns8="http://midpoint.evolveum.com/xml/ns/model/workflow/common-forms-3"
xmlns:ns7="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:ns6="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:ns5="http://midpoint.evolveum.com/xml/ns/public/model/model-3"
xmlns:ns4="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3" xmlns:ns3="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:ns2="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ns17="http://midpoint.evolveum.com/xml/ns/public/common/fault-3"
xmlns:ns16="http://prism.evolveum.com/xml/ns/public/annotation-3"
xmlns:ns15="http://prism.evolveum.com/xml/ns/public/types-3a"
xmlns:ns14="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3"
xmlns:ns13="http://www.w3.org/2000/09/xmldsig#"
xmlns:ns12="http://www.w3.org/2001/04/xmlenc#"
xmlns:ns11="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3"
xmlns:ns10="http://midpoint.evolveum.com/xml/ns/public/model/scripting-3" xsi:type="ns17:IllegalArgumentFaultType"><message>Unsupported
object type qname
{http://midpoint.evolveum.com/xml/ns/public/common/common-3}http_x003A__x002F__x002F_midpoint.evolveum.com_x002F_xml_x002F_ns_x002F_public_x002F_common_x002F_common-3_x0023_UserType</message><operationResult><ns6:operation>com.evolveum.midpoint.xml.ns._public.model.model_3.ModelPortType.getObject</ns6:operation><ns6:status>fatal_error</ns6:status><ns6:token>1000000000000000118</ns6:token><ns6:message>Unsupported
object type qname
{http://midpoint.evolveum.com/xml/ns/public/common/common-3}http_x003A__x002F__x002F_midpoint.evolveum.com_x002F_xml_x002F_ns_x002F_public_x002F_common_x002F_common-3_x0023_UserType</ns6:message><ns6:details>java.lang.IllegalArgumentException:
Unsupported object type qname
{http://midpoint.evolveum.com/xml/ns/public/common/common-3}http_x003A__x002F__x002F_midpoint.evolveum.com_x002F_xml_x002F_ns_x002F_public_x002F_common_x002F_common-3_x0023_UserType
com.evolveum.midpoint.schema.constants.ObjectTypes.getObjectTypeFromTypeQName(ObjectTypes.java:176)
com.evolveum.midpoint.model.impl.ModelWebService.getObject(ModelWebService.java:141)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Does anyknow know how to either force c# from not encoding the attribute
or for midPoint to accept this?
Also I've noticed there is one reference to the namespace
http://prism.evolveum.com/xml/ns/public/types-3a should this be types-3
? This is in
infra/prism/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/ObjectFactory.jav
Cheers
Paul
More information about the midPoint-dev
mailing list