You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kandula-dev@ws.apache.org by 竹伟饶 <10...@gmail.com> on 2007/08/01 09:15:46 UTC

problem about kandula

Hello:
      I meet some problem when I use the kandula.In fact,I just want to test
the register operation.But it always throw
java.lang.NullPointerException.Then I found the null instance is the
Coordinator c in class RegistrationImpl.The reason is   Coordinator c =
(Coordinator)CallbackRegistry.getInstance().correlateMessage(
CallbackRegistry.CALLBACK_REF, false); didn't get the NULL.I don't know
where should me relate CallbackRegistry.CALLBACK_REF with something.How can
I solve this problem.
--------------------
the test source is :

   final CoordinationContext ctx;
   ctx = new ActivationStub(activationServiceEPR)
     .createCoordinationContext(FBOCoordinator.COORDINATION_TYPE);
   //System.out.println(ctx.getCoordinationType());
   //System.out.println( ctx.getIdentifier());
   //System.out.println(ctx.getRegistrationService());
   EndpointReference initiatorPort = CoordinationService.getInstance()
     .getInitiatorService(RegisteInstance.newInstance(ctx), 0);
   System.out.println("initiatorPort:" + initiatorPort.toString());
   // remote coordination services endpoint
   String PROTOCOL_ID_INITIATOR =
"http://big.tuwien.ac.at/ws-fbo--extensions/protocol/initiator
";
   EndpointReference coordinatorPort = ctx.register(
     PROTOCOL_ID_INITIATOR, initiatorPort);

   // Check if we got something back...
   if (coordinatorPort == null)
    throw new NullPointerException(
      "CoordinatorPort has not been provided, but is required!");



---------------------------------------

the registrationCoordinator soap content is :

POST /axis/services/registrationCoordinator HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: 127.0.0.1:8281
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://schemas.xmlsoap.org/ws/2004/10/wscoor/Register"
Content-Length: 1095

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><Register
<http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CRegister>
xmlns="http://schemas.xmlsoap.org/ws/2004/10/wscoor"><ProtocolIdentifier>http://big.tuwien.ac.at/ws-fbo--extensions/protocol/initiator</ProtocolIdentifier><ParticipantProtocolService><ns1:Address<http://schemas.xmlsoap.org/ws/2004/10/wscoor%22%3E%3CProtocolIdentifier%3Ehttp://big.tuwien.ac.at/ws-fbo--extensions/protocol/initiator%3C/ProtocolIdentifier%3E%3CParticipantProtocolService%3E%3Cns1:Address>absoluteURI="true"
genericURI="true" host="localhost"
path="/axis/services/initiator" port="8281" scheme="http"
schemeSpecificPart="//localhost:8281/axis/services/initiator"
xmlns:ns1=" http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:8281/axis/services/initiator</ns1:Address><ns2:ReferenceProperties
<http://schemas.xmlsoap.org/ws/2004/08/addressing%22%3Ehttp://localhost:8281/axis/services/initiator%3C/ns1:Address%3E%3Cns2:ReferenceProperties>
xmlns:ns2="
http://schemas.xmlsoap.org/ws/2004/08/addressing"><ns3:CallbackRef<http://schemas.xmlsoap.org/ws/2004/08/addressing%22%3E%3Cns3:CallbackRef>xmlns:ns3="http://ws.apache.org/kandula">1234567899635214789</ns3:CallbackRef></ns2:ReferenceProperties><ns4:ReferenceParameters<http://ws.apache.org/kandula%22%3E1234567899635214789%3C/ns3:CallbackRef%3E%3C/ns2:ReferenceProperties%3E%3Cns4:ReferenceParameters>xmlns:ns4="http://schemas.xmlsoap.org/ws/2004/08/addressing"/></ParticipantProtocolService></Register></soapenv:Body></soapenv:Envelope<http://schemas.xmlsoap.org/ws/2004/08/addressing%22/%3E%3C/ParticipantProtocolService%3E%3C/Register%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope>
>
---------------------------
    From the soap content.I know if maybe because the soap content lack
soapheader which include the CALLBACK_REF.But I don't know which config-file
or which things relate with the CallbackRegistry.CALLBACK_REF.So I can't
solve the problem.Can you help me ?
   Thank you very much.

-- 
               饶竹伟
北京邮电大学 PCN&CAD中心

Re: problem about kandula

Posted by Dasarath Weeratunge <dw...@purdue.edu>.
Quoting ÖñΰÈÄ <10...@gmail.com>:

> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><Register

It could be that your ws-addressing handler (on the client side) is not
properly configured and thus references properties are not getting added in
to your Register message when it is sent to the coordinator. Reference 
properties in the Register message are typically used by the Coordination
Service to look up the relevant coordinator object from the Callback Registry.
You seem to be using ws-ba so I cannot give you a definitive answer.

Kandula-1 docs provide information on HOW-TO configure ws-addressing handler
using (client|server)-config.wsdd.

thanks,
--dasarath


