Can you confirm that the null value for the channel property is causing the
NPE ?
In such a case, you should check that you have called the base class methods
if you
overrode some ... and try to set a breakpoint in the parent class to make
sure the channel
is correctly initialized.
On 5/28/07, Benamin <[EMAIL PROTECTED]> wrote:
Well, I am still trying to get an SE to send a message to an HTTP
provider.
This is my one missing part. I have debugged through my code, but I
cannot
figure out what is causing the NULL pointer exception.
I have been going with trying to set the service,endpoint with this
method:
public void configureTarget(String serviceDesc, MessageExchange
exchange, ComponentContext context, QName _interface, QName myService,
String myEndpoint, String uri) throws MessagingException {
if (_interface == null && myService == null && uri == null) {
throw new MessagingException(serviceDesc + ": interface,
service or uri should be specified");
}
if (_interface != null) {
exchange.setInterfaceName(_interface);
}
if (myService != null) {
exchange.setService(myService);
if (myEndpoint != null) {
ServiceEndpoint se = context.getEndpoint(myService,
myEndpoint);
exchange.setEndpoint(se);
}
}
}
It appears through debugging that the service,endpoint is getting set. I
am
using the following method in attempt to send the message to the http
provider:
private boolean invokeIdentityService() throws MessagingException {
ComponentContext ctx =
getServiceUnit().getComponent().getComponentContext();
QName identityService = new
QName("http://tapestry.cgi.com/servicemanagerassembly",
"httpService");
InOut identityExchange = exchangeFactory.createInOutExchange();
configureTarget("Identity Service", identityExchange, ctx,
null, identityService, "soap", "");
NormalizedMessage in = identityExchange.createMessage();
in.setContent(new StringSource("Testing"));
identityExchange.setInMessage(in);
sendSync(identityExchange);
NormalizedMessage out = identityExchange.getOutMessage();
boolean login = false;
if (out != null) {
//login = support.parseIdentityOutMessage(out.getContent());
} else {
// TODO: how should we handle faults
}
done(identityExchange);
return login;
}
the line sendSync(identityExchange); is what is causing the NULL pointer
exception. invokeIdentityService is called from the start method of the
SE.
The xbean for my http provider is below:
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:sm="http://tapestry.cgi.com/servicemanagerassembly">
<http:endpoint service="sm:httpService"
endpoint="soap"
role="provider"
locationURI="http://localhost:8192/NSRService/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true"
wsdlResource="http://localhost:8192/NSRService/main.wsdl"
/>
</beans>
Is there anything else anybody knows to try? I am creating the QName
correctly? I am getting the namespace and service from the http provider.
Thanks.
--
View this message in context:
http://www.nabble.com/SE-that-continually-reads-and-sends-data-tf3764809s12049.html#a10839585
Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/