You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by nate roe <ph...@gmail.com> on 2008/02/13 18:26:25 UTC

Where's my WSDL?

I'm using ServiceMix 3.2.1, and Java 1.6

I've attempted to create a WebService using a POJO deployed to ServiceMix's
HTTP component.  When I hit ServiceMix at http://localhost:8192/ my service
is shown, but when I attempt to view its WSDL, I receive a 404.  (When
ServiceMix deploys my SA, however, it writes the WSDL to stdout.)

Here's the .java file I've written:

package com.test;

import javax.jws.WebService;
import javax.xml.ws.Holder;

@WebService(serviceName = "HelloService", targetNamespace = "myNamespace",
endpointInterface = "com.test.HelloService")
public class HelloService {

	public HelloService() {
	}

	public String getHello() {
		return "Hello World!";
	}
}

Here's the xbean.xml for my SU:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0">

    <jsr181:endpoint pojoClass="com.test.HelloService" />

</beans>

Here's the xbean.xml for the servicemix-http SU:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0">

  <http:endpoint service="myNamespace:HelloService"
                 endpoint="soap"
                 targetService="person:HelloService"
                 role="consumer" 
                 locationURI="http://0.0.0.0:8192/HelloService/"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                 soap="true" />

</beans>

Here is the jbi.xml for my SA:
<?xml version="1.0" encoding="UTF-8"?>
<jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0">
  <service-assembly>
    <identification>
      <name>hello-sa</name>
      <description>ServiceMix :: Samples :: WSDL first :: SA</description>
    </identification>
    <service-unit>
      <identification>
        <name>hello-su</name>
        <description>ServiceMix is an open source ESB based on the Java
Business
    Integration framework - JSR-208</description>
      </identification>
      <target>
        <artifacts-zip>hello-su.zip</artifacts-zip>
        <component-name>servicemix-jsr181</component-name>
      </target>
    </service-unit>
    <service-unit>
      <identification>
        <name>hello-http-su</name>
        <description>ServiceMix is an open source ESB based on the Java
Business
    Integration framework - JSR-208</description>
      </identification>
      <target>
        <artifacts-zip>hello-http-su.zip</artifacts-zip>
        <component-name>servicemix-http</component-name>
      </target>
    </service-unit>
  </service-assembly>
</jbi>


This is from the ServiceMix stdout when attempting to retrieve the WSDL:
DEBUG - JettyContextManager            - Dispatching job:
SCEP@16068084[d=true,io=0,w=true,b=false|false]
DEBUG - ConsumerProcessor              - Receiving HTTP request: GET
/HelloService/?wsdl HTTP/1.1
Host: vegas1874:8192
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11)
Gecko/20071127 Firefox/2.0.0.11
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8192/


DEBUG - JettyContextManager            - Dispatching job:
SCEP@16068084[d=true,io=1,w=true,b=false|false]
DEBUG - ConsumerProcessor              - Receiving HTTP request: GET
/HelloService/main.wsdl HTTP/1.1
Host: vegas1874:8192
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11)
Gecko/2
0071127 Firefox/2.0.0.11
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8192/


DEBUG - HttpComponent                  - Retrieving proxied endpoint
definition
DEBUG - HttpComponent                  - Could not retrieve endpoint for
targetService
DEBUG - HttpComponent                  - Could not retrieve endpoint for
service/endpoint


I suspect that my endpoint and my service are not specified quite right, but
I don't see the problem.
-- 
View this message in context: http://www.nabble.com/Where%27s-my-WSDL--tp15460599s12049p15460599.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Where's my WSDL?

Posted by Bruce Snyder <br...@gmail.com>.
On Thu, Feb 14, 2008 at 12:34 PM, nate roe <ph...@gmail.com> wrote:
>
>
>  I'm sorry; I misstated.  My SA deploys without error.
>
>  I meant to say that although my modified wsdl-first SA returns a
>  dynamically-generated WSDL, my own hello world SA which is intended to be
>  modeled after the wsdl-first example does not.

