Can you use wget or right click on the wsdl and browse the exact source ?
It seems you pasted the wsdl as displayed by IE, and that may be the reason
why some namesapce declarations are lost.

On Jan 15, 2008 2:05 PM, Andrea Zoppello <[EMAIL PROTECTED]> wrote:

> Hi,
>
> Just look at that code, and getTargetPortType *does not return null*
> it's correctly parsed.
>
> Below i paste the original wsdl ( that i attach to the service unit ),
> the xbean, and the wsdl that servicemix gives to me.
>
> In my opinion there's something that happens, when the wsdl is retrieved
> and returned to the client.
>
> I've found that when i deploy the sa the wsdl is saved with name
> *main.wsdl* inside SMX_HOME\data in my computer it's located in - (
> C:\Programmi\apache-
> servicemix-3.1.2\data\smx\service-assemblies\SimpelHttp_v_0\version_1\sus\servicemix-http\SimpelHttp_v_0-http-su\main.wsdl
> )
>
>
> If i look at this file it looks the same of mine, only the name is
> changed. For this reason it seems the error happen when this is take and
> returned to the client.
>
> Hope this help :-)
>
>
> Here my original wsdl ( SimpelHttp.starthttp_v_0.wsdl ):
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
> targetNamespace="urn:eng:spagic:processes:SimpelHttp:v0"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:spagic="urn:eng:spagic"
> xmlns:SimpelHttp_v_0="urn:eng:spagic:processes:SimpelHttp:v0"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>
> <wsdl:types>
> <xsd:schema elementFormDefault="qualified"
> targetNamespace="urn:eng:spagic">
> <xsd:element name="payload" type="xsd:anyType"/>
> <xsd:element name="response" type="xsd:anyType"/>
> </xsd:schema>
> </wsdl:types>
>
> <wsdl:message name="msgRequest">
> <wsdl:part element="spagic:payload" name="in"/>
> </wsdl:message>
>
> <wsdl:message name="msgResponse">
> <wsdl:part element="spagic:response" name="out"/>
> </wsdl:message>
>
> <wsdl:portType name="SimpelHttp.starthttp_v_0">
> <wsdl:operation name="run">
> <wsdl:input message="SimpelHttp_v_0:msgRequest" name="inRequest"/>
> <wsdl:output message="SimpelHttp_v_0:msgResponse" name="outResponse"/>
> </wsdl:operation>
> </wsdl:portType>
>
> <wsdl:binding name="SimpelHttp.starthttp_v_0Binding"
> type="SimpelHttp_v_0:SimpelHttp.starthttp_v_0">
> <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="run">
> <wsdlsoap:operation soapAction=""/>
> <wsdl:input name="inRequest">
> <wsdlsoap:body use="literal"/>
> </wsdl:input>
> <wsdl:output name="outResponse">
> <wsdlsoap:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
>
> <wsdl:service name="SimpelHttp.console_v_0">
> <wsdl:port binding="SimpelHttp_v_0:SimpelHttp.starthttp_v_0Binding"
> name="SimpelHttp.starthttp_v_0">
> <wsdlsoap:address location="http://0.0.0.0:9999/simplehttp/"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
> Here is the xbean.xml
>
> <?xml version="1.0"?>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0";
> xmlns:http="http://servicemix.apache.org/http/1.0";
> xmlns:SimpelHttp_v_0="urn:eng:spagic:processes:SimpelHttp:v0">
> <http:endpoint
> defaultMep="http://www.w3.org/2004/08/wsdl/in-only";
> service="SimpelHttp_v_0:SimpelHttp.console_v_0"
> endpoint="SimpelHttp.starthttp_v_0"
> role="consumer"
> locationURI="http://0.0.0.0:9999/simplehttp/";
> soap="true"
> soapVersion=""
> soapAction="1.2"
> wsdlResource="classpath:SimpelHttp.starthttp_v_0.wsdl "
>
>  >
>
> </http:endpoint>
>
>
> </beans>
>
> And at the end this is what servicemix give to me when i try
> "http://localhost:9999/simplehttp?wsdl";
> -
> <wsdl:definitions
> targetNamespace="urn:eng:spagic:processes:SimpelHttp:v0">
> -
> <wsdl:types>
> -
> <xsd:schema elementFormDefault="qualified"
> targetNamespace="urn:eng:spagic">
> <xsd:element name="payload" type="xsd:anyType"/>
> <xsd:element name="response" type="xsd:anyType"/>
> </xsd:schema>
> </wsdl:types>
> -
> <wsdl:message name="msgResponse">
> <wsdl:part element="spagic:response" name="out">
> </wsdl:part>
> </wsdl:message>
> -
> <wsdl:message name="msgRequest">
> <wsdl:part element="spagic:payload" name="in">
> </wsdl:part>
> </wsdl:message>
> -
> <wsdl:portType name="SimpelHttp.starthttp_v_0">
> -
> <wsdl:operation name="run">
> <wsdl:input message="SimpelHttp_v_0:msgRequest" name="inRequest">
> </wsdl:input>
> <wsdl:output message="SimpelHttp_v_0:msgResponse" name="outResponse">
> </wsdl:output>
> </wsdl:operation>
> </wsdl:portType>
> -
> <wsdl:binding name="SimpelHttp.starthttp_v_0Binding"
> type="SimpelHttp_v_0:SimpelHttp.starthttp_v_0">
> <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> -
> <wsdl:operation name="run">
> <wsdlsoap:operation soapAction=""/>
> -
> <wsdl:input name="inRequest">
> <wsdlsoap:body use="literal"/>
> </wsdl:input>
> -
> <wsdl:output name="outResponse">
> <wsdlsoap:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> -
> <wsdl:service name="SimpelHttp.console_v_0">
> -
> <wsdl:port binding="SimpelHttp_v_0:SimpelHttp.starthttp_v_0Binding"
> name="SimpelHttp.starthttp_v_0">
> <wsdlsoap:address location="http://0.0.0.0:9999/simplehttp/"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
> Guillaume Nodet ha scritto:
> > A junit test would be even better.
> > Looking briefly at the code, I'm wondering if the problem comes from the
> > HttpEndpoint#getTargetPortType method which is called at the beginning
> of
> > the overrideDefinition method.  If the getTargetPortType returns null,
> the
> > wsdl
> > loaded from the resource won't be used at all.
> > This may happen if there is a mismatch between the endpoint *target* and
> the
> > wsdl,
> > which may not be very obvious, as people may want to match the
>  *current*
> > endpoint
> > with the wsdl.
> > I guess the confusion comes from that point.  This code has been first
> > written to retrieve
> > the wsdl from the target endpoint and expose it, but if you specify the
> > endpoint, it still try
> > to match it with the target endpoint instead of the current one.
> > I'm not sure to be very clear, but if you paste your xbean.xml and wsdl,
> we
> > should be able
> > to find if this is the problem i'm talking about.
> >
> > On Jan 15, 2008 1:36 PM, Andrea Zoppello <[EMAIL PROTECTED]> wrote:
> >
> >
> >> Hi,
> >>
> >> Do you think it's possible to have a patch for this, i look into the
> >> code but it's quite complicate
> >> for me to do the patch.
> >>
> >> If you want i could open a JIRA issue! If it's needed and it's possible
> >> i could attach a basic service assembly to test this.
> >>
> >> Andrea
> >>
> >>
> >> Guillaume Nodet ha scritto:
> >>
> >>> Well, if the namespace are actually used by the wsdl, this means that
> >>> the wsdl is invalid, and I would certainly consider that a bug.
> >>>
> >>> On Jan 15, 2008 1:28 PM, Andrea Zoppello <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>
> >>>> Hi Guillaume,
> >>>>
> >>>> This is exactly my use case:
> >>>>
> >>>> 1) I want to configure an Http consumer endpoint using xbean.xml and
> >>>> attach to the service unit a wsdl file. i'm referring to wsdl with
> the
> >>>> wsdlResource Attribute in xbean.xml.
> >>>>
> >>>> What happens is that the wsdl generated by smx is
> >>>> not the same, i've deployed and referred in xbean file.
> >>>>
> >>>> The main difference is that, if i declared some custom namespace as
> the
> >>>> wsdl of the previous post, they're not in the wsdl generated by smx.
> In
> >>>> the wsdl that smx give to me there's only the target namespace!!
> >>>>
> >>>> Is this a bug??
> >>>>
> >>>> Andrea
> >>>> Guillaume Nodet ha scritto:
> >>>>
> >>>>
> >>>>> The best way is to use an xbean.xml and refer to the wsdl from
> there.
> >>>>> In such case, it *should* not change the wsdl, unless some
> parameters
> >>>>>
> >>>>>
> >>>> are
> >>>>
> >>>>
> >>>>> overriden in the endpoint definition from the xbean.xml.
> >>>>>
> >>>>> On Jan 15, 2008 11:43 AM, Andrea Zoppello <[EMAIL PROTECTED]>
> wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Hi All,
> >>>>>>
> >>>>>> If i understand well:
> >>>>>>
> >>>>>> 1) When  when you place a wsdl inside a servicemix-http service
> unit,
> >>>>>> servicemix will parse it
> >>>>>> and keep information about service
> >>>>>>
> >>>>>> 2) When you ask servicemix the wsdl with ?wsdl syntax servicemix
> >>>>>> autogenerate the wsdl with
> >>>>>> information stored.
> >>>>>>
> >>>>>> Is that right????
> >>>>>>
> >>>>>> After doing some debug, i find a way to write the wsdl so smx, map
> >>>>>>
> >>>>>>
> >>>> parse
> >>>>
> >>>>
> >>>>>> correctly the ServiceDefinition, the binding and the port type
> class,
> >>>>>> but i still have a big problem, if my original wsdl contains
> "custom
> >>>>>> namespace declaration" servicemix seem lost this information when
> you
> >>>>>> ask to generate wsdl with ?wsdl syntax??
> >>>>>>
> >>>>>> Has anyone the same problem??
> >>>>>>
> >>>>>> Thanks in advance.
> >>>>>>
> >>>>>> Andrea
> >>>>>>
> >>>>>> Here my wsdl:
> >>>>>> <?xml version="1.0" encoding="UTF-8"?>
> >>>>>> <wsdl:definitions
> >>>>>>        targetNamespace="urn:eng:spagic:processes:SimpelHttp:v0"
> >>>>>>        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> >>>>>>        xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> >>>>>>        xmlns:spagic="urn:eng:spagic"
> >>>>>>
>  xmlns:SimpelHttp_v_0="urn:eng:spagic:processes:SimpelHttp:v0"
> >>>>>>        xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> >>>>>>
> >>>>>>        <wsdl:types>
> >>>>>>            <xsd:schema elementFormDefault="qualified"
> >>>>>>                targetNamespace="urn:eng:spagic">
> >>>>>>                <xsd:element name="payload" type="xsd:anyType"/>
> >>>>>>                <xsd:element name="response" type="xsd:anyType"/>
> >>>>>>            </xsd:schema>
> >>>>>>        </wsdl:types>
> >>>>>>
> >>>>>>        <wsdl:message name="msgRequest">
> >>>>>>            <wsdl:part element="spagic:payload" name="in"/>
> >>>>>>        </wsdl:message>
> >>>>>>
> >>>>>>        <wsdl:message name="msgResponse">
> >>>>>>            <wsdl:part element="spagic:response" name="out"/>
> >>>>>>        </wsdl:message>
> >>>>>>
> >>>>>>        <wsdl:portType name="SimpelHttp.starthttp_v_0">
> >>>>>>            <wsdl:operation name="run">
> >>>>>>                <wsdl:input message="SimpelHttp_v_0:msgRequest"
> >>>>>> name="inRequest"/>
> >>>>>>                <wsdl:output message="SimpelHttp_v_0:msgResponse"
> >>>>>> name="outResponse"/>
> >>>>>>            </wsdl:operation>
> >>>>>>        </wsdl:portType>
> >>>>>>
> >>>>>>    <wsdl:binding name="SimpelHttp.starthttp_v_0Binding"
> >>>>>> type="SimpelHttp_v_0:SimpelHttp.starthttp_v_0">
> >>>>>>        <wsdlsoap:binding style="document"
> >>>>>>                  transport="http://schemas.xmlsoap.org/soap/http"/>
> >>>>>>        <wsdl:operation name="run">
> >>>>>>                <wsdlsoap:operation soapAction=""/>
> >>>>>>                <wsdl:input name="inRequest">
> >>>>>>                    <wsdlsoap:body use="literal"/>
> >>>>>>                </wsdl:input>
> >>>>>>                <wsdl:output name="outResponse">
> >>>>>>                    <wsdlsoap:body use="literal"/>
> >>>>>>                </wsdl:output>
> >>>>>>        </wsdl:operation>
> >>>>>>    </wsdl:binding>
> >>>>>>
> >>>>>>    <wsdl:service name="SimpelHttp.console_v_0">
> >>>>>>        <wsdl:port
> >>>>>> binding="SimpelHttp_v_0:SimpelHttp.starthttp_v_0Binding"
> >>>>>> name="SimpelHttp.starthttp_v_0">
> >>>>>>            <wsdlsoap:address location="
> >>>>>>
> >> http://0.0.0.0:9999/simplehttp/
> >>
> >>>> "/>
> >>>>
> >>>>
> >>>>>>        </wsdl:port>
> >>>>>>    </wsdl:service>
> >>>>>> </wsdl:definitions>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>
> >>>
> >>
> >
> >
> >
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to