Examples of EndpointMetaData


Examples of org.jboss.ws.metadata.umdm.EndpointMetaData

   public void deployServerSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion
   {
      ByteArrayOutputStream stream = new ByteArrayOutputStream();
      if (extMetaData instanceof EndpointMetaData)
      {
         EndpointMetaData ep = (EndpointMetaData) extMetaData;
       
         WSSecurityConfiguration securityConfiguration;
         try
         {
            //GET XML of security assertion
            PrimitiveAssertionWriter.newInstance().writePrimitiveAssertion(assertion, stream);
            StringReader reader = new StringReader(stream.toString());
           
            //Set security configuration
            securityConfiguration = WSSecurityOMFactory.newInstance().parse(reader);
            WSSecurityConfigFactory.newInstance().initKeystorePath(ep.getRootFile(), securityConfiguration);
            ep.getServiceMetaData().setSecurityConfiguration(securityConfiguration);
           
            //set up handler chain as defined in standard file
            ep.setConfigName("Standard WSSecurity Endpoint");
     
         }
         catch (Exception e)
         {
            e.printStackTrace();
View Full Code Here

Examples of org.jboss.ws.metadata.umdm.EndpointMetaData

   public void deployClientSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion
   {
      if (extMetaData instanceof EndpointMetaData)
      {
         ByteArrayOutputStream stream = new ByteArrayOutputStream();
         EndpointMetaData epMetaData = (EndpointMetaData) extMetaData;
         ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
         if (serviceMetaData.getSecurityConfiguration() == null)
         {
            try
            {
               PrimitiveAssertionWriter.newInstance().writePrimitiveAssertion(assertion, stream);
               StringReader reader = new StringReader(stream.toString());
              
               WSSecurityConfiguration securityConfiguration = WSSecurityOMFactory.newInstance().parse(reader);
               serviceMetaData.setSecurityConfiguration(securityConfiguration);
              
               epMetaData.setConfigName("Standard WSSecurity Client");
            }
            catch (Exception e)
            {
               e.printStackTrace();
               throw new UnsupportedAssertion();
View Full Code Here

Examples of org.jboss.ws.metadata.umdm.EndpointMetaData

   private void createWrapperTypes(JavaToWSDLConfig j2wc, String outDir, UnifiedMetaData wsMetaData, JavaWsdlMapping mapping, Class endpointClass) throws IOException
   {
      Map<QName, JavaXmlTypeMapping> index = indexMappingTypes(mapping);

      EndpointMetaData epMetaData = null;
      for (ServiceMetaData service : wsMetaData.getServices())
      {
         epMetaData = service.getEndpointByServiceEndpointInterface(j2wc.endpointName);
         if (epMetaData != null)
            break;
      }

      if (epMetaData == null)
         throw new WSException("Could not find endpoint in metadata: " + j2wc.endpointName);

      String packageName = endpointClass.getPackage().getName();
      ClassLoader classLoader = wsMetaData.getClassLoader();

      for (OperationMetaData opMetaData : epMetaData.getOperations())
      {
         if (opMetaData.isDocumentWrapped())
         {
            for (ParameterMetaData parameter : opMetaData.getParameters())
            {
View Full Code Here

Examples of org.jboss.ws.metadata.umdm.EndpointMetaData

         OperationMetaData opMetaData = ctx.getOperationMetaData();
         if (opMetaData == null)
         {
            // Get the operation meta data from the soap message
            // for the server side inbound message.
            EndpointMetaData epMetaData = ctx.getEndpointMetaData();
            opMetaData = soapMessage.getOperationMetaData(epMetaData);
         }

         String operation = null;
         String port = null;
View Full Code Here

Examples of org.jboss.ws.metadata.umdm.EndpointMetaData

      OperationMetaData opMetaData = ctx.getOperationMetaData();
      if (opMetaData == null)
      {
         // Get the operation meta data from the soap message
         // for the server side inbound message.
         EndpointMetaData epMetaData = ctx.getEndpointMetaData();
         opMetaData = message.getOperationMetaData(epMetaData);
      }

      String operation = null;
      String port = null;
View Full Code Here

Examples of org.jboss.ws.metadata.umdm.EndpointMetaData

      OperationMetaData opMetaData = ctx.getOperationMetaData();
      if (opMetaData == null)
      {
         // Get the operation meta data from the soap message
         // for the server side inbound message.
         EndpointMetaData epMetaData = ctx.getEndpointMetaData();
         opMetaData = message.getOperationMetaData(epMetaData);
      }

      String operation = null;
      String port = null;
View Full Code Here

Examples of org.jboss.ws.metadata.umdm.EndpointMetaData

         //if no configuration override, we try getting the right operation config
         //according to the invoked operation that can be found using the context
         CommonMessageContext ctx = MessageContextAssociation.peekMessageContext();
         if (ctx != null)
         {
            EndpointMetaData epMetaData = ctx.getEndpointMetaData();
            QName port = epMetaData.getPortName();

            OperationMetaData opMetaData = ctx.getOperationMetaData();
            if (opMetaData == null)
            {
               // Get the operation meta data from the soap message
View Full Code Here

Examples of org.jboss.ws.metadata.umdm.EndpointMetaData

   public static void handleOutbound(CommonMessageContext ctx) throws SOAPException, SOAPFaultException
   {
      WSSecurityConfiguration config = getSecurityConfig(ctx);
      SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();

      EndpointMetaData epMetaData = ctx.getEndpointMetaData();
      String port = epMetaData.getPortName().getLocalPart();
     
      String opName = null;
      OperationMetaData opMetaData = ctx.getOperationMetaData();
      if (opMetaData != null)
         opName = opMetaData.getQName().toString();
View Full Code Here

Examples of org.jboss.ws.metadata.umdm.EndpointMetaData

      }

      // An invocation on the service endpoint interface
      else
      {
         EndpointMetaData epMetaData = call.getEndpointMetaData();
         OperationMetaData opMetaData = epMetaData.getOperation(method);
         if (opMetaData == null)
            throw new WSException("Cannot obtain operation meta data for: " + methodName);

         call.setOperationName(opMetaData.getQName());
View Full Code Here

Examples of org.jboss.ws.metadata.umdm.EndpointMetaData

         OperationMetaData opMetaData = ctx.getOperationMetaData();
         if (opMetaData == null)
         {
            // Get the operation meta data from the soap message
            // for the server side inbound message.
            EndpointMetaData epMetaData = ctx.getEndpointMetaData();
            opMetaData = soapMessage.getOperationMetaData(epMetaData);
         }

         String operation = opMetaData.getQName().toString();
         String port = opMetaData.getEndpointMetaData().getPortName().getLocalPart();

         if (hasRequirements(config, operation, port))
            throw convertToFault(new InvalidSecurityHeaderException("This service requires <wsse:Security>, which is missing."));

         return;
      }

      try
      {
         SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getKeyPasswords(), config.getTrustStoreURL(),
               config.getTrustStoreType(), config.getTrustStorePassword());
         SecurityDecoder decoder = new SecurityDecoder(securityStore);

         decoder.decode(soapMessage.getSOAPPart(), secHeaderElement);
        
         if (log.isTraceEnabled())
            log.trace("Decoded Message:\n" + DOMWriter.printNode(soapMessage.getSOAPPart(), true));

         OperationMetaData opMetaData = ctx.getOperationMetaData();
         if (opMetaData == null)
         {
            // Get the operation meta data from the soap message
            // for the server side inbound message.
            EndpointMetaData epMetaData = ctx.getEndpointMetaData();
            opMetaData = soapMessage.getOperationMetaData(epMetaData);
         }

         String operation = opMetaData.getQName().toString();
         String port = opMetaData.getEndpointMetaData().getPortName().getLocalPart();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.