Package org.jboss.ws

Examples of org.jboss.ws.WSException


      if (pcLink == null)
         throw new IllegalArgumentException("Cannot obtain request parameter 'pcLink'");

      Endpoint endpoint = epRegistry.resolve( new PortComponentResolver(pcLink) );
      if (endpoint == null)
         throw new WSException("Cannot resolve request parameter 'pcLink'");

      res.setContentType("text/plain");
      PrintWriter out = res.getWriter();

      ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
View Full Code Here


   }

   public Iterator getAttachments(MimeHeaders headers)
   {
      if (headers == null)
         throw new WSException("MimeHeaders can not be null");

      return new MimeMatchingAttachmentsIterator(headers, attachments);
   }
View Full Code Here

            if (epMetaData.getPortName().equals(wsdlEndpoint.getName()))
            {
               QName bindQName = wsdlEndpoint.getBinding();
               WSDLBinding wsdlBinding = wsdlDefinitions.getBinding(bindQName);
               if (wsdlBinding == null)
                  throw new WSException("Cannot obtain binding: " + bindQName);

               for (WSDLBindingOperation wsdlBindingOperation : wsdlBinding.getOperations())
               {
                  String encStyle = wsdlBindingOperation.getEncodingStyle();
                  epMetaData.setEncodingStyle(Use.valueOf(encStyle));
View Full Code Here

      EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
      if (apMetaData != null)
      {
         String ejbName = sepMetaData.getLinkName();
         if (ejbName == null)
            throw new WSException("Cannot obtain ejb-link from port component");

         EJBMetaData beanMetaData = (EJBMetaData)apMetaData.getBeanByEjbName(ejbName);
         if (beanMetaData == null)
            throw new WSException("Cannot obtain ejb meta data for: " + ejbName);

         if (beanMetaData instanceof MDBMetaData)
         {
            MDBMetaData mdMetaData = (MDBMetaData)beanMetaData;
            String jndiName = mdMetaData.getDestinationJndiName();
View Full Code Here

   /** Get the web service address for a given path
    */
   public static String getServiceEndpointAddress(String uriScheme, String servicePath)
   {
      if (servicePath == null || servicePath.length() == 0)
         throw new WSException("Service path cannot be null");

      if (servicePath.endsWith("/*"))
         servicePath = servicePath.substring(0, servicePath.length() - 2);

      if (uriScheme == null)
         uriScheme = "http";

      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
      ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();

      String host = config.getWebServiceHost();
     
      int port;
      if ("https".equals(uriScheme))
      {
         port = config.getWebServiceSecurePort();
      }
      else
      {
         port = config.getWebServicePort();
      }     
     
      // Reset port if using the default for the scheme.
      if (("http".equals(uriScheme) && port == 80) || ("https".equals(uriScheme) && port == 443))
      {
         port = -1;
      }

      URL url = null;
      try
      {
         if (port > -1)
         {
            url = new URL(uriScheme, host, port, servicePath);
         }
         else
         {
            url = new URL(uriScheme, host, servicePath);
         }
         return url.toExternalForm();
      }
      catch (MalformedURLException e)
      {
         throw new WSException("Malformed URL: uriScheme={" + uriScheme + "} host={" + host + "} port={" + port + "} servicePath={" + servicePath + "}", e);
      }
   }
View Full Code Here

      {
         Map<String, String> servletMappings = webMetaData.getServletMappings();
         String urlPattern = servletMappings.get(servletLink);

         if (urlPattern == null)
            throw new WSException("Cannot find <url-pattern> for servlet-name: " + servletLink);

         List<JSESecurityMetaData> securityList = webMetaData.getSecurityMetaData();
         for (JSESecurityMetaData currentSecurity : securityList)
         {
            if (currentSecurity.getTransportGuarantee() != null && currentSecurity.getTransportGuarantee().length() > 0)
View Full Code Here

                  {
                     sepMetaData.setEndpointAddress(new URL(orgAddress).toExternalForm());
                  }
                  catch (MalformedURLException e)
                  {
                     throw new WSException("Malformed URL: " + orgAddress);
                  }
               }
            }
         }
      }

      if (endpointFound == false)
         throw new WSException("Cannot find port in wsdl: " + portName);
   }
View Full Code Here

            }
            else
            {
               // WSDL operation of an WSDL interface that is marked as an event source
               // requires to carry an output message.
               throw new WSException("Unable to resolve eventing root element NS. No operation output found at " + wsdlInterfaceOperation.getName());
            }

            EventingEpMetaExt ext = new EventingEpMetaExt(EventingConstants.NS_EVENTING);
            ext.setEventSourceNS(eventSourceNS);
            ext.setNotificationSchema(notificationSchema);
View Full Code Here

      QName portName = epMetaData.getPortName();

      // This happends when we have multiple port components in sharing the same wsdl port
      // The EndpointMetaData name is the wsdl port, so we cannot have multiple meta data for the same port.
      if (endpoints.get(portName) != null)
         throw new WSException("EndpointMetaData name must be unique: " + portName);

      endpoints.put(portName, epMetaData);
   }
View Full Code Here

               javaWsdlMapping = mappingFactory.parse(mappingLocation);
               wsMetaData.addMappingDefinition(mappingLocation.toExternalForm(), javaWsdlMapping);
            }
            catch (IOException e)
            {
               throw new WSException("Cannot parse jaxrpc-mapping.xml", e);
            }
         }
      }
      return javaWsdlMapping;
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.WSException

Copyright © 2018 www.massapicom. 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.