You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by KenBarnesJr <ke...@tkctech.com> on 2008/12/22 15:20:16 UTC

jsr181 auto generation

I have a http-consumer that looks like 

<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:jsr="urn:barnes:jsr">


  <http:endpoint service="jsr:TestService"
                 endpoint="myProvider"
                 role="consumer"
		 targetEndpoint="jsr:TestServiceJBIPort" 
                 locationURI="http://0.0.0.0:8192/TestService/"
		 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                 soap="true"
                 />             
</beans>

and a jsr-181 bean 

<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
       xmlns:jsr="urn:barnes:jsr">

    <jsr181:endpoint endpoint="testEndPoint"
pojoClass="barnes.jsr.TestService"/>

</beans>

with an annotated web service

@WebService(name = "TestService", targetNamespace = "urn:barnes:jsr")
public class TestService {

	@WebMethod
	public String sayHello(String name) {
		return "Hello "+name;
	}
}

In my jconsole i get endpoints that are 
{urn_barnes_jsr}TestServicemyProvider
{urn_barnes_jsr}TestServicetestEndPoint

but when i go to http://localhost:8192/TestService I get unable to find
requested resource 
RequestURI=/TestService/main.wsdl

In the wsdl-first example I see there is a wsdl file in the project that I
dont have.  Shouldnt the jsr-bean auto generate the wsdl and allow me to
point at it using targetService or targetEndpoint and why is it looking for
main.wsdl.  Thanks for any help.











-- 
View this message in context: http://www.nabble.com/jsr181-auto-generation-tp21128607p21128607.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: jsr181 auto generation

Posted by KenBarnesJr <ke...@tkctech.com>.
I havent written a  wsdl I thought that be pointing at the service that it
would pick up the wsdl from the web service... Im way off ??/
-- 
View this message in context: http://www.nabble.com/jsr181-auto-generation-tp21128607p21130617.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: jsr181 auto generation

Posted by KenBarnesJr <ke...@tkctech.com>.
All i want to do is not write a wsdl and have a http endpoint point at a
jsr-bean.   I have modified the xbean of http-su to resemble 

 <http:consumer service="jsr:TestService"
                 endpoint="jbi"
           	 targetService="jsr:ProviderService"
		 targetEndpoint="ep" 
                 locationURI="http://0.0.0.0:8192/TestService/"
                 />
  <http:provider service="jsr:ProviderService"
		 endpoint="ep"
		 locationURI="http://0.0.0.0:8192/TestService" 
                  />             

What do I have to do in order to get this to point at the jsr-181 su and
click on it from http://localhost:8192/TestService and not get an error.??
Do i need the patch?? Do i need to edit pom.xml of any project??
Thanks
-- 
View this message in context: http://www.nabble.com/jsr181-auto-generation-tp21128607p21130121.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: jsr181 auto generation

Posted by KenBarnesJr <ke...@tkctech.com>.
le  512 | Error processing exchange InOut[
  id: ID:192.168.1.1-11e5ef84718-10:5
  status: Active
  role: provider
  service: {urn:barnes:bean}BeanProService
  endpoint: be
  in: Unable to display: java.io.IOException: Stream closed
]
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
Premature end of file.
	at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)
	at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
	at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
	at
org.apache.servicemix.http.endpoints.DefaultHttpProviderMarshaler.createRequest(DefaultHttpProviderMarshaler.java:183)
	at
org.apache.servicemix.http.endpoints.HttpProviderEndpoint.process(HttpProviderEndpoint.java:202)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
	at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
	at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
	at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
	... 15 more
---------
org.xml.sax.SAXParseException: Premature end of file.
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
	at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
	at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
	at
org.apache.servicemix.http.endpoints.DefaultHttpProviderMarshaler.createRequest(DefaultHttpProviderMarshaler.java:183)
	at
org.apache.servicemix.http.endpoints.HttpProviderEndpoint.process(HttpProviderEndpoint.java:202)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
	at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
	at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(De |
WARN  | btpool0-1  | HttpComponent            |
mon.endpoints.ConsumerEndpoint  184 | Target service
({urn:barnes:bean}ExampleService) and endpoint (be) specified, but no
matching endpoint found.  Only the service will be used for routing.
-- 
View this message in context: http://www.nabble.com/jsr181-auto-generation-tp21128607p21134056.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: jsr181 auto generation

Posted by KenBarnesJr <ke...@tkctech.com>.
Thanks 
Which patch do I want to use and what do I do in order to use it?
-- 
View this message in context: http://www.nabble.com/jsr181-auto-generation-tp21128607p21129660.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: jsr181 auto generation

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Could you please send the complete stack trace ?

Thanks
JB

On Monday 22 December 2008 - 10:49, KenBarnesJr wrote:
> 
> I have placed 2008.02 in my parent pom.xml and I now get a SAXPaseException
> Premature end of file.
> 
> <http:consumer service="bt:BeanService"
>                  endpoint="jbi"
>            	 targetService="bt:ExampleService"
> 		 targetEndpoint="be" 
>                  locationURI="http://0.0.0.0:8192/BeanService/"
>                  />
>   <http:provider service="bt:BeanProService"
> 		 endpoint="be"
> 		 locationURI="http://0.0.0.0:8194/BeanService" 
>                   />             
> 
> @WebService(name = "ExampleService", targetNamespace = "urn:barnes:bean")
> public class ExampleService {
> 
> 	@WebMethod
> 	public String sayHello(String name) {
> 		return "Hello "+name;
> 	}
> }
> 
> How do I use the Patch to the http bc?? 
> 
> 
> 
> -- 
> View this message in context: http://www.nabble.com/jsr181-auto-generation-tp21128607p21132953.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 

-- 
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
jb@nanthrax.net
PGP : 17D4F086

Re: jsr181 auto generation

Posted by KenBarnesJr <ke...@tkctech.com>.
I have placed 2008.02 in my parent pom.xml and I now get a SAXPaseException
Premature end of file.

<http:consumer service="bt:BeanService"
                 endpoint="jbi"
           	 targetService="bt:ExampleService"
		 targetEndpoint="be" 
                 locationURI="http://0.0.0.0:8192/BeanService/"
                 />
  <http:provider service="bt:BeanProService"
		 endpoint="be"
		 locationURI="http://0.0.0.0:8194/BeanService" 
                  />             

@WebService(name = "ExampleService", targetNamespace = "urn:barnes:bean")
public class ExampleService {

	@WebMethod
	public String sayHello(String name) {
		return "Hello "+name;
	}
}

How do I use the Patch to the http bc?? 



-- 
View this message in context: http://www.nabble.com/jsr181-auto-generation-tp21128607p21132953.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.