Skip to Content

Pass a SerializedSession to QAAWS

Using BO 3.1 SP3 .NET Web Services SDK. QAAWS has some optional headers called SessionID and SerializedSession. Using SOAPUI for testing, I can pass in a SessionID fine, and it works. But I read on a post that using SessionID will invoke a new logon. SerializedSession reuses the Session fully, and no new logon is invoked. I want this behavior because I will be calling many different web services in succession and it needs to be fast and not pile up logins. But when I pass a SerializedSession string, I get an error. I suspect some conversion issue. When doing manual serialization and deserialization of sessions, byte arrays are involved. But, the web service seems to want a string, not a byte array, and I just happen to have a nice property of a SessionInfo object called SerializedSession. Here is how I get it:

BusinessObjects.DSWS.Session.SessionInfo boSessionInfo = boSession.Login(boEnterpriseCredential);

Response.Write("BO Serialized Session = " + boSessionInfo.SerializedSession);

So, I pass that string into the <sear:serializedSession> tag. An actual value I have tried is:

3&35=WilsonSC,8P&63=secWinAD,8P&4F=13163,8P&4E=4175371Jgmt9U5GR8gX9qGF,8P&1,8P&3k=@chqpvuw8383.ldschurch.org:6400,8P&5U=4175372JYvag5PeQp6B4Qqd4175371Jgmt9U5GR8gX9qGF,8P&S5,88&pa,8P&Tm=3650,83&2r=chqpvuw8383.ldschurch.org:6400,8P&Tn={3&.2={3&O=PersonalCategory,8P&2=13165,83},?z&.1={3&O=FavoritesFolder,8P&2=13164,83},?z&.3={3&O=Inbox,8P&2=13166,83},?z&U=3,83},?z&PP=1024,83&7r,83

You can see that the actual value is a bunch of pairs.

The error I get is:

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd=" http://www.w3.org/2001/XMLSchema"> >

<faultcode>soap:Server.generalException</faultcode><faultstring>entity

reference names can not start with character '3' (position: START_TAG

seen ...<sear:serializedSession>3&3... @7:37) </faultstring><detail>

</detail></soap:Fault></soap:Body></soap:Envelope>

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 13, 2011 at 10:31 PM

    I did some testing on this awhile back, and I think I had to pass both session id and serialized session, I couldn't get it working with just serialized session. I don't remember which one it actually used to logon, so it may or may not increase the session count.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.