You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ralf Hauser (JIRA)" <ji...@apache.org> on 2018/11/23 14:21:00 UTC

[jira] [Created] (AXIS2-5942) allow for per SOAPConnection.call() security

Ralf Hauser created AXIS2-5942:
----------------------------------

             Summary: allow for per SOAPConnection.call() security
                 Key: AXIS2-5942
                 URL: https://issues.apache.org/jira/browse/AXIS2-5942
             Project: Axis2
          Issue Type: Improvement
    Affects Versions: 1.7.8
            Reporter: Ralf Hauser


I am trying to get the SAAJ example

[https://raw.githubusercontent.com/phaupt/mobileid-java/master/client-saaj/src/com/swisscom/mid/client/MobileidSign.java]

to work.

 

Most bothering is that trustStore and auth keystore are set globally.

 

If I were able to access org.apache.axis2.client.Options, with

  options.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER, ...)

this is easy to achieve.
Therefore,

1) make it possible to sub-class org.apache.axis2.saaj.SOAPConnectionImpl by making its constructor protected

 

2) add a "call" variant where one has access to the Options:

 

public SOAPMessage call(SOAPMessage request, Object endpoint) throws SOAPException {
        Options options = new Options();
        return call(request, endpoint, options);
    }

Many thanks!
   Ralf

P.S.: a further problem was that SOAPMessage resulting from [MobileidSign.|https://raw.githubusercontent.com/phaupt/mobileid-java/master/client-saaj/src/com/swisscom/mid/client/MobileidSign.java]createSOAPRequest() would loose all attributes when being serialized.

When I started with

[  SOAPFactory|eclipse-javadoc:%E2%98%82=privaLope-common/commons-lib%5C/axiom-api-1.2.20.jar%3Corg.apache.axiom.om(OMAbstractFactory.class%E2%98%83OMAbstractFactory~getSOAP12Factory%E2%98%82org.apache.axiom.soap.SOAPFactory] messageFactory =[org|eclipse-javadoc:%E2%98%82=privaLope-common/commons-lib%5C/axiom-api-1.2.20.jar%3Corg]{color:#000000}.{color}[apache|eclipse-javadoc:%E2%98%82=privaLope-common/commons-lib%5C/axiom-api-1.2.20.jar%3Corg.apache]{color:#000000}.{color}[axiom|eclipse-javadoc:%E2%98%82=privaLope-common/commons-lib%5C/axiom-api-1.2.20.jar%3Corg.apache.axiom]{color:#000000}.{color}[om|eclipse-javadoc:%E2%98%82=privaLope-common/commons-lib%5C/axiom-api-1.2.20.jar%3Corg.apache.axiom.om]{color:#000000}.{color}[OMAbstractFactory|eclipse-javadoc:%E2%98%82=privaLope-common/commons-lib%5C/axiom-api-1.2.20.jar%3Corg.apache.axiom.om(OMAbstractFactory.class%E2%98%83OMAbstractFactory]{color:#000000}.getSOAP12Factory();{color}

  OAPMessage soapMessage = messageFactory.createSOAPMessage();

the results were better, but portability suffered (I had to rewrite the entire construction of the message axiom-proprietary  :(  )



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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