bsnyder wrote:
>
>>> private boolean invokeIdentityService() throws MessagingException {
>>> ComponentContext ctx =
>>> getServiceUnit().getComponent().getComponentContext();
>>> QName identityService = new QName("NSR:NSRService", "service");
>>>
>>> InOut identityExchange = exchangeFactory.createInOutExchange();
>>> configureTarget("Identity Service", identityExchange, ctx,
>>> null, identityService, "soap", "");
>>>
>>> NormalizedMessage in = identityExchange.createMessage();
>>> in.setContent(new StringSource("<hello>Testing</hello>"));
>>> 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;
>>> }
>>>
>>> public void configureTarget(String serviceDesc, MessageExchange
>>> exchange, ComponentContext context, QName _interface, QName service,
>>> String endpoint, String uri) throws MessagingException {
>>> if (_interface == null && service == null && uri == null) {
>>> throw new MessagingException(serviceDesc + ": interface,
>>> service or uri should be specified");
>>> }
>>>
>>> if (_interface != null) {
>>> exchange.setInterfaceName(_interface);
>>> }
>>>
>>> if (service != null) {
>>> exchange.setService(service);
>>> if (endpoint != null) {
>>> ServiceEndpoint se = context.getEndpoint(service,
>>> endpoint);
>>> exchange.setEndpoint(se);
>>> }
>>> }
>>> }
>>>
>>> ERROR - MyComponent - Caught exception while polling:
>>> java.lang.NullPointerException
>>> java.lang.NullPointerException
>>> at
>>> org.apache.servicemix.common.endpoints.SimpleEndpoint.sendSync(SimpleEndpoint.java:71)
>>> at
>>> org.apache.servicemix.samples.serviceManagerAssembly.MyEndpoint.invokeIdentityService(MyEndpoint.java:289)
>>> at
>>> org.apache.servicemix.samples.serviceManagerAssembly.MyEndpoint.poll(MyEndpoint.java:274)
>>> at
>
>> I'm not sure, but I'm guessing that these are your classes above.
>> Where are lines 289 and 274 exactly?
>
>
289 is the line that says sendSync(identityExchange);
274 is the line that says invokeIdentityService();
--
View this message in context:
http://www.nabble.com/SE-that-continually-reads-and-sends-data-tf3764809s12049.html#a10658265
Sent from the ServiceMix - User mailing list archive at Nabble.com.