Package javax.wsdl.extensions.soap

Examples of javax.wsdl.extensions.soap.SOAPAddress


            }
            boolean found = false;
            while (it.hasNext()) {
                Object obj = it.next();
                if (obj instanceof SOAPAddress) {
                    SOAPAddress soapAddress = (SOAPAddress)obj;
                    if (soapAddress.getLocationURI() != null
                        && soapAddress.getLocationURI().equals("http://localhost:9000/newservice/newport")) {
                        found = true;
                        break;
                    }
                }
            }
View Full Code Here


            }
            boolean found = false;
            while (it.hasNext()) {
                Object obj = it.next();
                if (obj instanceof SOAPAddress) {
                    SOAPAddress soapAddress = (SOAPAddress)obj;
                    if (soapAddress.getLocationURI() != null
                        && soapAddress.getLocationURI().equals("http://localhost:9000/serviceins/portins")) {
                        found = true;
                        break;
                    }
                }
            }
View Full Code Here

        for ( int i = 0; i < extElems.size(); i++ )
        {
            ExtensibilityElement extElem = (ExtensibilityElement) extElems.get( i );
            if ( extElem instanceof SOAPAddress )
            {
                SOAPAddress soapAddr = (SOAPAddress) extElem;
                endpointURL = soapAddr.getLocationURI();
                break;
            }
        }
        if ( endpointURL == null )
        {
View Full Code Here

        AxisEndpoint endpoint = getAxisEndpoint(port.getName());
        List list = port.getExtensibilityElements();
        for (int i = 0; i < list.size(); i++) {
          Object extensibilityEle = list.get(i);
          if (extensibilityEle instanceof SOAPAddress) {
            SOAPAddress soapAddress = (SOAPAddress) extensibilityEle;
            String existingAddress = soapAddress.getLocationURI();
            if (existingAddress == null
                || existingAddress
                    .equals("REPLACE_WITH_ACTUAL_URL")) {
              if (endpoint != null) {
                ((SOAPAddress) extensibilityEle)
                    .setLocationURI(endpoint
                        .calculateEndpointURL(requestIP));
              } else {
                ((SOAPAddress) extensibilityEle)
                    .setLocationURI(getEPRs()[0]);
              }
            } else {
              if (requestIP == null) {
                if (endpoint != null) {
                  ((SOAPAddress) extensibilityEle)
                      .setLocationURI(endpoint
                          .calculateEndpointURL());
                } else {
                  ((SOAPAddress) extensibilityEle)
                      .setLocationURI(getLocationURI(
                          getEPRs(), existingAddress));
                }
              } else {
                if (endpoint != null) {
                  ((SOAPAddress) extensibilityEle)
                      .setLocationURI(endpoint
                          .calculateEndpointURL(requestIP));
                } else {
                  ((SOAPAddress) extensibilityEle)
                      .setLocationURI(getLocationURI(
                          calculateEPRs(requestIP),
                          existingAddress));
                }
              }
            }
          } else if (extensibilityEle instanceof SOAP12Address) {
            SOAP12Address soapAddress = (SOAP12Address) extensibilityEle;
            String exsistingAddress = soapAddress.getLocationURI();
            if (requestIP == null) {
              if (endpoint != null) {
                ((SOAP12Address) extensibilityEle)
                    .setLocationURI(endpoint
                        .calculateEndpointURL());
View Full Code Here

       
        service.setQName
            (new QName ("http://wfmopen.sourceforge.net/wfxml20.wsdl",
                        serviceName, "tns"));
        service.addPort(port);
        SOAPAddress address = new SOAPAddressImpl();
        address.setLocationURI(getRequestBasePath(request));
       
        port.addExtensibilityElement(address);
       
        definition.addService(service);
    }
View Full Code Here

        Port port = def.createPort();
        port.setBinding(binding);
        port.setName(this.name + "Port");

        if (locationURI != null) {
            SOAPAddress soapAddress = new SOAPAddressImpl();
            soapAddress.setLocationURI(locationURI);
            port.addExtensibilityElement(soapAddress);
        }

        Service service = def.createService();
        service.setQName(new QName(TNS, this.name));
View Full Code Here

    return anonymous;
  }

  public static String getSoapEndpoint( Port port )
  {
    SOAPAddress soapAddress = WsdlUtils.getExtensiblityElement( port.getExtensibilityElements(), SOAPAddress.class );
    if( soapAddress != null && StringUtils.hasContent( soapAddress.getLocationURI() ) )
    {
      try
      {
        return URLDecoder.decode( soapAddress.getLocationURI(), "UTF-8" );
      }
      catch( UnsupportedEncodingException e )
      {
        e.printStackTrace();
        return soapAddress.getLocationURI();
      }
    }

    SOAP12Address soap12Address = WsdlUtils.getExtensiblityElement( port.getExtensibilityElements(),
        SOAP12Address.class );
View Full Code Here

    return null;
  }

  public static boolean replaceSoapEndpoint( Port port, String endpoint )
  {
    SOAPAddress soapAddress = WsdlUtils.getExtensiblityElement( port.getExtensibilityElements(), SOAPAddress.class );
    if( soapAddress != null )
    {
      soapAddress.setLocationURI( endpoint );
      return true;
    }

    SOAP12Address soap12Address = WsdlUtils.getExtensiblityElement( port.getExtensibilityElements(),
        SOAP12Address.class );
View Full Code Here

        String portStyleString = soapBinding.getStyle();
        return Style.getStyle(portStyleString);
    }

    private URL getAddressLocation(Port port) throws DeploymentException {
        SOAPAddress soapAddress;
        try {
            soapAddress = (SOAPAddress) SchemaInfoBuilder.getExtensibilityElement(SOAPAddress.class, port.getExtensibilityElements());
        } catch (DeploymentException e) {
            //a http: protocol REST service.  Skip it.
            return null;
        }
        String locationURIString = soapAddress.getLocationURI();
        URL location;
        try {
            location = new URL(locationURIString);
        } catch (MalformedURLException e) {
            throw new DeploymentException("Could not construct web service location URL from " + locationURIString, e);
View Full Code Here

            soapport.setName(portTypeName + "SoapPort");
            soapport.setBinding(binding);
            /*
             * Set Address for SOAP Port
             */
            SOAPAddress address = new SOAPAddressImpl();
            address.setLocationURI(epr);

            soapport.addExtensibilityElement(address);

            // add Port
            service.addPort(soapport);
View Full Code Here

TOP

Related Classes of javax.wsdl.extensions.soap.SOAPAddress

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.