> Hello:
>       I meet some problem when I use the kandula.In fact,I just want to test
> the register operation.But it always throw
> java.lang.NullPointerException.Then I found the null instance is the
> Coordinator c in class RegistrationImpl.The reason is   Coordinator c =
> (Coordinator)CallbackRegistry.getInstance().correlateMessage(
> CallbackRegistry.CALLBACK_REF, false); didn't get the NULL.I don't know
> where should me relate CallbackRegistry.CALLBACK_REF with something.How can
> I solve this problem.
> --------------------
> the test source is :
> 
>    final CoordinationContext ctx;
>    ctx = new ActivationStub(activationServiceEPR)
>      .createCoordinationContext(FBOCoordinator.COORDINATION_TYPE);
>    //System.out.println(ctx.getCoordinationType());
>    //System.out.println( ctx.getIdentifier());
>    //System.out.println(ctx.getRegistrationService());
>    EndpointReference initiatorPort = CoordinationService.getInstance()
>      .getInitiatorService(RegisteInstance.newInstance(ctx), 0);
>    System.out.println("initiatorPort:" + initiatorPort.toString());
>    // remote coordination services endpoint
>    String PROTOCOL_ID_INITIATOR =
> "http://big.tuwien.ac.at/ws-fbo--extensions/protocol/initiator
> ";
>    EndpointReference coordinatorPort = ctx.register(
>      PROTOCOL_ID_INITIATOR, initiatorPort);
> 
>    // Check if we got something back...
>    if (coordinatorPort == null)
>     throw new NullPointerException(
>       "CoordinatorPort has not been provided, but is required!");
> 
> 
> 
> ---------------------------------------
> 
> the registrationCoordinator soap content is :
> 
> POST /axis/services/registrationCoordinator HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime, multipart/related, text/*
> User-Agent: Axis/1.4
> Host: 127.0.0.1:8281
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction: "http://schemas.xmlsoap.org/ws/2004/10/wscoor/Register"
> Content-Length: 1095
> 
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><Register
> <http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CRegister>
>
xmlns="http://schemas.xmlsoap.org/ws/2004/10/wscoor"><ProtocolIdentifier>http://big.tuwien.ac.at/ws-fbo--extensions/protocol/initiator</ProtocolIdentifier><ParticipantProtocolService><ns1:Address<http://schemas.xmlsoap.org/ws/2004/10/wscoor%22%3E%3CProtocolIdentifier%3Ehttp://big.tuwien.ac.at/ws-fbo--extensions/protocol/initiator%3C/ProtocolIdentifier%3E%3CParticipantProtocolService%3E%3Cns1:Address>absoluteURI="true"
> genericURI="true" host="localhost"
> path="/axis/services/initiator" port="8281" scheme="http"
> schemeSpecificPart="//localhost:8281/axis/services/initiator"
> xmlns:ns1="
>
http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:8281/axis/services/initiator</ns1:Address><ns2:ReferenceProperties
>
<http://schemas.xmlsoap.org/ws/2004/08/addressing%22%3Ehttp://localhost:8281/axis/services/initiator%3C/ns1:Address%3E%3Cns2:ReferenceProperties>
> xmlns:ns2="
>
http://schemas.xmlsoap.org/ws/2004/08/addressing"><ns3:CallbackRef<http://schemas.xmlsoap.org/ws/2004/08/addressing%22%3E%3Cns3:CallbackRef>xmlns:ns3="http://ws.apache.org/kandula">1234567899635214789</ns3:CallbackRef></ns2:ReferenceProperties><ns4:ReferenceParameters<http://ws.apache.org/kandula%22%3E1234567899635214789%3C/ns3:CallbackRef%3E%3C/ns2:ReferenceProperties%3E%3Cns4:ReferenceParameters>xmlns:ns4="http://schemas.xmlsoap.org/ws/2004/08/addressing"/></ParticipantProtocolService></Register></soapenv:Body></soapenv:Envelope<http://schemas.xmlsoap.org/ws/2004/08/addressing%22/%3E%3C/ParticipantProtocolService%3E%3C/Register%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope>
> >
> ---------------------------
>     From the soap content.I know if maybe because the soap content lack
> soapheader which include the CALLBACK_REF.But I don't know which config-file
> or which things relate with the CallbackRegistry.CALLBACK_REF.So I can't
> solve the problem.Can you help me ?
>    Thank you very much.
> 
> -- 
>                ÈÄÖñΰ
> ±±¾©Óʵç´óѧ PCN&CADÖÐÐÄ
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org


Re: problem about kandula

Posted by Hannes Erven <ha...@erven.at>.
Hi 竹伟饶,


can you please explain to us what you are trying to do? Depending on
what application type you develop the answers might differ.

I know that the WSBA sample is not yet very well documented as an
introduction into Kandula, but this will follow.

In short, all you should need to do is:

coordIProxy = AtomicCoordinatorIProxy.createNewContext_WithWSBAI();
	or
coordIProxy = MixedCoordinatorIProxy.createNewContext_WithWSBAI();


This will activate the WSBA context and register the coordinator
instance for you.


In what line of your source is the nullpointer exception thrown? I'm
asking because in the source you check for coordinatorPort being null
without having the variable declared or assigned.

Your source seems to take on the initiator as well as the participant
roles, so I'm a bit confused what you are trying to do.



Best regards,

	-hannes

---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org


Re: problem about kandula

Posted by Hannes Erven <ha...@erven.at>.
Hi 竹伟饶,


at a second look at the SOAP message you included, there are all the
WS-Addressing things missing. I guess you did not include the
client-config.wsdd file in the classpath of your client application, and
that's why the transaction identifier is missing in the register request.

But again, please tell us what you are trying to do. It seems you
invented a new protocol identifier, on the big.tuwien.ac.at name space?


-hannes

---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org