Skip to Content
0
Dec 13, 2011 at 07:23 PM

Pass a SerializedSession to QAAWS

61 Views

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>