Hi,

Sorry, I think I may have not explained too well!
I know how to get it on the server site (ie inside the web service)..

However, in my client app, I need to extract it there. I create a
"CreationRequest" emssage and return it...and a resource ID is returned.

But I need to extract the resource ID from the returned ResponseDocument.

I hope I am clear here!

Thanks
SHahzad 

-----Original Message-----
From: Stefan Lischke [mailto:[EMAIL PROTECTED] 
Sent: 22 March 2005 13:10
To: [email protected]
Subject: Re: extracting the resource ID

Hi Shahzad,

There are many way to do this.

The first one:

In your service Methode, just call:

Resource rs = getResource();
Object id = rs.getID();

the second one,
In your service Methode, just call:
ResourceKey rk =getResourceKey()
Object id = rk.getValue().

But remember you Service must extend the AbstractPortType, or one of the
classes that extends AbstractPortType

hope that helps

stefan

Shahzad Younas wrote:

> Hi,
>  
> I am trying to (on the client side) extract the resource ID from a 
> soap body of an incoming message.
>  
> byte[] tmp = senv.getBody().getFirstChild().toString().getBytes();
>    ByteArrayInputStream byteInput = new ByteArrayInputStream (tmp);
>    CreateShibbolethBrowserSessionResponseDocument responseDoc = 
> CreateShibbolethBrowserSessionResponseDocument.Factory.parse(byteInput);
>    log.info("ID:" +
> responseDoc.getCreateShibbolethBrowserSessionResponse().getShibbolethB
> rowserSessionReference().getReferenceProperties());
>    
>  
> However, this prints out:
>  
> ID:<xml-fragment
> xmlns:shib="http://ShibbolethBrowserSession/ShibbolethBrowserSession.xsd"; 
> xmlns:add="http://schemas.xmlsoap.org/ws/2004/08/addressing"; 
>
xmlns:shib1="http://ShibbolethBrowserSession/ShibbolethBrowserSession.wsdl";>
>   
> <shib1:ResourceID>ShibbolethBrowserSessionResource1</shib1:ResourceID>
> </xml-fragment>
>  
> How can I JUST extract the "ResourceID" ? I cant seem to see any "get" 
> methods for going this.
>  
> Thank you
> Shahzad



--
My place : http://user.cs.tu-berlin.de/~lischke


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to