Anonymous_User Absent Member.
Absent Member.
314 views

SOAP Driver - Issue reading encoded response


Hi all,

I have problems trying to read the response from a webservice with an
IDM SOAP Driver . It seems that the response is encoded in base64. Next
are de log:

*REQUEST*>
> <soapenv:Envelope
> xmlns:prof="http://host.bs.com/common/webservice/ProfileManagement/"
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header/>
> <soapenv:Body>
> <prof:ImportProfilesRequest>
> <companyData>
> <company>
> <companyInfo>
> <vat>44-44444444-4</vat>
> </companyInfo>
> </company>
> <subUsers>
> <operationCode>009</operationCode>
> <subuser>
> <name>Santiago Raul</name>
> <surName>Benavidez Nicolini</surName>
> <email>SantiagoRaul.BenavidezNicolini@TEST.COM</email>
> <phoneNumber>+1152441688</phoneNumber>
> <mobilePhoneNumber>+1111111111</mobilePhoneNumber>
> <division>SSINFO</division>
> <businessUnit/>
> <rightsProfile>COMPRADOR</rightsProfile>
> <login>u559710</login>
> <language>en_GB</language>
> <timeZone>America/Buenos_Aires</timeZone>
> </subuser>
> </subUsers>
> </companyData>
> </prof:ImportProfilesRequest>
> </soapenv:Body>
> </soapenv:Envelope>


RESPONSE
> HTTPSubscriberTransport.send()
> Preparing HTTP POST connection to http://tinyurl.com/phe7gl2
> Setting up SSL connection..........
> Setting the following HTTP request properties:
> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
> SOAPAction: CreateUser
> Did HTTP POST with 823 bytes of data to http://tinyurl.com/qcnulk2
> Setting cookie: VISITORID=; Expires=Thu, 01-Jan-1970 00:00:10 GMT;
> Path=/; Secure
> Read the following malformed cookie. Continuing...
> VISITORID=; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure
> Response code and message: 200 OK
> The following bytes (which are base64 encoded) were received as a
> response to our request on the subscriber channel. They cannot be
> converted to XML:
> LS1NSU1FQm91bmRhcnl1cm5fdXVpZF80MUU3MTkxMUFDRkYxMUJGOTcxNDE1MjkyNDY3OTIwDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL3hvcCt4bWw7IGNoYXJzZXQ9VVRGLTg7IHR5cGU9InRleHQveG1sIg0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LUlEOiA8MC51cm46dXVpZDo0MUU3MTkxMUFDRkYxMUJGOTcxNDE1MjkyNDY3OTIxQGFwYWNoZS5vcmc+DQoNCjw/eG1sIHZlcnNpb249JzEuMCcgZW5jb2Rpbmc9J1VURi04Jz8+PHNvYXBlbnY6RW52ZWxvcGUgeG1sbnM6c29hcGVudj0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iPjxzb2FwZW52OkJvZHk+PG5zMTpJbXBvcnRQcm9maWxlc1Jlc3BvbnNlIHhtbG5zOm5zMT0iaHR0cDovL2hvc3QuYnMuY29tL2NvbW1vbi93ZWJzZXJ2aWNlL1Byb2ZpbGVNYW5hZ2VtZW50LyI+PHJldHVybkNvZGU+IFNVQlVTRVI6IDI7PC9yZXR1cm5Db2RlPjxyZXR1cm5NZXNzYWdlPiBTVUJVU0VSOiAoQmVuYXZpZGV6IE5pY29saW5pOiAyKTs7PC9yZXR1cm5NZXNzYWdlPjxicmF2b0lkPjI4MTwvYnJhdm9JZD48L25zMTpJbXBvcnRQcm9maWxlc1Jlc3BvbnNlPjwvc29hcGVudjpCb2R5Pjwvc29hcGVudjpFbnZlbG9wZT4NCi0tTUlNRUJvdW5kYXJ5dXJuX3V1aWRfNDFFNzE5MTFBQ0ZGMTFCRjk3MTQxNTI5MjQ2NzkyMC0t



Here's my question: there is some option in the driver configuration
that can i use to gather the response decoded? I understand that another
solution is to use java to decode the message, but i prefer to keep the
driver simple.

Im running IDM 4.0.2 in a linux environment.

Thanks in advance!

Mariano


--
mariano_marino
------------------------------------------------------------------------
mariano_marino's Profile: https://forums.netiq.com/member.php?userid=4057
View this thread: https://forums.netiq.com/showthread.php?t=52288

Labels (1)
0 Likes
4 Replies
Anonymous_User Absent Member.
Absent Member.

Re: SOAP Driver - Issue reading encoded response

The output is not pure XML, which is my guess at why the system cannot
convert it to XML:


--MIMEBoundaryurn_uuid_41E71911ACFF11BF971415292467920
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:41E71911ACFF11BF971415292467921@apache.org>

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns1:ImportProfilesResponse
xmlns:ns1="http://host.bs.com/common/webservice/ProfileManagement/"><returnCode>
SUBUSER: 2;</returnCode><returnMessage> SUBUSER: (Benavidez Nicolini:
2);;</returnMessage><bravoId>281</bravoId></ns1:ImportProfilesResponse></soapenv:Body></soapenv:Envelope>
--MIMEBoundaryurn_uuid_41E71911ACFF11BF971415292467920--


That first section, and the last line, are all nice HTTP data, but I do
not know that the SOAP shim handles the extra bits. You can put a
ByteArrayModifier in there, I think, to do early conversion if necessary,
but it'd be best of the application would just return XML.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: SOAP Driver - Issue reading encoded response


Hi ab, I'm giving Mariano a hand with this issue.

After looking at the SOAP driver's documentation i found the extension
api's documentation but i was not able to find the code examples as
described in http://tinyurl.com/ob9bxa5.

¿Where could i find some source code examples on how to implement the
ByteArrayModifier interface in a custom class?

Best Regards.
Emmanuel


--
EPedros
------------------------------------------------------------------------
EPedros's Profile: https://forums.netiq.com/member.php?userid=5531
View this thread: https://forums.netiq.com/showthread.php?t=52288

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: SOAP Driver - Issue reading encoded response

I'm not sure if you've seen this, so here you go:



On 11/28/2014 04:04 PM, EPedros wrote:
>
> Hi ab, I'm giving Mariano a hand with this issue.
>
> After looking at the SOAP driver's documentation i found the extension
> api's documentation but i was not able to find the code examples as
> described in http://tinyurl.com/ob9bxa5.
>
> �Where could i find some source code examples on how to implement the
> ByteArrayModifier interface in a custom class?
>
> Best Regards.
> Emmanuel
>
>


--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: SOAP Driver - Issue reading encoded response

I'm not sure if you've seen this, so here you go:

http://www.novell.com/documentation/dirxmldrivers/javadoc/api/com/novell/nds/dirxml/driver/soap/util/ByteArrayModifiers.html

What you do from here is up to you. If you an get a decent sample of
possible responses from your web service then you should be able to write
a simple Java class (if this is not obvious then you may want to hire
somebody to handle that) to accept the byte array and find the bits (pun
intended) that are not desired, basically leaving only the XML to be returned.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.