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 "Baker, Richard" <Ri...@solers.com> on 2004/03/04 19:37:38 UTC

changes for: wss4j with axis-1.1 integrated with WASP 4.7

Attached is a diff for changes I have made to wss4j to get it to compile and
run under axis-1.1, and integrate with WASP 4.7.  The majority of the
changes are:

	- WSDoAllSender and WSDoAllReceiver both attempt to call
SOAPPart.setMessageContent(int, String) which is a private method in
axis-1.1.

	- The wsse and wsu namespace definitions were referencing
http://www.docs.oasis-open.org URLs that are not supported by WASP.  Changed
them to reference their equivalent http://schemas.xmlsoap.org URLs.

 <<wss4j_diff.txt>> 

Rich Baker
Software Engineer
Solers, Inc.
1611 N. Kent St., Suite 700
Arlington, VA  22209
Telephone: 703.841.6121
Fax: 703.908.9353


Re: changes for: wss4j with axis-1.1 integrated with WASP 4.7

Posted by Davanum Srinivas <di...@yahoo.com>.
Rich,

Can you please send a "cvs diff -u"?

thanks,
dims

--- "Baker, Richard" <Ri...@solers.com> wrote:
> 
> Attached is a diff for changes I have made to wss4j to get it to compile and
> run under axis-1.1, and integrate with WASP 4.7.  The majority of the
> changes are:
> 
> 	- WSDoAllSender and WSDoAllReceiver both attempt to call
> SOAPPart.setMessageContent(int, String) which is a private method in
> axis-1.1.
> 
> 	- The wsse and wsu namespace definitions were referencing
> http://www.docs.oasis-open.org URLs that are not supported by WASP.  Changed
> them to reference their equivalent http://schemas.xmlsoap.org URLs.
> 
>  <<wss4j_diff.txt>> 
> 
> Rich Baker
> Software Engineer
> Solers, Inc.
> 1611 N. Kent St., Suite 700
> Arlington, VA  22209
> Telephone: 703.841.6121
> Fax: 703.908.9353
> 
> > Index: org/apache/ws/axis/security/WSDoAllReceiver.java
> ===================================================================
> RCS file: /home/cvspublic/ws-fx/wss4j/src/org/apache/ws/axis/security/WSDoAllReceiver.java,v
> retrieving revision 1.2
> diff -r1.2 WSDoAllReceiver.java
> 68c68
> < 	 * 
> ---
> > 	 *
> 70c70
> < 	 * @throws AxisFault 
> ---
> > 	 * @throws AxisFault
> 104,105c104,105
> < 			if (headerElement.getLocalName().equals(WSConstants.WSSE_LN)
> < 				&& headerElement.getNamespaceURI().equals(WSConstants.WSSE_NS)) {
> ---
> > 			if (headerElement.getElementName().getLocalName().equals(WSConstants.WSSE_LN)
> > 				&& headerElement.getElementName().getURI().equals(WSConstants.WSSE_NS)) {
> 111c111
> < 			log.debug("Header found: " + headerElement.getLocalName());
> ---
> > 			log.debug("Header found: " + headerElement.getElementName().getLocalName());
> 116c116
> < 		 * as NO_SECURITY, otherwise its a fault 
> ---
> > 		 * as NO_SECURITY, otherwise its a fault
> 144c144
> < 		 * To check a UsernameToken or to decrypt an encrypted message we need 
> ---
> > 		 * To check a UsernameToken or to decrypt an encrypted message we need
> 153c153
> < 		 * Get and check the Signature specific parameters first because they 
> ---
> > 		 * Get and check the Signature specific parameters first because they
> 159c159
> < 		} 
> ---
> > 		}
> 180,186c180,187
> < 		SOAPPart sPart = (org.apache.axis.SOAPPart) sm.getSOAPPart();
> < 		
> < 		ByteArrayOutputStream os = new ByteArrayOutputStream();
> < 		XMLUtils.outputDOM(doc, os, true);
> < 		String osStr = os.toString();
> < 		if (doDebug) {
> < 			log.debug(osStr);
> ---
> > 		try {
> > 			org.apache.axis.Message m = (org.apache.axis.Message)AxisUtil.toSOAPMessage(doc);
> > 			mc.setCurrentMessage(m);
> > 		}
> > 		catch (Exception e) {
> > 			throw new AxisFault(
> > 				"WSDoAllReceiver: security processing failed",
> > 				e);
> 188d188
> < 		sPart.setCurrentMessage(osStr, SOAPPart.FORM_STRING);
> 190c190
> < 		/*		
> ---
> > 		/*
> 193c193
> < 			
> ---
> > 
> 226,227c226,227
> < 	} 
> < 	
> ---
> > 	}
> > 
> 248c248
> < 	
> ---
> > 
> 269c269
> < 	
> ---
> > 
> 272c272
> < 		/* There are currently no other signature parameters that need to be handled 
> ---
> > 		/* There are currently no other signature parameters that need to be handled
> 277c277
> < 	
> ---
> > 
> 281c281
> < 	 */ 
> ---
> > 	 */
> 285c285
> < 		/* There are currently no other decryption parameters that need to be handled 
> ---
> > 		/* There are currently no other decryption parameters that need to be handled
> Index: org/apache/ws/axis/security/WSDoAllSender.java
> ===================================================================
> RCS file: /home/cvspublic/ws-fx/wss4j/src/org/apache/ws/axis/security/WSDoAllSender.java,v
> retrieving revision 1.3
> diff -r1.3 WSDoAllSender.java
> 66c66
> < 	
> ---
> > 
> 68c68
> < 	
> ---
> > 
> 89c89
> < 	 * 
> ---
> > 	 *
> 91c91
> < 	 * @throws AxisFault 
> ---
> > 	 * @throws AxisFault
> 134c134
> < 		 * Now we perform some set-up for UsernameToken and Signature 
> ---
> > 		 * Now we perform some set-up for UsernameToken and Signature
> 154,155c154,155
> < 		 * 
> < 		 * This forces Axis to serialize the SOAP request into FORM_STRING. 
> ---
> > 		 *
> > 		 * This forces Axis to serialize the SOAP request into FORM_STRING.
> 157,158c157,158
> < 		 * 
> < 		 * During the FORM_STRING serialization Axis performs multi-ref of 
> ---
> > 		 *
> > 		 * During the FORM_STRING serialization Axis performs multi-ref of
> 161c161
> < 		 * the complete and final SOAP request as Axis would send it over 
> ---
> > 		 * the complete and final SOAP request as Axis would send it over
> 164,165c164,165
> < 		 * 
> < 		 * Now we can perform our security operations on this request. 
> ---
> > 		 *
> > 		 * Now we can perform our security operations on this request.
> 172c172
> < 		 * is a chained handler. 
> ---
> > 		 * is a chained handler.
> 191c191
> < 		 * Now get the action specific parameters. 
> ---
> > 		 * Now get the action specific parameters.
> 197c197
> < 		 * Get and check the Signature specific parameters first because they 
> ---
> > 		 * Get and check the Signature specific parameters first because they
> 269c269
> < 					/* 
> ---
> > 					/*
> 271c271
> < 					 
> ---
> > 
> 326c326
> <       
> ---
> > 
> 328,329c328,329
> < 		 * If required convert the resulting document into a message first. 
> < 		 * The outputDOM() method performs the necessary c14n call. After 
> ---
> > 		 * If required convert the resulting document into a message first.
> > 		 * The outputDOM() method performs the necessary c14n call. After
> 331c331
> < 		 * 
> ---
> > 		 *
> 333c333
> < 		 * 
> ---
> > 		 *
> 339,341c339,341
> < 		 * 
> < 		 * If noSerialization is false, this handler shall be the last 
> < 		 * (or only) one in a handler chain. 
> ---
> > 		 *
> > 		 * If noSerialization is false, this handler shall be the last
> > 		 * (or only) one in a handler chain.
> 344,345c344,345
> < 		 * and performs additional security processing steps.  
> < 		 * 
> ---
> > 		 * and performs additional security processing steps.
> > 		 *
> 350,354c350,357
> < 			ByteArrayOutputStream os = new ByteArrayOutputStream();
> < 			XMLUtils.outputDOM(doc, os, true);
> < 			String osStr = os.toString();
> < 			if (doDebug) {
> < 				log.debug(osStr);
> 
=== message truncated ===


=====
Davanum Srinivas - http://webservices.apache.org/~dims/