OK, so what's the difference between the two? The wsdl-first example
uses static WSDL.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Where's my WSDL?

Posted by nate roe <ph...@gmail.com>.

I'm sorry; I misstated.  My SA deploys without error.

I meant to say that although my modified wsdl-first SA returns a
dynamically-generated WSDL, my own hello world SA which is intended to be
modeled after the wsdl-first example does not.


bsnyder wrote:
> 
> On Thu, Feb 14, 2008 at 10:34 AM, nate roe <ph...@gmail.com> wrote:
>>
>>
>>  That's why I said, "after removing the WSDL from the zip."  I have
>> removed
>>  entirely the static WSDL file from the wsdl-first example, and it still
>>  deploys correctly.  Why doesn't mine?
> 
> So now your SA won't deploy correctly? Are you seeing errors?
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Where%27s-my-WSDL--tp15460599s12049p15487413.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Where's my WSDL?

Posted by Bruce Snyder <br...@gmail.com>.
On Thu, Feb 14, 2008 at 10:34 AM, nate roe <ph...@gmail.com> wrote:
>
>
>  That's why I said, "after removing the WSDL from the zip."  I have removed
>  entirely the static WSDL file from the wsdl-first example, and it still
>  deploys correctly.  Why doesn't mine?

So now your SA won't deploy correctly? Are you seeing errors?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Where's my WSDL?

Posted by nate roe <ph...@gmail.com>.

That's why I said, "after removing the WSDL from the zip."  I have removed
entirely the static WSDL file from the wsdl-first example, and it still
deploys correctly.  Why doesn't mine?

Here's my wsdl-first SU:

>jar -tvf wsdl-first-jsr181-su-3.2.1.zip
     0 Thu Feb 14 09:31:36 PST 2008 META-INF/
   106 Thu Feb 14 09:31:34 PST 2008 META-INF/MANIFEST.MF
     0 Thu Feb 14 09:31:36 PST 2008 org/
     0 Thu Feb 14 09:31:36 PST 2008 org/apache/
     0 Thu Feb 14 09:31:36 PST 2008 org/apache/servicemix/
     0 Thu Feb 14 09:31:36 PST 2008 org/apache/servicemix/samples/
     0 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/
     0 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/types/
  1412 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/Person.class
  1776 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/PersonImpl.class
  5149 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/PersonServiceClient.class
  1297 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/PersonServiceImpl.class
  1374 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/UnknownPersonFault.class
   978 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/types/GetPerson.class
  1404 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/types/GetPersonResponse.class
  1131 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/types/ObjectFactory.class
  1014 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/types/UnknownPersonFault.class
   385 Thu Feb 14 09:31:36 PST 2008
org/apache/servicemix/samples/wsdl_first/types/package-info.class
  1023 Thu Feb 14 09:31:36 PST 2008 xbean.xml


