You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Ron Reynolds <Ro...@RonReynolds.com> on 2005/11/30 16:29:39 UTC

Just can't figure out the C# client...

i know this isn't a Java question - the Java client was easy.  i'm now tasked
with creating a .NET client (C# being the most java-like language in the .NET
family it made sense to try C#).  i know very little of C# - i wrote my first
line of it on Sunday.  i've got the proxy generated, i've created my
UsernameToken, i got everything up to the "missing security" error from my
WSS4J server, but i can't figure out 2 things:
1. how to put actor values on my UsernameToken element and MessageSignature
element
and
2. how to use the keystore file to create an X.509 certificate for signing.

if anyone out there has code to show how they loaded an X.509 with private key
from a keystore it would be so much appreciated.  the actor bit i think i can
figure out (i hope) but the keystore problem has me completely stumped.

please.
thanks.
................ron.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: Just can't figure out the C# client...

Posted by Richard Gregory <ri...@gsf.de>.
Hi Ron,

I developed a little C# app a while ago to test interoperability with 
my  java axis services (my only .NET experience has been developing apps 
to test interoperability, so please don't think I'm an expert). I 
generated a keystore with Keytool with a private key, and imported it 
into my Windows certificate store, and accessed it from there with my C# 
code.

*using* System;
*using* Microsoft.Web.Services2;
*using* Microsoft.Web.Services2.Security;
*using* Microsoft.Web.Services2.Security.Tokens;
*using* Microsoft.Web.Services2.Security.X509;
*using* System.Security.Cryptography;


*namespace* WSS4JTest
{
	//// /*<summary>*
	//// Summary description for Class1./
	//// /*</summary>*
	*class* Class1
	{
		//// /*<summary>*
		//// The main entry point for the application./
		//// /*</summary>*
		[STAThread]
		*static* void Main(string[] args)
		{
			*try* 
			{
				X509SecurityToken token = *null*;
				
				/// Open the CurrentUser Certificate Store/
				X509CertificateStore store = X509CertificateStore.CurrentUserStore("Personal");
				store.OpenRead();

				String base64KeyId = "tDkZ1MhZcRqw3mK7MjK/bNab1Sc=";

				Microsoft.Web.Services2.Security.X509.X509CertificateCollection col = 
					(Microsoft.Web.Services2.Security.X509.X509CertificateCollection)store.FindCertificateByKeyIdentifier(Convert.FromBase64String(base64KeyId));
				
				Console.WriteLine(col.Count);

				X509Certificate clientCert = *null*;

				*try* 
				{
					clientCert =col[0];
					token = *new* X509SecurityToken( ((X509Certificate) col[0]) );
					
				}
				*catch* (Exception ex) 
				{
					*throw* *new* Exception("Certificate not found. Certificate count:" + col.Count);
				}

				

				UsernameToken userToken = *new* UsernameToken("wss4j", "security", PasswordOption.SendPlainText);

				BiorsAdvRef.BiorsAdvancedQueryDocStyleService ws = *new* WSS4JTest.BiorsAdvRef.BiorsAdvancedQueryDocStyleService();
			
				SoapContext requestContext = ws.RequestSoapContext;
				///requestContext.Security.Tokens.Add(userToken);/

				ISecurityTokenManager stm = SecurityTokenManager.GetSecurityTokenManagerByTokenType(WSTrust.TokenTypes.X509v3);
				
				X509SecurityTokenManager x509tm = stm *as* X509SecurityTokenManager; 
				x509tm.DefaultSessionKeyAlgorithm = "TripleDES";
				
				requestContext.Security.Elements.Add( *new* EncryptedData(token));

				///requestContext.Security.Tokens.Add(token);/
				///MessageSignature sig = new MessageSignature(token);/
				///requestContext.Security.Elements.Add(sig);		/

				BiorsAdvRef.formatType ft = *new* WSS4JTest.BiorsAdvRef.formatType();
				ft = BiorsAdvRef.formatType.ELEMENTS;

				String user = "ibi";
				String password = "mips";
				String query = "{swissprot, trembl}: [[AllText EQ text:lys4;]]";
				String[] requiredElements = {"_ID_", "AccNumber"};

				BiorsAdvRef.result res = *new* WSS4JTest.BiorsAdvRef.result();

				
				*do*  
				{
					res = ws.getBiorsEntry(user, password, query, ft, requiredElements);

					*if* (res.ItemElementName.Equals(BiorsAdvRef.ItemChoiceType.returnedElements)) 
					{
						Console.WriteLine( "Result " + res.resultNumber + " of " + res.totalResults + " from " + res.databank + " elements: ");
					
						BiorsAdvRef.returnedElementsType elems = (BiorsAdvRef.returnedElementsType)res.Item;
						BiorsAdvRef.elementType[] elements = elems.element;
						*foreach* (BiorsAdvRef.elementType element *in* elements) 
						{
							Console.WriteLine( element.elementName + " : " + element.elementContent);
						}
					}
					*else* *if* (res.ItemElementName.Equals(BiorsAdvRef.ItemChoiceType.noMatchesMessage))
				 
						Console.WriteLine(res.Item);
				 
					*else*
						Console.WriteLine(res.resultNumber + " of " + res.totalResults + " from " + res.databank + " is... " + res.Item);

				

				} *while* (res.resultNumber < res.totalResults);
				
			}
			*catch* (System.Web.Services.Protocols.SoapException se)
			{
				Console.WriteLine(se.ToString());
			}
			Console.Read();
		}
	}
}


I had to make some changes to the Reference.cs proxy classes generated 
by visual studio. It is below, and here is a link to some info explaning 
the changes you need to make.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/c1a7c69c-8ae8-40d9-a3fb-659f1dbd01a1.asp

///------------------------------------------------------------------------------/
/// <autogenerated>/
///     This code was generated by a tool./
///     Runtime Version: 1.1.4322.2032/
////
///     Changes to this file may cause incorrect behavior and will be lost if /
///     the code is regenerated./
/// </autogenerated>/
///------------------------------------------------------------------------------/

/// /
/// This source code was auto-generated by Microsoft.VSDesigner, Version 1.1.4322.2032./
/// /
*namespace* WSS4JTest.BiorsAdvRef {

	*using* System.Diagnostics;
	*using* System.Xml.Serialization;
	*using* System;
	*using* System.Web.Services.Protocols;
	*using* System.ComponentModel;
	*using* System.Web.Services;
    
    
	//// /*<remarks/>*
	[System.Diagnostics.DebuggerStepThroughAttribute()]
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	[System.Web.Services.WebServiceBindingAttribute(Name="BiorsAdvancedQuerySOAPBinding", Namespace="urn:wsdl.advancedquery.docstyle.ws.biors.biomax.de")]
	*public* *class* BiorsAdvancedQueryDocStyleService : Microsoft.Web.Services2.WebServicesClientProtocol
	{
        
		*public* sessID sessionID;

		//// /*<remarks/>*
		*public* BiorsAdvancedQueryDocStyleService() 
		{
			*this*.Url = "http://146.107.217.111:8081/axis/services/BiorsAdvancedQueryDocStyleSecure";
		}
        
		//// /*<remarks/>*
		[System.Web.Services.Protocols.SoapHeaderAttribute("sessionID", Direction=System.Web.Services.Protocols.SoapHeaderDirection.InOut)]
		[System.Web.Services.Protocols.SoapDocumentMethodAttribute("getBiorsEntry", RequestNamespace="urn:advancedquery.docstyle.ws.biors.biomax.de", ResponseNamespace="urn:advancedquery.docstyle.ws.biors.biomax.de", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
		[*return*: System.Xml.Serialization.XmlElementAttribute("result", IsNullable=*true*)]
		*public* result getBiorsEntry([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=*true*)] string username, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=*true*)] string password, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string queryString, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] formatType returnFormat, [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] [System.Xml.Serialization.XmlArrayItemAttribute("elementName", *typeof*(string), Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=*false*)] string[] requiredElements) 
		{
			object[] results = *this*.Invoke("getBiorsEntry", *new* object[] {
																			 username,
																			 password,
																			 queryString,
																			 returnFormat,
																			 requiredElements});
			*return* ((result)(results[0]));
		}
        
		//// /*<remarks/>*
		*public* System.IAsyncResult BegingetBiorsEntry(string username, string password, string queryString, formatType returnFormat, string[] requiredElements, System.AsyncCallback callback, object asyncState) 
		{
			*return* *this*.BeginInvoke("getBiorsEntry", *new* object[] {
																	  username,
																	  password,
																	  queryString,
																	  returnFormat,
																	  requiredElements}, callback, asyncState);
		}
        
		//// /*<remarks/>*
		*public* result EndgetBiorsEntry(System.IAsyncResult asyncResult) 
		{
			object[] results = *this*.EndInvoke(asyncResult);
			*return* ((result)(results[0]));
		}
	}

	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://xml.apache.org/axis/session")]
	[System.Xml.Serialization.XmlRootAttribute("sessionID", Namespace="http://xml.apache.org/axis/session", IsNullable=*false*)]
	*public* *class* sessID : System.Web.Services.Protocols.SoapHeader 
	{
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlTextAttribute()]
		*public* string[] Text;
	}
    
	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:advancedquery.docstyle.ws.biors.biomax.de")]
	*public* *enum* formatType 
	{
        
		//// /*<remarks/>*
		FASTA,
        
		//// /*<remarks/>*
		ENTRY,
        
		//// /*<remarks/>*
		XML_ENTRY,
        
		//// /*<remarks/>*
		XML_ELEMENTS,
        
		//// /*<remarks/>*
		ELEMENTS,
	}
    
	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:advancedquery.docstyle.ws.biors.biomax.de")]
	*public* *class* result 
	{
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* int resultNumber;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlIgnoreAttribute()]
		*public* bool resultNumberSpecified;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* int totalResults;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* string databank;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute("returnedElements", *typeof*(returnedElementsType), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		[System.Xml.Serialization.XmlElementAttribute("entry", *typeof*(string), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		[System.Xml.Serialization.XmlElementAttribute("noMatchesMessage", *typeof*(string), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		[System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemElementName")]
		*public* object Item;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlIgnoreAttribute()]
		*public* ItemChoiceType ItemElementName;
	}
    
	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:advancedquery.docstyle.ws.biors.biomax.de")]
	*public* *class* elementType 
	{
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* string elementName;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* string elementContent;
	}

	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:advancedquery.docstyle.ws.biors.biomax.de")]
	*public* *class* returnedElementsType 
	{
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* elementType[] element;
	}
    
	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:advancedquery.docstyle.ws.biors.biomax.de", IncludeInSchema=*false*)]
	*public* *enum* ItemChoiceType 
	{
        
		//// /*<remarks/>*
		returnedElements,
        
		//// /*<remarks/>*
		entry,
        
		//// /*<remarks/>*
		noMatchesMessage,
	}
}

Hope this helps. If you have any more questions I'll do my best to 
answer them.

Richard.

Ron Reynolds wrote:

>i know this isn't a Java question - the Java client was easy.  i'm now tasked
>with creating a .NET client (C# being the most java-like language in the .NET
>family it made sense to try C#).  i know very little of C# - i wrote my first
>line of it on Sunday.  i've got the proxy generated, i've created my
>UsernameToken, i got everything up to the "missing security" error from my
>WSS4J server, but i can't figure out 2 things:
>1. how to put actor values on my UsernameToken element and MessageSignature
>element
>and
>2. how to use the keystore file to create an X.509 certificate for signing.
>
>if anyone out there has code to show how they loaded an X.509 with private key
>from a keystore it would be so much appreciated.  the actor bit i think i can
>figure out (i hope) but the keystore problem has me completely stumped.
>
>please.
>thanks.
>................ron.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: Just can't figure out the C# client...

Posted by Richard Gregory <ri...@gsf.de>.
Hi Ron,

I developed a little C# app a while ago to test interoperability with 
my  java axis services (my only .NET experience has been developing apps 
to test interoperability, so please don't think I'm an expert). I 
generated a keystore with Keytool with a private key, and imported it 
into my Windows certificate store, and accessed it from there with my C# 
code.

*using* System;
*using* Microsoft.Web.Services2;
*using* Microsoft.Web.Services2.Security;
*using* Microsoft.Web.Services2.Security.Tokens;
*using* Microsoft.Web.Services2.Security.X509;
*using* System.Security.Cryptography;


*namespace* WSS4JTest
{
	//// /*<summary>*
	//// Summary description for Class1./
	//// /*</summary>*
	*class* Class1
	{
		//// /*<summary>*
		//// The main entry point for the application./
		//// /*</summary>*
		[STAThread]
		*static* void Main(string[] args)
		{
			*try* 
			{
				X509SecurityToken token = *null*;
				
				/// Open the CurrentUser Certificate Store/
				X509CertificateStore store = X509CertificateStore.CurrentUserStore("Personal");
				store.OpenRead();

				String base64KeyId = "tDkZ1MhZcRqw3mK7MjK/bNab1Sc=";

				Microsoft.Web.Services2.Security.X509.X509CertificateCollection col = 
					(Microsoft.Web.Services2.Security.X509.X509CertificateCollection)store.FindCertificateByKeyIdentifier(Convert.FromBase64String(base64KeyId));
				
				Console.WriteLine(col.Count);

				X509Certificate clientCert = *null*;

				*try* 
				{
					clientCert =col[0];
					token = *new* X509SecurityToken( ((X509Certificate) col[0]) );
					
				}
				*catch* (Exception ex) 
				{
					*throw* *new* Exception("Certificate not found. Certificate count:" + col.Count);
				}

				

				UsernameToken userToken = *new* UsernameToken("wss4j", "security", PasswordOption.SendPlainText);

				BiorsAdvRef.BiorsAdvancedQueryDocStyleService ws = *new* WSS4JTest.BiorsAdvRef.BiorsAdvancedQueryDocStyleService();
			
				SoapContext requestContext = ws.RequestSoapContext;
				///requestContext.Security.Tokens.Add(userToken);/

				ISecurityTokenManager stm = SecurityTokenManager.GetSecurityTokenManagerByTokenType(WSTrust.TokenTypes.X509v3);
				
				X509SecurityTokenManager x509tm = stm *as* X509SecurityTokenManager; 
				x509tm.DefaultSessionKeyAlgorithm = "TripleDES";
				
				requestContext.Security.Elements.Add( *new* EncryptedData(token));

				///requestContext.Security.Tokens.Add(token);/
				///MessageSignature sig = new MessageSignature(token);/
				///requestContext.Security.Elements.Add(sig);		/

				BiorsAdvRef.formatType ft = *new* WSS4JTest.BiorsAdvRef.formatType();
				ft = BiorsAdvRef.formatType.ELEMENTS;

				String user = "ibi";
				String password = "mips";
				String query = "{swissprot, trembl}: [[AllText EQ text:lys4;]]";
				String[] requiredElements = {"_ID_", "AccNumber"};

				BiorsAdvRef.result res = *new* WSS4JTest.BiorsAdvRef.result();

				
				*do*  
				{
					res = ws.getBiorsEntry(user, password, query, ft, requiredElements);

					*if* (res.ItemElementName.Equals(BiorsAdvRef.ItemChoiceType.returnedElements)) 
					{
						Console.WriteLine( "Result " + res.resultNumber + " of " + res.totalResults + " from " + res.databank + " elements: ");
					
						BiorsAdvRef.returnedElementsType elems = (BiorsAdvRef.returnedElementsType)res.Item;
						BiorsAdvRef.elementType[] elements = elems.element;
						*foreach* (BiorsAdvRef.elementType element *in* elements) 
						{
							Console.WriteLine( element.elementName + " : " + element.elementContent);
						}
					}
					*else* *if* (res.ItemElementName.Equals(BiorsAdvRef.ItemChoiceType.noMatchesMessage))
				 
						Console.WriteLine(res.Item);
				 
					*else*
						Console.WriteLine(res.resultNumber + " of " + res.totalResults + " from " + res.databank + " is... " + res.Item);

				

				} *while* (res.resultNumber < res.totalResults);
				
			}
			*catch* (System.Web.Services.Protocols.SoapException se)
			{
				Console.WriteLine(se.ToString());
			}
			Console.Read();
		}
	}
}


I had to make some changes to the Reference.cs proxy classes generated 
by visual studio. It is below, and here is a link to some info explaning 
the changes you need to make.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/c1a7c69c-8ae8-40d9-a3fb-659f1dbd01a1.asp

///------------------------------------------------------------------------------/
/// <autogenerated>/
///     This code was generated by a tool./
///     Runtime Version: 1.1.4322.2032/
////
///     Changes to this file may cause incorrect behavior and will be lost if /
///     the code is regenerated./
/// </autogenerated>/
///------------------------------------------------------------------------------/

/// /
/// This source code was auto-generated by Microsoft.VSDesigner, Version 1.1.4322.2032./
/// /
*namespace* WSS4JTest.BiorsAdvRef {

	*using* System.Diagnostics;
	*using* System.Xml.Serialization;
	*using* System;
	*using* System.Web.Services.Protocols;
	*using* System.ComponentModel;
	*using* System.Web.Services;
    
    
	//// /*<remarks/>*
	[System.Diagnostics.DebuggerStepThroughAttribute()]
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	[System.Web.Services.WebServiceBindingAttribute(Name="BiorsAdvancedQuerySOAPBinding", Namespace="urn:wsdl.advancedquery.docstyle.ws.biors.biomax.de")]
	*public* *class* BiorsAdvancedQueryDocStyleService : Microsoft.Web.Services2.WebServicesClientProtocol
	{
        
		*public* sessID sessionID;

		//// /*<remarks/>*
		*public* BiorsAdvancedQueryDocStyleService() 
		{
			*this*.Url = "http://146.107.217.111:8081/axis/services/BiorsAdvancedQueryDocStyleSecure";
		}
        
		//// /*<remarks/>*
		[System.Web.Services.Protocols.SoapHeaderAttribute("sessionID", Direction=System.Web.Services.Protocols.SoapHeaderDirection.InOut)]
		[System.Web.Services.Protocols.SoapDocumentMethodAttribute("getBiorsEntry", RequestNamespace="urn:advancedquery.docstyle.ws.biors.biomax.de", ResponseNamespace="urn:advancedquery.docstyle.ws.biors.biomax.de", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
		[*return*: System.Xml.Serialization.XmlElementAttribute("result", IsNullable=*true*)]
		*public* result getBiorsEntry([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=*true*)] string username, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=*true*)] string password, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string queryString, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] formatType returnFormat, [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] [System.Xml.Serialization.XmlArrayItemAttribute("elementName", *typeof*(string), Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=*false*)] string[] requiredElements) 
		{
			object[] results = *this*.Invoke("getBiorsEntry", *new* object[] {
																			 username,
																			 password,
																			 queryString,
																			 returnFormat,
																			 requiredElements});
			*return* ((result)(results[0]));
		}
        
		//// /*<remarks/>*
		*public* System.IAsyncResult BegingetBiorsEntry(string username, string password, string queryString, formatType returnFormat, string[] requiredElements, System.AsyncCallback callback, object asyncState) 
		{
			*return* *this*.BeginInvoke("getBiorsEntry", *new* object[] {
																	  username,
																	  password,
																	  queryString,
																	  returnFormat,
																	  requiredElements}, callback, asyncState);
		}
        
		//// /*<remarks/>*
		*public* result EndgetBiorsEntry(System.IAsyncResult asyncResult) 
		{
			object[] results = *this*.EndInvoke(asyncResult);
			*return* ((result)(results[0]));
		}
	}

	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://xml.apache.org/axis/session")]
	[System.Xml.Serialization.XmlRootAttribute("sessionID", Namespace="http://xml.apache.org/axis/session", IsNullable=*false*)]
	*public* *class* sessID : System.Web.Services.Protocols.SoapHeader 
	{
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlTextAttribute()]
		*public* string[] Text;
	}
    
	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:advancedquery.docstyle.ws.biors.biomax.de")]
	*public* *enum* formatType 
	{
        
		//// /*<remarks/>*
		FASTA,
        
		//// /*<remarks/>*
		ENTRY,
        
		//// /*<remarks/>*
		XML_ENTRY,
        
		//// /*<remarks/>*
		XML_ELEMENTS,
        
		//// /*<remarks/>*
		ELEMENTS,
	}
    
	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:advancedquery.docstyle.ws.biors.biomax.de")]
	*public* *class* result 
	{
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* int resultNumber;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlIgnoreAttribute()]
		*public* bool resultNumberSpecified;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* int totalResults;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* string databank;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute("returnedElements", *typeof*(returnedElementsType), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		[System.Xml.Serialization.XmlElementAttribute("entry", *typeof*(string), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		[System.Xml.Serialization.XmlElementAttribute("noMatchesMessage", *typeof*(string), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		[System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemElementName")]
		*public* object Item;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlIgnoreAttribute()]
		*public* ItemChoiceType ItemElementName;
	}
    
	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:advancedquery.docstyle.ws.biors.biomax.de")]
	*public* *class* elementType 
	{
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* string elementName;
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* string elementContent;
	}

	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:advancedquery.docstyle.ws.biors.biomax.de")]
	*public* *class* returnedElementsType 
	{
        
		//// /*<remarks/>*
		[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
		*public* elementType[] element;
	}
    
	//// /*<remarks/>*
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:advancedquery.docstyle.ws.biors.biomax.de", IncludeInSchema=*false*)]
	*public* *enum* ItemChoiceType 
	{
        
		//// /*<remarks/>*
		returnedElements,
        
		//// /*<remarks/>*
		entry,
        
		//// /*<remarks/>*
		noMatchesMessage,
	}
}

Hope this helps. If you have any more questions I'll do my best to 
answer them.

Richard.

Ron Reynolds wrote:

>i know this isn't a Java question - the Java client was easy.  i'm now tasked
>with creating a .NET client (C# being the most java-like language in the .NET
>family it made sense to try C#).  i know very little of C# - i wrote my first
>line of it on Sunday.  i've got the proxy generated, i've created my
>UsernameToken, i got everything up to the "missing security" error from my
>WSS4J server, but i can't figure out 2 things:
>1. how to put actor values on my UsernameToken element and MessageSignature
>element
>and
>2. how to use the keystore file to create an X.509 certificate for signing.
>
>if anyone out there has code to show how they loaded an X.509 with private key
>from a keystore it would be so much appreciated.  the actor bit i think i can
>figure out (i hope) but the keystore problem has me completely stumped.
>
>please.
>thanks.
>................ron.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org