Here is a soap ui project that demonstrates how to create a pullpoint,
register it as a subscriber, send a notification, and then retrieve it from
the pullpoint.
http://cwiki.apache.org/confluence/download/attachments/39162/wsnotification-soapui-project.xml
I haven't had time to actually explain it, but if someone wants to
contribute some doc for the example:
http://cwiki.apache.org/confluence/display/SM/WS-Notification+HTTP+Binding
On 2/28/07, patkerr <[EMAIL PROTECTED]> wrote:
Could you provide an example of: "expose all endoints using a single http
endpoint" (I assume in the xbean.xml file) and "use ws-addressing to specify
the exact endpoint you target.", (In a SOAP message). I think this would
help a lot.
Thanks.
Pat
jmdev wrote:
>
> More questions for gnodet...
>
> 1) I can't seem to retrieve the WSDL for the dynamically created
> PullPoint. I deployed an http consumer endpoint that exposed one of my
> dynamically created PullPoint's. I receive an error when I attempt to
> retrieve the WSDL:
>
> ERROR:
>
> Could not retrieve description for endpoint
>
{http://servicemix.org/wsnotification}PullPoint:ID-Server-4879-1172649711244-9-0
> (no interface defined)
>
> I am going to use the WSDL to generate my client.
>
> 2) I am assuming from the documentation that since a CreatePullPoint
> interface was created for external clients that someone has actually
> gotten this to work for external clients. Is that true? I would be more
> than happy to put together a sample application if I could just get it to
> work :-) Does anyone have some snippets for the single endpoint exposing
> all internal endpoints? What would the http endpoint definition look
> like for such an endpoint? I read the WS-Addressing section and though I
> believe I understand how that works, I don't understand what such a proxy
> would look like as an http endpoint.
>
> 3) Below is my attempt at creating an http endpoint dynamically. I can
> see the endpoint created in jconsole, but again, since I can't retrieve
> the WSDL, I don't know what or what doesn't exist. From what you are
> saying Guillaume, I should abandon this approach?
>
> ComponentMBeanImpl componentMBeanImpl =
> container.getComponent("servicemix-http");
> Component http = componentMBeanImpl.getComponent();
>
> ServiceUnit su = new ServiceUnit();
> su.setComponent((ServiceMixComponent) http);
> su.setName("my-su-http-temp");
>
> HttpEndpoint endpoint = new HttpEndpoint();
> endpoint.setService(QNAME_PULLPOINT);
> endpoint.setEndpoint(internalEndpoint);
> endpoint.setTargetService(QNAME_PULLPOINT);
> endpoint.setLocationURI(externalURI);
> endpoint.setRoleAsString("consumer");
> endpoint.setDefaultMep(URI.create("http://www.w3.org/2004/08/wsdl/in-out"));
> endpoint.setSoap(true);
> endpoint.setServiceUnit(su);
>
> try{
> su.addEndpoint(endpoint);
> }
> catch(DeploymentException e1){
> System.err.println("**** ERROR DEPLOYING *** : " + e1.toString());
> }
>
> ExternalEndpoint externalEndpoint = new ExternalEndpoint(
> su.getComponent().getEPRElementName(),
> endpoint.getLocationURI(),
> endpoint.getService(),
> internalEndpoint,
> endpoint.getInterfaceName());
>
> try{
> container.registerExternalEndpoint(new
> ComponentNameSpace(container.getName(),"servicemix-http"),
> externalEndpoint);
> ConsumerProcessor consumerProcessor = new ConsumerProcessor(endpoint);
> consumerProcessor.start();
> }
> catch(JBIException e1){
> System.err.println("*** ERROR REGISTERING EXTERNAL ENDPOINT *** : " +
> e1.toString());
> }
> catch(Exception e){
> e.printStackTrace();
> }
>
>
>
>
> gnodet wrote:
>>
>> There's no easy way to create http endpoints dynamically.
>> So you need to expose all endoints using a single http endpoint
>> and use ws-addressing to specify the exact endpoint you target.
>> The address of the endpoint is given in the response of the pullpoint
>> creation.
>> See servicemix-http documentation for ws-addressing infos.
>>
>> On 2/27/07, jmdev <[EMAIL PROTECTED]> wrote:
>>>
>>> I haven't gotten any responses on my previous inquiry regarding external
>>> pull
>>> points, so I thought I would try again.
>>>
>>> I can successfully set up and create pull points internal to the ESB.
>>> However my consumer is external to the ESB.
>>>
>>> I see three internal endpoints are created after my call to
>>> CreatePullPoint:
>>>
>>> http://www.servicemix.org/wsnotification/PullPoint/ID...
>>> http://www.servicemix.org/wsnotification/Publisher/ID...
>>> http://www.servicemix.org/wsnotification/Subscription/ID...
>>>
>>> My guess is that I need to expose one of these endpoints to the world
>>> outside the ESB so that my external client can pull from it. Is that
>>> correct?
>>>
>>> Also, since I am using the CreatePullPoint web service externally and
>>> therefore dynamically generating my endpoints, how can I dynamically
>>> expose
>>> these http endpoints to the outside world? My attempts thus far have
>>> not
>>> worked.
>>>
>>> Any ideas?
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>>
http://www.nabble.com/Creating-an-External-Pull-Point-Problem---gnodet--tf3303303s12049.html#a9188542
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Architect, LogicBlaze (http://www.logicblaze.com/)
>> Blog: http://gnodet.blogspot.com/
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Creating-an-External-Pull-Point-Problem---gnodet--tf3303303s12049.html#a9206509
Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/