Checkbox Forums

Register | Help
Results 1 to 6 of 6
  1. #1
    b-707 Guest

    Default CreateUser from non .Net platforms

    Hello all.
    Our OS is Unix-like and the platform is Progress (ABL). Thus our web services calls are more complicated. The prototype of our application is ASP.Net based and all of the WS functionality we need works as expected. Now we "translate" the prototype to Progress.

    In our case CreateUser has the following input parameters:
    guid, userIdentificator, password, profile, updateIfExists

    The profile parameter should represent syntax of xml document (or a fragment of it, I am not sure).
    Anyway - in my case it looks like:

    <SimpleNameValueOfObjectObject>
    <Name>Email</Name>
    <Value>some@email.test.com</Value>
    </SimpleNameValueOfObjectObject>
    <SimpleNameValueOfObjectObject>
    <Name>FirstName</Name>
    <Value>Alex</Value>
    </SimpleNameValueOfObjectObject>
    <SimpleNameValueOfObjectObject>
    <Name>LastName</Name>
    <Value>Sander</Value>
    </SimpleNameValueOfObjectObject>


    The routine creates user, sets password, but doesn't set the values for Email and for custom fields FirstName and LastName. The routine returns name of the user, and doesn't seem to throw any error to the log. I tried to "wrap" this syntax with the <profile>, but it doesn't work either.
    Do you, guys, have any idea what's wrong? I'll appreciate your fit back very much.

    P.S. May be I just didn't read the schema correct?

  2. #2
    b-707 Guest

    Default

    My schema is correct. I captured the request with Fiddler2, compared the xml fragment I sent as a parameter from UNIX-like machine. Still doesn't work...

  3. #3
    b-707 Guest

    Default

    I have more:
    The server responded:

    [11/03/24@11:10:57.790-0500] P-019463 T-000001 1 WS -- (Procedure: ->\'CreateUser_WS CBWS' Line:66) Web service operation CreateUser generated a ->\SOAP Fault. SOAP faultstring is: Server was unable to process request. ---> ->\An attempt was made to update a profile with invalid properties. The ->\following properties System.Xml.XmlNode[], do not exist in your Checkbox ->\installation. (11506)

  4. #4
    b-707 Guest

    Default

    Now I sent the following as the profile parameter:

    '<ns0rofile xmlns:ns0="http://prezzatech.com/Checkbox/Services"><ns0:SimpleNameValueOfObjectObject><ns0: Name>Email</ns0:Name><ns0:Value>testemail@federated.test.ca</ns0:Value></ns0:SimpleNameValueOfObjectObject></ns0rofile>'

    And this is what I am getting back:
    (Procedure: ->\'CreateUser_WS CBWS' Line:66) Web service operation CreateUser generated a ->\SOAP Fault. SOAP faultstring is: Server was unable to process request. ---> ->\An attempt was made to update a profile with invalid properties. The ->\following properties System.Xml.XmlNode[], do not exist in your Checkbox ->\installation.

    What's wrong???

    This smile: is just a combination of ns0 : and small "p" :-)
    Last edited by b-707; 03-24-2011 at 11:30 AM.

  5. #5
    ncushing is offline Administrator
    Join Date
    Mar 2007
    Location
    Prezza Technologies
    Posts
    225

    Default

    To handle web services, we're using built-in .NET framework stuff to automatically handle decoding the messages. Another customer using non-.NET clients had a similar issue, including the same error message, where the WSDL generated by the .NET component didn't quite match what the service actually was expecting. The issue was the handling of namespace elements.

    The example below shows the XML expected for the UpdateUserProfile service. The issue the previous customer encountered was that xsi:type attributes were missing from the Name and Value elements.

    Try adding these attributes to see if that helps things.

    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="http://prezzatech.com/Checkbox/Services"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema">;
    <SOAP-ENV:Body>
    <ns1:UpdateUserProfile>
    <ns1:contextToken>[TOKEN_REDACTED]</ns1:contextToken>
    <ns1:userIdentity>[IDENTITY_REDACTED]</ns1:userIdentity>
    <ns1rofile>
    <ns1:SimpleNameValueOfObjectObject>
    <ns1:Name xsi:type="xsd:string">Email</ns1:Name>
    <ns1:Value xsi:type="xsd:string">ddd@aaa.com</ns1:Value>
    </ns1:SimpleNameValueOfObjectObject>
    </ns1rofile>
    </ns1:UpdateUserProfile>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>


    Since the XML serialization and deserialization is handled by .NET, it's tough for us to change this behavior. In Checkbox 5.0, we'll have better options for non .NET develoepers as all of our web services will support JSON or plain old XML in addition to SOAP.
    banned

  6. #6
    b-707 Guest

    Default

    Thanks, this works. The only think I had to add was:
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    and
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    to the root element of the fragment, which is in our case the "<profile>".
    Again, thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.5.0