bsnyder wrote:
> 
> On Feb 13, 2008 5:43 PM, nate roe <ph...@gmail.com> wrote:
>>
>>
>> bsnyder wrote:
>> >
>> > Yes, and that's all going to work just fine. However, you started this
>> > discussion by saying you weren't able to access the WSDL and I
>> > explained why.
>> >
>>
>> I guess the part that I don't understand is that a query for the WSDL
>> from
>> "wsdl-first" example (after removing the WSDL from the zip) still returns
>> a
>> WSDL generated by the JSR181 component.  However, my hello project fails
>> to
>> retrieve a WSDL.
> 
> Because the WSDL in the wsdl-first example is static. It's not
> dynamically generated by ServiceMix.
> 
>> With the SA deployed, an HTTP request for the "wsdl-first" example's WSDL
>> (http://localhost:8192/PersonService/main.wsdl) logs the following (after
>> the Jetty logs HTTP request):
>> DEBUG - HttpComponent                  - Retrieving proxied endpoint
>> definition
>> DEBUG - Jsr181Component                - Querying service description for
>> ServiceEndpoint[service={http://servicemix.apache.org/samples/wsdl-first}PersonService,endpoint=PersonServiceJBIPort]
>> DEBUG - HttpComponent                  - WSDL only defines a PortType,
>> using
>> this one
>>
>> The last line might indicate that the automatically generated WSDL for
>> this
>> SA also does not contain a wsdl:port name (maybe?)  Anyway, the part of
>> this
>> that stands out to me is the second line, where
>> endpoint=PersonServiceJBIPort.  I've grepped for "PersonServiceJBIPort"
>> but
>> did not find it in any source file (neither Java nor the XML files.)
> 
> That's the thing - the WSDL is *not* automatically generated, it's
> static. See the WSDL here the following directory:
> 
> wsdl-first/wsdl-first-jsr181-su/src/main/resources/person.wsdl
> 
>> A similar request for my "hello" project's WSDL fails:
>> DEBUG - HttpComponent                  - Retrieving proxied endpoint
>> definition
>> DEBUG - HttpComponent                  - Could not retrieve endpoint for
>> targetService
>> DEBUG - HttpComponent                  - Could not retrieve endpoint for
>> service/endpoint
>>
>> I'm trying to understand what I've (accidentally) done differently that
>> causes the endpoint not to be found.  Generating a static WSDL may be the
>> correct approach in the long run, but right now I'd like to understand
>> why a
>> WSDL is generated in one case yet not in the other.
> 
> This is because you have not provided a WSDL file.
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Where%27s-my-WSDL--tp15460599s12049p15482845.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Where's my WSDL?

Posted by Bruce Snyder <br...@gmail.com>.
On Feb 13, 2008 5:43 PM, nate roe <ph...@gmail.com> wrote:
>
>
> bsnyder wrote:
> >
> > Yes, and that's all going to work just fine. However, you started this
> > discussion by saying you weren't able to access the WSDL and I
> > explained why.
> >
>
> I guess the part that I don't understand is that a query for the WSDL from
> "wsdl-first" example (after removing the WSDL from the zip) still returns a
> WSDL generated by the JSR181 component.  However, my hello project fails to
> retrieve a WSDL.

Because the WSDL in the wsdl-first example is static. It's not
dynamically generated by ServiceMix.

> With the SA deployed, an HTTP request for the "wsdl-first" example's WSDL
> (http://localhost:8192/PersonService/main.wsdl) logs the following (after
> the Jetty logs HTTP request):
> DEBUG - HttpComponent                  - Retrieving proxied endpoint
> definition
> DEBUG - Jsr181Component                - Querying service description for
> ServiceEndpoint[service={http://servicemix.apache.org/samples/wsdl-first}PersonService,endpoint=PersonServiceJBIPort]
> DEBUG - HttpComponent                  - WSDL only defines a PortType, using
> this one
>
> The last line might indicate that the automatically generated WSDL for this
> SA also does not contain a wsdl:port name (maybe?)  Anyway, the part of this
> that stands out to me is the second line, where
> endpoint=PersonServiceJBIPort.  I've grepped for "PersonServiceJBIPort" but
> did not find it in any source file (neither Java nor the XML files.)

That's the thing - the WSDL is *not* automatically generated, it's
static. See the WSDL here the following directory:

wsdl-first/wsdl-first-jsr181-su/src/main/resources/person.wsdl

> A similar request for my "hello" project's WSDL fails:
> DEBUG - HttpComponent                  - Retrieving proxied endpoint
> definition
> DEBUG - HttpComponent                  - Could not retrieve endpoint for
> targetService
> DEBUG - HttpComponent                  - Could not retrieve endpoint for
> service/endpoint
>
> I'm trying to understand what I've (accidentally) done differently that
> causes the endpoint not to be found.  Generating a static WSDL may be the
> correct approach in the long run, but right now I'd like to understand why a
> WSDL is generated in one case yet not in the other.

This is because you have not provided a WSDL file.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Where's my WSDL?

Posted by nate roe <ph...@gmail.com>.

bsnyder wrote:
> 
> Yes, and that's all going to work just fine. However, you started this
> discussion by saying you weren't able to access the WSDL and I
> explained why.
> 

I guess the part that I don't understand is that a query for the WSDL from
"wsdl-first" example (after removing the WSDL from the zip) still returns a
WSDL generated by the JSR181 component.  However, my hello project fails to
retrieve a WSDL.

With the SA deployed, an HTTP request for the "wsdl-first" example's WSDL
(http://localhost:8192/PersonService/main.wsdl) logs the following (after
the Jetty logs HTTP request):
DEBUG - HttpComponent                  - Retrieving proxied endpoint
definition
DEBUG - Jsr181Component                - Querying service description for
ServiceEndpoint[service={http://servicemix.apache.org/samples/wsdl-first}PersonService,endpoint=PersonServiceJBIPort]
DEBUG - HttpComponent                  - WSDL only defines a PortType, using
this one

The last line might indicate that the automatically generated WSDL for this
SA also does not contain a wsdl:port name (maybe?)  Anyway, the part of this
that stands out to me is the second line, where
endpoint=PersonServiceJBIPort.  I've grepped for "PersonServiceJBIPort" but
did not find it in any source file (neither Java nor the XML files.)

A similar request for my "hello" project's WSDL fails:
DEBUG - HttpComponent                  - Retrieving proxied endpoint
definition
DEBUG - HttpComponent                  - Could not retrieve endpoint for
targetService
DEBUG - HttpComponent                  - Could not retrieve endpoint for
service/endpoint

I'm trying to understand what I've (accidentally) done differently that
causes the endpoint not to be found.  Generating a static WSDL may be the
correct approach in the long run, but right now I'd like to understand why a
WSDL is generated in one case yet not in the other.
-- 
View this message in context: http://www.nabble.com/Where%27s-my-WSDL--tp15460599s12049p15471600.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Where's my WSDL?

Posted by Bruce Snyder <br...@gmail.com>.
On Feb 13, 2008 4:20 PM, nate roe <ph...@gmail.com> wrote:
>
>
> That will generate static WSDL, correct?  I had hoped that ServiceMix would
> automatically create this WSDL dynamically on deployment.  Is that possible?

Not something that will be complete enough to be usable. It's always
best to generate static WSDL from your annotated Java classes or
create it using some other tool.

> A couple of days ago I did successfully invert the wsdl-first example (to
> create a code-first variant.)  To do this, I copied all of the Java files
> from the wsdl-first example (mostly generated by Maven, except for
> Person.java.)  I made a new project with these files.  I then used Ant, with
> Axis' java2wsdl task to generate a WSDL.  Then I zipped up my SU and my SA
> (along with unmodified wsdl-first-http-su-3.2.1.zip) using the unmodified
> xbean.xml and jbi.xml.  This SA deployed and performed exactly as the
> wsdl-first demo had.  I then deleted the WSDL generation step from my Ant
> script so that it instead just compiles and zips.  This new, WSDL-less SA
> also deployed and performed exactly as the wsdl-first demo had.  This is why
> I wanted to try to create a POJO-based service without any pre-built WSDL.
> It appears that ServiceMix can in at least some circumstance deal without
> it.

Yes, and that's all going to work just fine. However, you started this
discussion by saying you weren't able to access the WSDL and I
explained why.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Where's my WSDL?

Posted by nate roe <ph...@gmail.com>.

That will generate static WSDL, correct?  I had hoped that ServiceMix would
automatically create this WSDL dynamically on deployment.  Is that possible?

A couple of days ago I did successfully invert the wsdl-first example (to
create a code-first variant.)  To do this, I copied all of the Java files
from the wsdl-first example (mostly generated by Maven, except for
Person.java.)  I made a new project with these files.  I then used Ant, with
Axis' java2wsdl task to generate a WSDL.  Then I zipped up my SU and my SA
(along with unmodified wsdl-first-http-su-3.2.1.zip) using the unmodified
xbean.xml and jbi.xml.  This SA deployed and performed exactly as the
wsdl-first demo had.  I then deleted the WSDL generation step from my Ant
script so that it instead just compiles and zips.  This new, WSDL-less SA
also deployed and performed exactly as the wsdl-first demo had.  This is why
I wanted to try to create a POJO-based service without any pre-built WSDL. 
It appears that ServiceMix can in at least some circumstance deal without
it.


bsnyder wrote:
> 
> On Feb 13, 2008 3:38 PM, nate roe <ph...@gmail.com> wrote:
>>
>>
>> I see.
>>
>> This WSDL was generated automatically by ServiceMix, somehow.   I noticed
>> with the "WSDL first" example that the WSDL didn't necessarily need to be
>> included in the service assembly; that ServiceMix somehow generates a
>> WSDL
>> for it.  I assume this is because the web service's SU's xbean.xml uses
>> the
>> jsr181:endpoint tag to specify a POJO class.  I then created this "hello
>> world" project  based on what I learned from that sample, hoping to use
>> POJOs to create Web Services.
>>
>> So when I deploy my SA, ServiceMix generates the WSDL below and writes it
>> to
>> stdout.
> 
> OK, well you're going to need to configure the pom.xml in the JSR181
> SU to use the xfire-maven-plugin to generate the WSDL from the Java
> class. Then you'll get a complete WSDL that can be used. If you've
> looked at the wsdl-first example, then you should have already seen
> the person.wsdl file the JSR181 SU. This was generated by the
> xfire-maven-plugin. Take a look at the pom.xml for the JSR181 SU
> project to see an example of how to use the xfire-maven-plugin to
> generate WSDL. Your configuration will be slightly different, however,
> because you're generating WSDL from a Java class; this is a paradigm
> called code-first instead of WSDL-first.
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Where%27s-my-WSDL--tp15460599s12049p15470475.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Where's my WSDL?

Posted by Bruce Snyder <br...@gmail.com>.
On Feb 13, 2008 3:38 PM, nate roe <ph...@gmail.com> wrote:
>
>
> I see.
>
> This WSDL was generated automatically by ServiceMix, somehow.   I noticed
> with the "WSDL first" example that the WSDL didn't necessarily need to be
> included in the service assembly; that ServiceMix somehow generates a WSDL
> for it.  I assume this is because the web service's SU's xbean.xml uses the
> jsr181:endpoint tag to specify a POJO class.  I then created this "hello
> world" project  based on what I learned from that sample, hoping to use
> POJOs to create Web Services.
>
> So when I deploy my SA, ServiceMix generates the WSDL below and writes it to
> stdout.

OK, well you're going to need to configure the pom.xml in the JSR181
SU to use the xfire-maven-plugin to generate the WSDL from the Java
class. Then you'll get a complete WSDL that can be used. If you've
looked at the wsdl-first example, then you should have already seen
the person.wsdl file the JSR181 SU. This was generated by the
xfire-maven-plugin. Take a look at the pom.xml for the JSR181 SU
project to see an example of how to use the xfire-maven-plugin to
generate WSDL. Your configuration will be slightly different, however,
because you're generating WSDL from a Java class; this is a paradigm
called code-first instead of WSDL-first.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Where's my WSDL?

Posted by nate roe <ph...@gmail.com>.

I see.

This WSDL was generated automatically by ServiceMix, somehow.   I noticed
with the "WSDL first" example that the WSDL didn't necessarily need to be
included in the service assembly; that ServiceMix somehow generates a WSDL
for it.  I assume this is because the web service's SU's xbean.xml uses the
jsr181:endpoint tag to specify a POJO class.  I then created this "hello
world" project  based on what I learned from that sample, hoping to use
POJOs to create Web Services.

So when I deploy my SA, ServiceMix generates the WSDL below and writes it to
stdout.


bsnyder wrote:
> 
> On Feb 13, 2008 12:20 PM, nate roe <ph...@gmail.com> wrote:
>>
>> My WSDL doesn't have a port in it, although there is a wsdl:portType.
>>
>> I'm confused about endpoints.  When I specify the endpoint, what am I
>> specifying?  An existing endpoint?  Or am I, in creating a service, also
>> creating a new endpoint which I must name?  (The endpoint name "soap" I
>> copied from the wsdl-first tutorial's xbean.xml)
> 
> The endpoint name is the endpoint that you're deploying for the
> service. The same service can be deployed multiple times with
> different endpoint names in JBI. And in the servicemix-http component,
> the endpoint name should match the wsdl:port name. Which brings me to
> your WSDL below.
> 
>> Here is the generated WSDL:
>>
>> <wsdl:definitions targetNamespace="myNamespace"
>> xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"
>> xmlns:tns="myNamespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
>>     <wsdl:types>
>>         <xsd:schema attributeFormDefault="qualified"
>> elementFormDefault="qualified" targetNamespace="myNamespace"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>             <xsd:element name="getHello">
>>                 <xsd:complexType/>
>>             </xsd:element>
>>             <xsd:element name="getHelloResponse">
>>                 <xsd:complexType>
>>                     <xsd:sequence>
>>                         <xsd:element maxOccurs="1" minOccurs="1"
>> name="out"
>> nillable="true" type="xsd:string"/>
>>                     </xsd:sequence>
>>                 </xsd:complexType>
>>             </xsd:element>
>>         </xsd:schema>
>>     </wsdl:types>
>>     <wsdl:message name="getHelloResponse">
>>         <wsdl:part name="parameters" element="tns:getHelloResponse">
>>         </wsdl:part>
>>     </wsdl:message>
>>     <wsdl:message name="getHelloRequest">
>>         <wsdl:part name="parameters" element="tns:getHello">
>>         </wsdl:part>
>>     </wsdl:message>
>>     <wsdl:portType name="HelloServicePortType">
>>         <wsdl:operation name="getHello">
>>             <wsdl:input name="getHelloRequest"
>> message="tns:getHelloRequest">
>>             </wsdl:input>
>>             <wsdl:output name="getHelloResponse"
>> message="tns:getHelloResponse">
>>             </wsdl:output>
>>         </wsdl:operation>
>>     </wsdl:portType>
>> </wsdl:definitions>
> 
> How was this WSDL generated?
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Where%27s-my-WSDL--tp15460599s12049p15469506.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Where's my WSDL?

Posted by Bruce Snyder <br...@gmail.com>.
On Feb 13, 2008 12:20 PM, nate roe <ph...@gmail.com> wrote:
>
> My WSDL doesn't have a port in it, although there is a wsdl:portType.
>
> I'm confused about endpoints.  When I specify the endpoint, what am I
> specifying?  An existing endpoint?  Or am I, in creating a service, also
> creating a new endpoint which I must name?  (The endpoint name "soap" I
> copied from the wsdl-first tutorial's xbean.xml)

The endpoint name is the endpoint that you're deploying for the
service. The same service can be deployed multiple times with
different endpoint names in JBI. And in the servicemix-http component,
the endpoint name should match the wsdl:port name. Which brings me to
your WSDL below.

> Here is the generated WSDL:
>
> <wsdl:definitions targetNamespace="myNamespace"
> xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"
> xmlns:tns="myNamespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
>     <wsdl:types>
>         <xsd:schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="myNamespace"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>             <xsd:element name="getHello">
>                 <xsd:complexType/>
>             </xsd:element>
>             <xsd:element name="getHelloResponse">
>                 <xsd:complexType>
>                     <xsd:sequence>
>                         <xsd:element maxOccurs="1" minOccurs="1" name="out"
> nillable="true" type="xsd:string"/>
>                     </xsd:sequence>
>                 </xsd:complexType>
>             </xsd:element>
>         </xsd:schema>
>     </wsdl:types>
>     <wsdl:message name="getHelloResponse">
>         <wsdl:part name="parameters" element="tns:getHelloResponse">
>         </wsdl:part>
>     </wsdl:message>
>     <wsdl:message name="getHelloRequest">
>         <wsdl:part name="parameters" element="tns:getHello">
>         </wsdl:part>
>     </wsdl:message>
>     <wsdl:portType name="HelloServicePortType">
>         <wsdl:operation name="getHello">
>             <wsdl:input name="getHelloRequest"
> message="tns:getHelloRequest">
>             </wsdl:input>
>             <wsdl:output name="getHelloResponse"
> message="tns:getHelloResponse">
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:portType>
> </wsdl:definitions>

How was this WSDL generated?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Where's my WSDL?

Posted by nate roe <ph...@gmail.com>.
My WSDL doesn't have a port in it, although there is a wsdl:portType.

I'm confused about endpoints.  When I specify the endpoint, what am I
specifying?  An existing endpoint?  Or am I, in creating a service, also
creating a new endpoint which I must name?  (The endpoint name "soap" I
copied from the wsdl-first tutorial's xbean.xml)

Here is the generated WSDL:

<wsdl:definitions targetNamespace="myNamespace"
xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"
xmlns:tns="myNamespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <wsdl:types>
        <xsd:schema attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="myNamespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:element name="getHello">
                <xsd:complexType/>
            </xsd:element>
            <xsd:element name="getHelloResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element maxOccurs="1" minOccurs="1" name="out"
nillable="true" type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="getHelloResponse">
        <wsdl:part name="parameters" element="tns:getHelloResponse">
        </wsdl:part>
    </wsdl:message>
    <wsdl:message name="getHelloRequest">
        <wsdl:part name="parameters" element="tns:getHello">
        </wsdl:part>
    </wsdl:message>
    <wsdl:portType name="HelloServicePortType">
        <wsdl:operation name="getHello">
            <wsdl:input name="getHelloRequest"
message="tns:getHelloRequest">
            </wsdl:input>
            <wsdl:output name="getHelloResponse"
message="tns:getHelloResponse">
            </wsdl:output>
        </wsdl:operation>
    </wsdl:portType>
</wsdl:definitions>


bsnyder wrote:
> 
> On Feb 13, 2008 10:26 AM, nate roe <ph...@gmail.com> wrote:
>>
>> I'm using ServiceMix 3.2.1, and Java 1.6
>>
>> I've attempted to create a WebService using a POJO deployed to
>> ServiceMix's
>> HTTP component.  When I hit ServiceMix at http://localhost:8192/ my
>> service
>> is shown, but when I attempt to view its WSDL, I receive a 404.  (When
>> ServiceMix deploys my SA, however, it writes the WSDL to stdout.)
> 
> A 404 when trying to access the WSDL is almost always due to the fact
> that the endpoint name in the xbean.xml does not match the wsdl:port
> name attribute. I see that the endpoint name in your xbean.xml above
> is soap. So what is the wsdl:port name in the generated WSDL?
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Where%27s-my-WSDL--tp15460599s12049p15464877.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Where's my WSDL?

Posted by Bruce Snyder <br...@gmail.com>.
On Feb 13, 2008 10:26 AM, nate roe <ph...@gmail.com> wrote:
>
> I'm using ServiceMix 3.2.1, and Java 1.6
>
> I've attempted to create a WebService using a POJO deployed to ServiceMix's
> HTTP component.  When I hit ServiceMix at http://localhost:8192/ my service
> is shown, but when I attempt to view its WSDL, I receive a 404.  (When
> ServiceMix deploys my SA, however, it writes the WSDL to stdout.)

A 404 when trying to access the WSDL is almost always due to the fact
that the endpoint name in the xbean.xml does not match the wsdl:port
name attribute. I see that the endpoint name in your xbean.xml above
is soap. So what is the wsdl:port name in the generated WSDL?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/