/** * Create an endpoint reference for the provided wsdl, service and portname. * @param wsdlUrl - url of the wsdl that describes the service. * @param serviceName - the <code>QName</code> of the service. * @param portName - the name of the port. * @return EndpointReferenceType - the endpoint reference */ public static EndpointReferenceType getEndpointReference(URL wsdlUrl, QName serviceName, String portName) { EndpointReferenceType reference = WSAEndpointReferenceUtils.createEndpointReferenceWithMetadata(); setServiceAndPortName(reference, serviceName, portName); //TODO To Ensure it is a valid URI syntax. setWSDLLocation(reference, wsdlUrl.toString()); return reference; }
/** * Create an endpoint reference for the provided wsdl, service and portname. * @param wsdlUrl - url of the wsdl that describes the service. * @param serviceName - the <code>QName</code> of the service. * @param portName - the name of the port. * @return EndpointReferenceType - the endpoint reference */ public static EndpointReferenceType getEndpointReference(URL wsdlUrl, QName serviceName, String portName) { EndpointReferenceType reference = WSAEndpointReferenceUtils.createEndpointReferenceWithMetadata(); setServiceAndPortName(reference, serviceName, portName); //TODO To Ensure it is a valid URI syntax. setWSDLLocation(reference, wsdlUrl.toString()); return reference; }
/** * Get the target endpoint reference. * * @param ei the corresponding EndpointInfo * @param t the given target EPR if available * @param bus the Bus * @return the actual target */ protected static EndpointReferenceType getTargetReference(EndpointInfo ei, EndpointReferenceType t, Bus bus) { EndpointReferenceType ref = null; if (null == t) { ref = new EndpointReferenceType(); AttributedURIType address = new AttributedURIType(); address.setValue(ei.getAddress()); ref.setAddress(address); if (ei.getService() != null) { EndpointReferenceUtils.setServiceAndPortName(ref, ei.getService().getName(), ei.getName().getLocalPart()); } } else { ref = t; } return ref; }
/** * Get the target endpoint reference. * * @param ei the corresponding EndpointInfo * @param t the given target EPR if available * @param bus the Bus * @return the actual target */ protected static EndpointReferenceType getTargetReference(EndpointInfo ei, EndpointReferenceType t, Bus bus) { EndpointReferenceType ref = null; if (null == t) { ref = new EndpointReferenceType(); AttributedURIType address = new AttributedURIType(); address.setValue(ei.getAddress()); ref.setAddress(address); if (ei.getService() != null) { EndpointReferenceUtils.setServiceAndPortName(ref, ei.getService().getName(), ei.getName().getLocalPart()); } } else { ref = t; } return ref; }
/** * Get the target endpoint reference. * * @param ei the corresponding EndpointInfo * @param t the given target EPR if available * @return the actual target */ protected static EndpointReferenceType getTargetReference(EndpointInfo ei, EndpointReferenceType t) { EndpointReferenceType ref = null; if (null == t) { ref = new EndpointReferenceType(); AttributedURIType address = new AttributedURIType(); address.setValue(ei.getAddress()); ref.setAddress(address); if (ei.getService() != null) { EndpointReferenceUtils.setServiceAndPortName(ref, ei.getService().getName(), ei.getName() .getLocalPart()); } } else { ref = t; } return ref; }
/** * Convert from 2004/03 EndpointReferenceType to 2005/08 EndpointReferenceType. * * @param exposed the 2004/03 EndpointReferenceType * @return an equivalent 2005/08 EndpointReferenceType */ public static EndpointReferenceType convert(org.apache.cxf.ws.addressing.v200403.EndpointReferenceType exposed) { EndpointReferenceType internal = ContextUtils.WSA_OBJECT_FACTORY.createEndpointReferenceType(); internal.setAddress(convert(exposed.getAddress())); // TODO ref parameters not present in 2004/03 // internal.setReferenceParameters(convert(exposed // .getReferenceParameters())); org.apache.cxf.ws.addressing.v200403.ServiceNameType serviceName = exposed.getServiceName(); org.apache.cxf.ws.addressing.v200403.AttributedQName portName = exposed.getPortType(); if (serviceName != null && portName != null) { EndpointReferenceUtils.setServiceAndPortName(internal, serviceName.getValue(), portName .getValue().getLocalPart()); } // no direct analogue for ReferenceProperties addAll(internal.getAny(), exposed.getAny()); putAll(internal.getOtherAttributes(), exposed.getOtherAttributes()); return internal; }
/** * Convert from 2004/03 EndpointReferenceType to 2005/08 EndpointReferenceType. * * @param exposed the 2004/03 EndpointReferenceType * @return an equivalent 2005/08 EndpointReferenceType */ public static EndpointReferenceType convert(org.apache.cxf.ws.addressing.v200403.EndpointReferenceType exposed) { EndpointReferenceType internal = ContextUtils.WSA_OBJECT_FACTORY.createEndpointReferenceType(); internal.setAddress(convert(exposed.getAddress())); // TODO ref parameters not present in 2004/03 // internal.setReferenceParameters(convert(exposed // .getReferenceParameters())); org.apache.cxf.ws.addressing.v200403.ServiceNameType serviceName = exposed.getServiceName(); org.apache.cxf.ws.addressing.v200403.AttributedQName portName = exposed.getPortType(); if (serviceName != null && portName != null) { EndpointReferenceUtils.setServiceAndPortName(internal, serviceName.getValue(), portName .getValue().getLocalPart()); } // no direct analogue for ReferenceProperties addAll(internal.getAny(), exposed.getAny()); putAll(internal.getOtherAttributes(), exposed.getOtherAttributes()); return internal; }
/** * Convert from 2004/08 EndpointReferenceType to 2005/08 * EndpointReferenceType. * * @param exposed the 2004/08 EndpointReferenceType * @return an equivalent 2005/08 EndpointReferenceType */ public static EndpointReferenceType convert( org.apache.cxf.ws.addressing.v200408.EndpointReferenceType exposed) { EndpointReferenceType internal = ContextUtils.WSA_OBJECT_FACTORY.createEndpointReferenceType(); internal.setAddress(convert(exposed.getAddress())); internal.setReferenceParameters( convert(exposed.getReferenceParameters())); ServiceNameType serviceName = exposed.getServiceName(); AttributedQName portName = exposed.getPortType(); if (serviceName != null && portName != null) { EndpointReferenceUtils.setServiceAndPortName(internal, serviceName.getValue(), portName.getValue().getLocalPart()); } // no direct analogue for ReferenceProperties addAll(internal.getAny(), exposed.getAny()); putAll(internal.getOtherAttributes(), exposed.getOtherAttributes()); return internal; }
/** * Convert from 2004/08 EndpointReferenceType to 2005/08 * EndpointReferenceType. * * @param exposed the 2004/08 EndpointReferenceType * @return an equivalent 2005/08 EndpointReferenceType */ public static EndpointReferenceType convert( org.apache.cxf.ws.addressing.v200408.EndpointReferenceType exposed) { EndpointReferenceType internal = ContextUtils.WSA_OBJECT_FACTORY.createEndpointReferenceType(); internal.setAddress(convert(exposed.getAddress())); internal.setReferenceParameters( convert(exposed.getReferenceParameters())); ServiceNameType serviceName = exposed.getServiceName(); AttributedQName portName = exposed.getPortType(); if (serviceName != null && portName != null) { EndpointReferenceUtils.setServiceAndPortName(internal, serviceName.getValue(), portName.getValue().getLocalPart()); } // no direct analogue for ReferenceProperties addAll(internal.getAny(), exposed.getAny()); putAll(internal.getOtherAttributes(), exposed.getOtherAttributes()); return internal; }