axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ulf Dittmer (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (AXIS2-1014) org.apache.asix2.saaj.SOAPConnectionImpl does not handle MimeHeaders (SOAPAction)
Date Tue, 05 Aug 2008 16:08:44 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619381#action_12619381
] 

udittmer edited comment on AXIS2-1014 at 8/5/08 9:06 AM:
------------------------------------------------------------

Yep, it's still there in 1.4. It may be resolved, but it's not fixed.

Guys, this is a biggie. Please make this part of 1.4.1.

WS-Security doesn't work if the WSA-Addressing Action value isn't the same as the SOAPAction
header, and because of this bug it's not possible to set SOAPAction.

And since the Authorization HTTP header also can't be set, it's not possible to properly secure
SAAJ services using HTTP authentication, either.

      was (Author: udittmer):
    Yep, it's still there in 1.4. It may be resolved, but it's not fixed.

Guys, this is a biggie. Please make this part of 1.4.1.

WS-Security doesn't work if the WSA-Addressing Action value isn't the same as the SOAPAction
header, and because of this bug it's not possible to set SOAPAction.
  
> org.apache.asix2.saaj.SOAPConnectionImpl does not handle MimeHeaders (SOAPAction)
> ---------------------------------------------------------------------------------
>
>                 Key: AXIS2-1014
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1014
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: client-api
>            Reporter: Jian Wu
>            Assignee: sumedha rubasinghe
>
> I looked into org.apache.axis2.saaj.SOAPConnectionImpl.java in the
> Axis2 Source Repositoy, as the following code snippet shown, it
> never pass down MimeHeaders from SOAPMessage to the ServiceClient,
> so all the SOAPMessages  with empty SOAPAction as ""
> ==========================================
>     public SOAPMessage call(SOAPMessage request, Object endpoint) throws SOAPException
{
>         if (closed) {
>             throw new SOAPException("SOAPConnection closed");
>         }
>         // initialize URL
>         URL url;
>         try {
>             url = (endpoint instanceof URL) ? (URL) endpoint : new URL(endpoint.toString());
>         } catch (MalformedURLException e) {
>             throw new SOAPException(e);
>         }
>         // initialize and set Options
>         Options options = new Options();
>         options.setTo(new EndpointReference(url.toString()));
>         // initialize the Sender
>         OperationClient opClient;
>         try {
>             serviceClient = new ServiceClient();
>             opClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
>         } catch (AxisFault e) {
>             throw new SOAPException(e);
>         }
>         opClient.setOptions(options);
>         if (request.countAttachments() != 0) { // SOAPMessage with attachments
>             opClient.getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
>                                               Constants.VALUE_TRUE);
>             return handleSOAPMessage(request, opClient);
>         } else { // simple SOAPMessage
>             return handleSOAPMessage(request, opClient);
>         }
>     }
> private SOAPMessage handleSOAPMessage(SOAPMessage request,
>                                           OperationClient opClient) throws SOAPException
{
>         MessageContext requestMsgCtx = new MessageContext();
>         try {
>             requestMsgCtx.setEnvelope(toOMSOAPEnvelope(request));
>             opClient.addMessageContext(requestMsgCtx);
>             opClient.execute(true);
>             MessageContext msgCtx = opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
>             //TODO: get attachments
>             return getSOAPMessage(msgCtx.getEnvelope());
>         } catch (AxisFault e) {
>             throw new SOAPException(e);
>         }
>     }
> protected org.apache.axiom.soap.SOAPEnvelope toOMSOAPEnvelope(SOAPMessage saajSOAPMsg)
>             throws SOAPException {
>         final org.apache.axiom.soap.SOAPEnvelope omSOAPEnv =
>                 SAAJUtil.toOMSOAPEnvelope(saajSOAPMsg.getSOAPPart().getDocumentElement());
>         System.err.println("#### req OM Soap Env=" + omSOAPEnv);
>         Map attachmentMap = new HashMap();
>         final Iterator attachments = saajSOAPMsg.getAttachments();
>         while (attachments.hasNext()) {
>             final AttachmentPart attachment = (AttachmentPart) attachments.next();
>             if (attachment.getContentId() == null ||
>                 attachment.getContentId().trim().length() == 0) {
>                 attachment.setContentId(IDGenerator.generateID());
>             }
>             if (attachment.getDataHandler() == null) {
>                 throw new SOAPException("Attachment with NULL DataHandler");
>             }
>             attachmentMap.put(attachment.getContentId(), attachment);
>         }
>         insertAttachmentNodes(attachmentMap, omSOAPEnv);
> //        printOMSOAPEnvelope(omSOAPEnv);
>         return omSOAPEnv;
>     }
> ====================================== 
> As suggested by Davanum Srinivas, I file this bug to track this problem

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message